You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Hoffer <dh...@gmail.com> on 2011/01/27 17:02:28 UTC

Nexus settings.xml best practice

What's the best way to configure Nexus to override the default 'central'
repository and pluginRepository when I want this to be configured via a
'nexus' profile in settings.xml so I can have multiple profiles...each
pointing to a different maven proxy, i.e. nexus, artifactory, etc.

The online docs
http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.htmlsay
to create a nexus mirror (and a profile), but that is unacceptable
because then it's global...I can't choose a different profile to get maven
to point to it's maven proxy.  With this suggested approach I have to
comment out the mirror each time I want to use a non-nexus profile/etc.
When I put the full nexus URL in the profile's repository/pluginRepository
configuration and don't use the mirror, nexus can't proxy all artifacts...no
idea why.  The mirror, as suggested in the online docs, does allow nexus to
proxy all but then breaks the use of profiles here.