The Pipeline Maven Plugin is not replacing the <servers> config in global settings.xml from jenkins credentials

37 views
Skip to first unread message

red 888

unread,
Sep 27, 2019, 4:57:11 PM9/27/19
to Jenkins Users

I wonder if the plugin is broken or not working correctly for multibranch pipelines? I can create a maven config file and in the "Content" all the settings work, but configuring "Server Credentials" with a jenkins credential binding is not replacing the "<servers>" section- seems to just ignore it.

for now I have to hard code my "<servers></servers>" secrets and all right in the content of the config file because the credentials arent working

Cyrille Le Clerc

unread,
Oct 2, 2019, 9:51:41 AM10/2/19
to Jenkins Users
Hello,

This is one of the most broadly used feature of the pipeline-maven-plugin, I think it works for most user, there is probably a glitch somewhere.

Can you please share your testing Jenkinsfile and the details reported by withMaven in the build logs?

The troubleshooting pipeline script should look like

withMaven(...) {
   sh "mvn help:effective-settings"
}

The build logs line that reports the credentials injected in the settings looks like
[withMaven] using Maven global settings.xml 'global-settings-for-pipeline-maven-plugin' with Maven servers credentials provided by Jenkins (replaceAll: false): [mavenServerId: 'github', jenkinsCredentials: 'github-credentials', username: 'cyrille-leclerc', type: 'UsernamePasswordCredentialsImpl'], [mavenServerId: 'nexus3.example.com', jenkinsCredentials: 'api-team-nexus-deployment-credentials', username: 'api-team', type: 'UsernamePasswordCredentialsImpl']
Reply all
Reply to author
Forward
0 new messages