So you don't declare the local nexus as a mirror at all? Just as a repo? On Fri, Jul 8, 2011 at 5:20 PM, Mark Struberg <[email protected]> wrote: > Hi folks! > > In general I prefer to 'disable the maven.central in the pom itself be just > turning it off: > > <pluginRepositories> > <pluginRepository> > <!-- we force maven to use our company repo this way! --> > <id>central</id> > <name>apache maven.central repository</name> > <url>http://invalid.com</url> > <!-- disable the maven.central repo --> > <releases> > <enabled>false</enabled> > </releases> > <snapshots> > <enabled>false</enabled> > </snapshots> > </pluginRepository> > .... > > <repositories> > <repository> > <!-- we force maven to use our company repo this way! --> > <id>central</id> > <name>apache maven.central repository</name> > <url>http://invalid.com</url> > <!-- disable the maven.central repo --> > <releases> > <enabled>false</enabled> > </releases> > <snapshots> > <enabled>false</enabled> > </snapshots> > </repository> > ... > > > The trick is that 'central' is the fixed ID of the maven central repository > [1]. By overwriting it in your own parent pom, you will not use the central > repository anymore and all request will get routed via your company repo > manager. > > Any all you need is a bit of code in your pom - no ugly touching the global > settings.xml anymore. > > LieGrue, > strub > > > [1] > http://svn.apache.org/repos/asf/maven/maven-3/trunk/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml > --- On Fri, 7/8/11, Brian Fox <[email protected]> wrote: > >> From: Brian Fox <[email protected]> >> Subject: Re: A problem with mirrors >> To: "Maven Developers List" <[email protected]> >> Date: Friday, July 8, 2011, 8:25 PM >> What about the * bit you? Does the >> external:* fix it for you? >> >> On Wed, Jul 6, 2011 at 10:21 PM, Benson Margulies <[email protected]> >> wrote: >> > This doc works: >> > >> > http://maven.apache.org/guides/mini/guide-mirror-settings.html >> > >> > FWIW. >> > >> > On Wed, Jul 6, 2011 at 10:18 PM, Barrie Treloar <[email protected]> >> wrote: >> >> On Thu, Jul 7, 2011 at 11:32 AM, Benson Margulies >> <[email protected]> >> wrote: >> >>> In our corporate global settings file, we >> have: >> >>> >> >>> <mirror> >> >>> <id>Nexus</id> >> >>> <name>Nexus Mirror</name> >> >>> <url>http://maven.basistech.net/nexus/content/groups/public</url> >> >>> >> <mirrorOf>*,!apache.org,!sonar,!apache.snapshots</mirrorOf> >> >>> </mirror> >> >>> >> >>> That * turns out to be a very bad idea, and >> I'd like some advice in >> >>> fixing maven to make it a less bad idea. >> >>> >> >> >> >> I hear ya, +1 and thanks for looking at it, I get >> bitten often too. >> >> I can't help with where to look though. >> >> >> >> While you are looking at it can you see about >> updating the documentation? >> >> http://maven.apache.org/ref/3.0.3/maven-settings/settings.html#class_mirror >> >> >> >> It current says >> >> mirrorOf String The >> server ID of the repository being >> >> mirrored, eg "central". This MUST NOT match the >> mirror id. >> >> which says nothing about * or ! being special >> syntax. >> >> >> >> >> --------------------------------------------------------------------- >> >> 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] >> > >> > >> >> --------------------------------------------------------------------- >> 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] > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
