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

Links to "Deployed Artifacts" broken with maven-deploy-plugin-3.0.0

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • pipeline-maven-plugin
    • None
    • Jenkins 2.346.3 // pipeline-maven 1161.v89a_7dcec5d31 // Nexus 2.15.1-02 // maven 3.8.6
    • 1469.ve15ca_a_b_90b_44

      The Deployed Artifacts listed with the maven build are broken - in our setup - if the maven deploy plugin 3.0.0 or a milestone version is in use. It works fine with version 2.7 or 2.8.1 of the maven-deploy-plugin.

      Broken Link:

      16:39:57  [INFO] --- maven-deploy-plugin:3.0.0:deploy (default-deploy) @ maventemplate-ear ---
      16:39:57  [INFO] Using alternate deployment repository snapshots::default::...
      16:39:57  [WARNING] Using legacy syntax for alternative repository. Use "snapshots::https://..." instead.
      ...
      16:39:57  [INFO] Uploading to snapshots: https://.../maventemplate-ear/1.4-SNAPSHOT/maventemplate-ear-1.4-20220822.143957-6.ear
      16:39:57  [INFO] Uploaded to snapshots: https://.../maventemplate-ear/1.4-SNAPSHOT/maventemplate-ear-1.4-20220822.143957-6.ear (62 kB at 466 kB/s)
      

      Created link: maventemplate-ear-1.4-SNAPSHOT.ear -> https://.../templates/maventemplate-ear/1.4-SNAPSHOT/maventemplate-ear-1.4-SNAPSHOT.ear

      Valid Link:

      16:49:21  [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ maventemplate-ear ---
      16:49:21  [INFO] Using alternate deployment repository snapshots::default::...
      ...
      16:49:21  [INFO] Uploading to snapshots: https://.../maventemplate-ear/1.4-SNAPSHOT/maventemplate-ear-1.4-20220818.144921-14.ear
      16:49:21  [INFO] Uploaded to snapshots: https://.../maventemplate-ear/1.4-SNAPSHOT/maventemplate-ear-1.4-20220818.144921-14.ear (62 kB at 198 kB/s)
      

      Created link: maventemplate-ear-1.4-20220818.144921-14.ear -> https://.../templates/maventemplate-ear/1.4-SNAPSHOT/maventemplate-ear-1.4-20220818.144921-14.ear

      Not sure if this is all needed details. One special thing might be that we pass in -DaltDeploymentRepository=snapshots::default::https://... to all our maven calls.

       

      20-Nov-2024 added by mhoffrog: The root cause for this behavior is the code portion missing for the attached artifacts branch within XmlUtils.java to set the version to attachedMavenArtifact. This code did have been added by PR 519 to the primary artifacts branch only. PR 854 fixes this issue.

          [JENKINS-69410] Links to "Deployed Artifacts" broken with maven-deploy-plugin-3.0.0

          Sahil added a comment -

          bguerin Facing same issue with maven-deploy plugin "3.1.1" 

          Sahil added a comment - bguerin Facing same issue with maven-deploy plugin "3.1.1" 

          Benoit added a comment - - edited

          sahilmulla it is working fine with deploy plugin 3.1.1 on my installation

          what are your symptoms ? are you sure you are not facing https://issues.jenkins.io/browse/JENKINS-72110 ?

          Benoit added a comment - - edited sahilmulla it is working fine with deploy plugin 3.1.1 on my installation what are your symptoms ? are you sure you are not facing https://issues.jenkins.io/browse/JENKINS-72110 ?

          Sahil added a comment -

          Below is the env details with versions:

          Jenkins 2.414.2 // pipeline-maven 1345.va_0ef5530a_5ca_  // Nexus  2.15.1-02 // maven 3.9.5

           

          The links are working fine with .jar and .ear files; however, there is a broken link for .zip or .tar files. It appears that the link should include timestamps as well.

          The maventemplate-6.1-SNAPSHOT.tar.gz file was not found in the local storage of the repository "maventemplate-snapshots" [id=maventemplate-snapshots].

           

          Broken Link:
          https://../module/maventemplate/6.1-SNAPSHOT/maventemplate-6.1-SNAPSHOT.tar.gz
          Valid Link:
          https://../module/maventemplate/6.1-SNAPSHOT/maventemplate-6.1-20231110.153636-6.tar.gz
          

           

          Sahil added a comment - Below is the env details with versions: Jenkins 2.414.2 // pipeline-maven 1345.va_0ef5530a_5ca_  // Nexus  2.15.1-02 // maven 3.9.5   The links are working fine with .jar and .ear files; however, there is a broken link for .zip or .tar files. It appears that the link should include timestamps as well. The maventemplate-6.1-SNAPSHOT.tar.gz file was not found in the local storage of the repository "maventemplate-snapshots" [id=maventemplate-snapshots] .   Broken Link: https: //../module/maventemplate/6.1-SNAPSHOT/maventemplate-6.1-SNAPSHOT.tar.gz Valid Link: https: //../module/maventemplate/6.1-SNAPSHOT/maventemplate-6.1-20231110.153636-6.tar.gz  

          Markus added a comment - - edited

          The issue is pending for artifacts being attached in addition to a modules primary artifact(s) being deployed. PR https://github.com/jenkinsci/pipeline-maven-plugin/pull/854 has been filed to resolve this.

          bguerin Please have a look to the PR.

          Markus added a comment - - edited The issue is pending for artifacts being attached in addition to a modules primary artifact(s) being deployed. PR https://github.com/jenkinsci/pipeline-maven-plugin/pull/854 has been filed to resolve this. bguerin Please have a look to the PR.

          Benoit added a comment -

          Ok, thanks, got it. I will work on the PR this week-end

          Benoit added a comment - Ok, thanks, got it. I will work on the PR this week-end

            bguerin Benoit
            andreasmandel Andreas Mandel
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: