Rather than having two different server sections in settings.xml it is better
to use one and the same id in the distribtutionMgt in the pom if they are for
the same server. So e.g. if you deploy everything to nexus it could look like
this
<distributionManagement>
<repository>
<id>nexus</id>
<url>http://localhost:8081/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>nexus</id>
<url>http://localhost:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
<site>
<id>nexus</id>
<url>dav:http://localhost:8081/nexus/content/sites/site-internal/example</url>
</site>
</distributionManagement>
and then settings just needs
<server>
<id>nexus</id>
....
The same id is also used if you set up mirror in settings e.g.
<mirror>
<id>nexus</id>
causes the same credentials to be used for accessing the mirror url. You can
use that to e.g. disable anonymous access on Nexus and then require credentials.
manfred
DJViking wrote on 08.10.2014 03:06:
> That was it.
> <snapshotRepository>
> <id>snapshots</id>
>
> <url>http://maven-vm1:8081/nexus/content/repositories/snapshots</url>
> </snapshotRepository>
> <repository>
> <id>releases</id>
>
> <url>http://maven-vm1:8081/nexus/content/repositories/releases</url>
> </repository>
>
> I had to create two servers with both these Id's, then it worked just fine.
>
> Maybe I missed it, but I couldn't find anywhere in the documentation that
> this id needed to match the id in the server.
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/maven-deploy-artifacts-to-Nexus-repository-tp5751512p5808061.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]