Setting a single server credentials in Maven for multiple repositories

Seems I'm not allowed to comment because I'm not experienced enough. As if :) However, regarding the WARNING profiles.profile[development].repositories.repository.id must be unique, I found this to be two settings.xml files being found. One in a maven installation's ${maven-install}/conf/settings.xml as well as a one in ~/.m2/settings.xml. Decide which one you want and clean up the other.


Yes, at least I believe this should work.

Instead of

<repository>
   <id>SNAPSHOTS</id>
   <url>http://server/nexus/content/repositories/SNAPSHOTS</url>
</repository>

Use

<repository>
  <id>nexus</id>
  <name>SNAPSHOTS</name>
  <url>http://server/nexus/content/repositories/SNAPSHOTS</url>
</repository>

Then just reference nexus as your server id.