Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-9122

Archived artifacts overridden when having multiple produced artifacts under different paths but with the same file name

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • maven-plugin
    • None

      Some plugins (e.g. maven-helper-plugin) can attach arbitrary artifacts from files that are stored under different paths but use the same file name.
      When the artifacts have unique maven coordinates - e.g. use the same groupId, artifactId, version, but a different classifier - Jenkins attempts to archive them based on the file name only. In this case, any archived artifact will override any previously archived artifact.
      This conflict can be avoided by using the canonical name of the artifact for archiving, which will produce unique artifact files.

          [JENKINS-9122] Archived artifacts overridden when having multiple produced artifacts under different paths but with the same file name

          Code changed in jenkins
          User: Tomer Cohen
          Path:
          maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifact.java
          http://jenkins-ci.org/commit/jenkins/ca56a32e16b97a8dae2e76718144ea00b24f51b1
          Log:
          [FIXED JENKINS-9122] - Archived artifacts overridden when having multiple produced artifacts under different paths but with the same file name

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tomer Cohen Path: maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifact.java http://jenkins-ci.org/commit/jenkins/ca56a32e16b97a8dae2e76718144ea00b24f51b1 Log: [FIXED JENKINS-9122] - Archived artifacts overridden when having multiple produced artifacts under different paths but with the same file name

          I wonder if there's some way to take advantage of the finalName for it seems to be useful for humans.

          OTOH, what this issue is proving is that the file name on the disk doesn't necessarily have anything to do with the <finalName> setting in POM. It really could be anything.

          Kohsuke Kawaguchi added a comment - I wonder if there's some way to take advantage of the finalName for it seems to be useful for humans. OTOH, what this issue is proving is that the file name on the disk doesn't necessarily have anything to do with the <finalName> setting in POM. It really could be anything.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #620
          [FIXED JENKINS-9122] - Archived artifacts overridden when having multiple produced artifacts under different paths but with the same file name

          Kohsuke Kawaguchi : ca56a32e16b97a8dae2e76718144ea00b24f51b1
          Files :

          • maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifact.java

          dogfood added a comment - Integrated in jenkins_main_trunk #620 [FIXED JENKINS-9122] - Archived artifacts overridden when having multiple produced artifacts under different paths but with the same file name Kohsuke Kawaguchi : ca56a32e16b97a8dae2e76718144ea00b24f51b1 Files : maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifact.java

          mdp added a comment - - edited

          This seems to break at least the Artifactory plugin which can no longer find the artifacts to deploy.
          https://issues.jfrog.org/jira/browse/HAP-159

          It tries to deploy pom.xml and now there is project-version.pom instead.

          mdp added a comment - - edited This seems to break at least the Artifactory plugin which can no longer find the artifacts to deploy. https://issues.jfrog.org/jira/browse/HAP-159 It tries to deploy pom.xml and now there is project-version.pom instead.

          Liya Katz added a comment -

          Yes, it breaks the Artifactory plugin - https://issues.jenkins-ci.org/browse/JENKINS-9269

          Liya Katz added a comment - Yes, it breaks the Artifactory plugin - https://issues.jenkins-ci.org/browse/JENKINS-9269

          Code changed in jenkins
          User: Tomer Cohen
          Path:
          maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifact.java
          http://jenkins-ci.org/commit/jenkins/ca56a32e16b97a8dae2e76718144ea00b24f51b1
          Log:
          [FIXED JENKINS-9122] - Archived artifacts overridden when having multiple produced artifacts under different paths but with the same file name

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tomer Cohen Path: maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifact.java http://jenkins-ci.org/commit/jenkins/ca56a32e16b97a8dae2e76718144ea00b24f51b1 Log: [FIXED JENKINS-9122] - Archived artifacts overridden when having multiple produced artifacts under different paths but with the same file name

          Code changed in jenkins
          User: Tomer Cohen
          Path:
          src/main/java/hudson/maven/reporters/MavenArtifact.java
          http://jenkins-ci.org/commit/maven-plugin/fe6be8cb9f40fe7276c0e85073bbfd1c76939620
          Log:
          [FIXED JENKINS-9122] - Archived artifacts overridden when having multiple produced artifacts under different paths but with the same file name

          Originally-Committed-As: ca56a32e16b97a8dae2e76718144ea00b24f51b1

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tomer Cohen Path: src/main/java/hudson/maven/reporters/MavenArtifact.java http://jenkins-ci.org/commit/maven-plugin/fe6be8cb9f40fe7276c0e85073bbfd1c76939620 Log: [FIXED JENKINS-9122] - Archived artifacts overridden when having multiple produced artifacts under different paths but with the same file name Originally-Committed-As: ca56a32e16b97a8dae2e76718144ea00b24f51b1

            Unassigned Unassigned
            yoavl yoavl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: