-
Improvement
-
Resolution: Not A Defect
-
Minor
-
None
-
Jenkins 2.32.3
Config File Provider Plugin 2.15.7
Pipeline Maven Integration Plugin 2.0
I have a settings.xml that is managed by the Config File Provider Plugin and uses the option to inject stored credentials from the Jenkins credentials stores instead of having them directly in the settings.xml.
I'm using this settings.xml in a withMaven block like this:
withMaven(maven: 'Maven', mavenSettingsConfig: 'default-settings', mavenLocalRepo: '.repo') { sh 'mvn help:effective-settings' }
I would have expected that the effective settings would contain <server> sections for the configured credentials, but they don't. All static content from the managed settings.xml is present though.
I've marked this as Improvement instead of Bug, since https://wiki.jenkins-ci.org/display/JENKINS/Config+File+Provider+Plugin indicates that this might be expected:
The file types 'Global Maven settings.xml' and 'Maven settings.xml' have built-in support for the Credentials Plugin. When the plugin serves the settings.xml to the maven execution, the credentials get injected. This functionality is only available in the maven builder (e.g. for freestyle projects) and maven project type.