Cross posting answer already made on https://groups.google.com/forum/#!topic/jenkinsci-users/7P1Wd2W-OcA
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
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']