In Maven 2, Is it possible to specify a mirror for everything, but allow for failover to direct repo

Posted by Justin Searls on Stack Overflow See other posts from Stack Overflow or by Justin Searls
Published on 2010-03-18T15:28:19Z Indexed on 2010/03/18 15:31 UTC
Read the original article Hit count: 114

Filed under:
|
|

I understand that part of the appeal of setting up a Maven mirror, such as the following:

<mirror>
  <id>nexus</id>
  <name>Maven Repository</name>
  <mirrorOf>*</mirrorOf>
  <url>http://server:8081/nexus/content/groups/public</url>
</mirror>

... is that the documentation states, "You can force Maven to use a single repository by having it mirror all repository requests." However, is this also an indication that by having a * mirror set up each workstation [b]must[/b] be forced to go through the mirror?

I ask because I would like each workstation to failover and connect directly to whatever public repositories it knows about in the event that Nexus can't resolve a dependency or plugin. (In a perfect world, each developer has the access necessary to add additional proxy repositories as needed. However, sometimes that access isn't available; sometimes the Nexus server goes down; sometimes it suffers a Java heap error.)

Is this "mirror but go ahead and connect directly to public repos" failover configuration possible in Maven 2? Will it be in Maven 3?

© Stack Overflow or respective owner

Related posts about maven-2

Related posts about nexus