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']




On Friday, September 27, 2019 at 4:57:11 PM UTC-4, red 888 wrote:
>
> I also opened an SO post for this issue: 
> https://stackoverflow.com/questions/58139761/pipeline-maven-plugin-not-replacing-servers-in-global-settings-xml-from-jenkin
>
> 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
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d3bcb320-54d2-45d2-aeb1-a6c3944bb5e4%40googlegroups.com.

Reply via email to