I've set up Nexus to proxy the central Maven repository and added a mirror to settings.xml
:
<mirror>
<id>nexus</id>
<mirrorOf>central</mirrorOf>
<url>http://my-host:8081/nexus/content/repositories/central/</url>
</mirror>
It works fine but if I try to add additional repositories to pom.xml
like this:
<repository>
<id>jboss</id>
<url>http://repository.jboss.org/nexus/content/repositories/releases/</url>
</repository>
Maven just doesn't see those repositories, until I remove <mirror>
from setting.xml
. I've also tried to mirror other repositories to Nexus, with no luck: Maven still uses only the central repository.
What am I doing wrong?
Found a whole two ways to solve the problem.
By using profiles: http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html
Or by using grouping in Nexus: http://www.sonatype.com/books/nexus-book/reference/confignx-sect-managing-groups.html
Seems it's helpful to read the documentation before asking questions:)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With