Skip to content

Unauthorized error in Maven private parent resolution since JFrog CLI 2.33.0 #1839

@gregoryboue

Description

@gregoryboue

Describe the bug

Since version 2.33.0 I have 401 error when I execute jf mvn compile command for a maven project with private parent in it's pom

Current behavior

jf mvn -B compile -Dmaven.test.skip -Dstyle.color=always -Dartifactory.publish.artifacts=false
[Info] Downloading build-info-extractor from https://artefact-repo.titi.net/artifactory/maven-public/org/jfrog/buildinfo/build-info-extractor-maven3/2.39.0/build-info-extractor-maven3-2.39.0-uber.jar
[Info] Running Mvn...
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
[main] INFO org.apache.maven.cli.transfer.Slf4jMavenTransferListener - Downloading from artifactory-snapshot: https://artefact-repo.titi.net/artifactory/maven_02608/com/parent/apiiv-parent/1.0.2-SNAPSHOT/maven-metadata.xml
[main] WARNING org.codehaus.plexus.PlexusContainer - Could not transfer metadata com.parent:apiiv-parent:1.0.2-SNAPSHOT/maven-metadata.xml from/to artifactory-snapshot (https://artefact-repo.titi.net/artifactory/maven_02608): Authentication failed for https://artefact-repo.titi.net/artifactory/maven_02608/com/parent/apiiv-parent/1.0.2-SNAPSHOT/maven-metadata.xml 401 Unauthorized
[main] INFO org.apache.maven.cli.transfer.Slf4jMavenTransferListener - Downloading from artifactory-snapshot: https://artefact-repo.titi.net/artifactory/maven_02608/com/parent/apiiv-parent/1.0.2-SNAPSHOT/apiiv-parent-1.0.2-SNAPSHOT.pom
[main] ERROR org.apache.maven.DefaultMaven - [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for titi.gpf.eul.02608:HelloWorld:1.1.2017-SNAPSHOT: Could not transfer artifact com.parent:apiiv-parent:pom:1.0.2-SNAPSHOT from/to artifactory-snapshot (https://artefact-repo.titi.net/artifactory/maven_02608): Authentication failed for https://artefact-repo.titi.net/artifactory/maven_02608/com/parent/apiiv-parent/1.0.2-SNAPSHOT/apiiv-parent-1.0.2-SNAPSHOT.pom 401 Unauthorized and 'parent.relativePath' points at wrong local POM @ line 28, column 13

Reproduction steps

In the root pom.xml of a project add a parent declaration like this :

    <parent>
      <groupId>my.company</groupId>
      <artifactId>my-parent</artifactId>
      <version>1.0.0-SNAPSHOT</version>
  </parent>

The parent pom.xml is in the private virtual repository use by the project (name my_virtual).

Then execute the commands (with jf cli >= 2.33.0) :

  • jf config add...
  • jf mvn-config --repo-resolve-releases my_virtual --repo-resolve-snapshots my_virtual
  • jf mvn compile -Dartifactory.publish.artifacts=false

Expected behavior

that jf mvn command resolve the private parent dependency (ok with versions before 2.33.0).

JFrog CLI version

from 2.33.0 to 2.34.2

Operating system type and version

Ubuntu

JFrog Artifactory version

7.41.7

JFrog Xray version

3.55.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions