Treating file:// specially smells a bit of "magic" to me.

How about instead using conventional
  <include>
and
  <exclude>
tags, like every other maven plugin does.

Workign up a syntax that is backwards-compatible with the existing
  <mirrorOf>*</mirrorOf>
stuff is a little tricky, but not too bad. Perhaps simply treating
  <mirrorOf>*</mirrorOf>
as equivalent to:
  <includes><include>*</include></includes>
would be enough.

Then the syntax to redirect everything except local repos would be:
  <mirrorOf>*</mirrorOf>
  <mirror-of-excludes>
    <exclude>file://*</exclude>
  </mirror-of-excludes>
or similar.

Yes it is more verbose, but feels much less "magical". And it isn't
something that people have to do every day, so "discoverability" and
predictability in the syntax is more important than terseness.

Regards,
Simon

On Thu, 2008-03-13 at 21:36 -0400, Brian E. Fox wrote:
> I chatted with Brett a bit and he pointed out that some http repos might
> also be used locally. So how about this:
> 
> A new wildcard ** that means everything not local, that is, everything
> except file repos and repos using http://localhost / http://127.0.0.1
> 
> This way we don't risk breaking existing behavior but can provide a
> better workaround in 2.0.x.
> 
> 
> -----Original Message-----
> From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, March 13, 2008 9:26 PM
> To: dev@maven.apache.org
> Cc: Brian E. Fox
> Subject: Re: [Proposal] mirror settings and file:// repositories
> 
> 
> On Thursday 13 March 2008, Brian E. Fox wrote:
> > What's the use case for having a repository on the local disk, but
> > specifying a mirror of it somewhere else? I'm sure if this is
> > happening to people, it's totally unintentional.
> 
> Well, I suppose there is a use case of having something like:
> 
> file:/net/maven/repo
> 
> in the poms which could work for properly setup Unix boxes in an 
> organization, but Windows folks may need to change that to some samba 
> exported share or mounted drive letter.  
> 
> Dan
> 
> > -----Original Message-----
> > From: Brett Porter [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 13, 2008 8:35 PM
> > To: Maven Developers List
> > Subject: Re: [Proposal] mirror settings and file:// repositories
> >
> > This seems a little too much magic to me - is there any use case for
> > it outside of the integration tests? Would --ignore-mirrors or --
> > ignore-mirror-for ID be more appropriate? I've been using a
> > replacement settings.xml file, but that blasts local repository
> > setting and other mirrors.
> >
> > - Brett
> >
> > On 14/03/2008, at 9:25 AM, Brian E. Fox wrote:
> > > Wiki:
> >
> > http://docs.codehaus.org/display/MAVEN/Mirror+Settings+and+File+reposi
> >to
> >
> > > ries
> > > Jira: http://jira.codehaus.org/browse/MNG-3461
> > >
> > > -----Original Message-----
> > > From: Brian E. Fox [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, March 13, 2008 5:59 PM
> > > To: Maven Developers List
> > > Subject: [Proposal] mirror settings and file:// repositories
> > >
> > > I ran into some issues recently with the IT tests. I use a mirrorof
> > > * to
> > > redirect everything to a repo manager but this is also redirecting
> > > the file based repositories. I can't think of any good reason this
> > > should apply to anything other than remote repos. I have two
> > > proposals:
> > >
> > >
> > >
> > > 1.      Change maven so that file based repos ignore all mirror
> > > settings
> > >
> > > 2.      Change maven so that file based repos ignore the wildcard
> > > but will respond if the mirror specifically names it.
> > >
> > >
> > >
> > > Like I said, I can't think of any reason why a mirror should
> > > override a
> > > local repo so I suggest we go with #1. I'm targeting this change for
> > > 2.0.9.
> > >
> > >
> > > --------------------------------------------------------------------
> > >- To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > --
> > Brett Porter
> > [EMAIL PROTECTED]
> > http://blogs.exist.com/bporter/
> >
> >
> > ---------------------------------------------------------------------
> > 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]

Reply via email to