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

System scope Maven global settings.xml doesn't provide serverIds when using multibranch pipeline

    Details

    • Similar Issues:

      Description

      Problem reproduce steps:

      1. Credentials > System > Add Domain A, just has name specified.
      2. In domain A, add a credential C, username: maven repo username, password: maven repo password.
      3.  Manage Jenkins > Managed files, create a maven global settings.xml M, add Server Credentials using credential C.
      4. Create a Multibranch pipeline, in Pipeline Maven Configuration section, using config M.
      5. Run pipeline.

      Build log:

      [withMaven] using Maven global settings.xml '876cdf5c-802b-4252-a062-4b9d8602dd06' 
         with NO Maven servers credentials provided by Jenkins
      

      If I create credential C and maven global settings.xml M inside Multibranch pipeline, everything goes fine:

      [withMaven] using Maven global settings.xml 'f657ec5c-cc63-4730-a133-7e58c3ea433a' with Maven servers credentials 
         provided by Jenkins (replaceAll: true): 
         [mavenServerId: 'supwisdom-snapshots', jenkinsCredentials: '250947bb-2ce2-4cf5-b62f-bba7e2af7df0', username: 'deployment', type: 'UsernamePasswordCredentialsImpl'], 
         [mavenServerId: 'supwisdom-releases', jenkinsCredentials: '250947bb-2ce2-4cf5-b62f-bba7e2af7df0', username: 'deployment', type: 'UsernamePasswordCredentialsImpl']
      

       

        Attachments

          Activity

          Hide
          cleclerc Cyrille Le Clerc added a comment -

          Reproduced. Troubleshooting in progress

          Show
          cleclerc Cyrille Le Clerc added a comment - Reproduced. Troubleshooting in progress
          Hide
          cleclerc Cyrille Le Clerc added a comment -

          A regression on 3.6.6-beta-1 with maven settings containing comments in the <servers> element.

          Show
          cleclerc Cyrille Le Clerc added a comment - A regression on 3.6.6-beta-1 with maven settings containing comments in the <servers> element.
          Show
          cleclerc Cyrille Le Clerc added a comment - Fix of the regressions available in https://github.com/jenkinsci/pipeline-maven-plugin/releases/tag/pipeline-maven-3.6.6-beta-2
          Hide
          cleclerc Cyrille Le Clerc added a comment -

          Delivered in 3.6.6

          Show
          cleclerc Cyrille Le Clerc added a comment - Delivered in 3.6.6
          Hide
          red888 red der added a comment - - edited

          this issue is back. Im on version 3.8.1,

          hard coding server setting in the settings file works but using a username and password to replace does not work

          https://stackoverflow.com/questions/58139761/pipeline-maven-plugin-not-replacing-servers-in-global-settings-xml-from-jenkin

           

          Show
          red888 red der added a comment - - edited this issue is back. Im on version  3.8.1, hard coding server setting in the settings file works but using a username and password to replace does not work https://stackoverflow.com/questions/58139761/pipeline-maven-plugin-not-replacing-servers-in-global-settings-xml-from-jenkin  

            People

            • Assignee:
              cleclerc Cyrille Le Clerc
              Reporter:
              chanjarster Daniel Qian
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: