I've set up a local Nexus repository mirroring some central
repositories.  I'm using Maven 2.1.0.

In settings.xml I've set up the mirror as such, using the new mirrorOf syntax:

   <mirror>
      <id>Twingine</id>
      <name>Twingine Public Mirror</name>
      <url>http://localhost:8081/nexus/content/groups/public</url>
      <mirrorOf>*,!java.net,!hudson-libs</mirrorOf>
    </mirror>

This has one major issue:  There is no standard for repository IDs,
apart from 'central'.  Different projects use different IDs for the
same repository.

The result is build failures when the mirror is enabled, because some
snapshot repository somewhere down the line has issues.

I propose two different strategies for handling this in a more reliable way:

1. Ability to use groupId in the mirrorOf clause
------------------------------------------------------------------
You could then state for instance:

<mirrorOf>org.apache.maven,org.codehaus.mojo</mirrorOf>

or

<mirrorOf>*,!com.othercompany</mirrorOf>

Default behaviour could be that subgroups would be included, or to
have some kind of star syntax.


2. Ability to exclude snapshot repositories from mirroring
---------------------------------------------------------------------------------

Either as a default, or as a setting for each mirror clause.

For example:

<snapshots>
  <enabled>true</enabled>
</snapshots>

Or even a snapshot expiry:
<snapshots>
  <enabled>true</enabled>
  <updatePolicy>interval:30</updatePolicy>
</snapshots>


What do you think?

Asgeir S. Nilsen

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to