maven-release-plugin + nexus-staging-plugin + Maven 2.2.1 Server Credentials with ID not found


You are:

  • using Maven 2.2.1
  • using maven-release-plugin ( release:prepare release:perform )
  • using nexus-staging-plugin as part of release process
  • specifying additional configuration in your settings.xml server section, like a different wagon provider or http params

When executing mvn release:prepare release:perform , your build fails during deploy execution in the release:perform build step because it cannot find your server id credentials that match your nexus-staging-plugin serverID parameter.

Example failure:

[INFO] [INFO] ------------------------------------------------------------------------ 
[INFO] [INFO] ------------------------------------------------------------------------ 
[INFO] [INFO] Server credentials with ID "mynexus" not found! 
[INFO] [INFO] ------------------------------------------------------------------------

Workaround 1 ( Preferred )

Use Maven 3.0.4+ instead of Maven 2.2.1 - it just works.

Workaround 2

If you must Maven 2.2.1 ( please avoid this if possible ):

1.) Comment out/delete your server configuration in your settings.xml

any configuration here will cause the server id to not be found </configuration> --> <id>mynexus</id> </server>

2.) (Optional) Modify your release plugin configuration to use 'httpclient' provider via a system property if you want to override the wagon provider



3) (Optional) Use our recommended version of wagon-http 2.1 by specifying the extension in your pom.xml if you want to override the wagon provider


     <!-- Maven 2.2.1 should use this Wagon version -->


It seems that any configuration in the server section of a settings.xml could trigger the same server id not found problem with Maven 2.2.1.

Please weigh the benefit of using Maven 2.2.1 seriously. It is no longer being developed. Maven 3.0.4 has proven very stable.

Have more questions? Submit a request


Article is closed for comments.