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

Maven Linker Publisher unable to publish links

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • pipeline-maven-plugin
    • None
    • jenkins-war:2.187
      Pipeline Maven Integration Plugin:3.8.0

      When enabling Maven Linker Publisher, the pipeline syntax generator suggests "Don't forget to enable the "Downstream Pipeline Triggers" publisher to enable the "Maven Linker" publisher."

      As the instructions imply, just using the Linker Publisher does nothing, but there is no "Downstream Pipeline Triggers" that can be enabled.
      Only Pipeline Graph Publisher has such a choice, and it doesn't seem clear how it should be used to be able to do only link publishing.

      Example pipeline syntax which does not publish links:

      withMaven(publisherStrategy: 'EXPLICIT', options: [mavenLinkerPublisher()]) {
         sh 'mvn clean deploy'
      }
      
      

       

          [JENKINS-58807] Maven Linker Publisher unable to publish links

          Cyrille Le Clerc added a comment - - edited

          I have clarified the documentation Pipeline+Maven+Plugin 

          You need to also enable the `pipelineGraphPublisher`:

          • `pipelineGraphPublisher()` will update the graph of dependencies between Jenkins pipelines and Maven artifacts (produced and dependencies)
          • `mavenLinkerPublisher()` will display the Maven details on the Jenkins pipeline build page

          Can you try the following:

          withMaven(
             publisherStrategy: 'EXPLICIT', 
             options: [pipelineGraphPublisher(), mavenLinkerPublisher()]) {
          
             sh 'mvn clean deploy'
          }
           

           

          Cyrille Le Clerc added a comment - - edited I have clarified the documentation  Pipeline+Maven+Plugin   You need to also enable the `pipelineGraphPublisher`: `pipelineGraphPublisher()` will update the graph of dependencies between Jenkins pipelines and Maven artifacts (produced and dependencies) `mavenLinkerPublisher()` will display the Maven details on the Jenkins pipeline build page Can you try the following: withMaven( publisherStrategy: 'EXPLICIT' , options: [pipelineGraphPublisher(), mavenLinkerPublisher()]) { sh 'mvn clean deploy' }  

          Lasse Lindqvist added a comment - - edited

          Thanks. I tried that, and it does what I was hoping for

          Maybe the pom file could also be linked, since some parent artifacts are plain poms, but it is fine as it is too.

          As a bit unrelated issue, the "https://" from the beginning of the links is stripped away. This breaks links if the Artifactory only allows explicit https://artifactory... address.

           

          Edit:

          The pom decision seems to be on purpose here: https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.8.1/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java#L464

          For the stripped https I couldn't find an explanation from this plugin, so it is most likely from somewhere else.

          Lasse Lindqvist added a comment - - edited Thanks. I tried that, and it does what I was hoping for Maybe the pom file could also be linked, since some parent artifacts are plain poms, but it is fine as it is too. As a bit unrelated issue, the "https://" from the beginning of the links is stripped away. This breaks links if the Artifactory only allows explicit https://artifactory... address.   Edit: The pom decision seems to be on purpose here: https://github.com/jenkinsci/pipeline-maven-plugin/blob/pipeline-maven-3.8.1/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/util/XmlUtils.java#L464 For the stripped https I couldn't find an explanation from this plugin, so it is most likely from somewhere else.

            Unassigned Unassigned
            lasselindqvist Lasse Lindqvist
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: