On Thu, May 7, 2009 at 4:31 PM, Asgeir S. Nilsen <asge...@gmail.com> wrote:

> 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>


The groups that a repository may contain is not known ahead of time. How
would you connect these together?


>
>
> 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>
>

A mirror has the net effect of replacing the url used for lookups. The
snapshot/release/plugin nature of a given repository is unchanged by the
mirror entry.


>
> Or even a snapshot expiry:
> <snapshots>
>  <enabled>true</enabled>
>  <updatePolicy>interval:30</updatePolicy>
> </snapshots>
>
>
> What do you think?
>


Complex scenarios like this are generally handled by repository managers:
http://maven.apache.org/repository-management.html


>
> Asgeir S. Nilsen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>

Reply via email to