You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by John Casey <jd...@commonjava.org> on 2011/02/18 23:07:12 UTC

[PROPOSAL] Auto-Mirror Selection for Maven 3.x

Hi all,

I wanted to submit a proposal that would help us improve the design of 
mirroring support in Maven 3. The approach I advocate would reduce the 
amount of configuration needed to use local repository managers, 
streamline environment setup for new users in a custom environment, and 
provide a way to allow the maven repository system to scale a little 
better across more donated space in different locations.

I've already got the implementation done, but I'm still trying to get 
the integration tests up and running again (there are something like 8 
failures). Right now, it's on a branch in my Github clone of the 
canonical apache/maven-3.git mirror. The full proposal is in the 
front-page README.md on that branch.

The source + README is here:

https://github.com/jdcasey/maven-3/tree/auto-mirror

I've also added a small diagram to show the basic file format(s) and the 
Route-M classes...along with how they're integrated into the existing 
Maven architecture.

Please, if you have some time, take a look. I'd really like to get this 
in place for a possible Maven 3.1 release.

Thanks,

-john

-- 
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.johnofalltrades.name/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [PROPOSAL] Auto-Mirror Selection for Maven 3.x

Posted by Arnaud Héritier <ar...@exoplatform.com>.
I didn't yet test it but it is a good direction to follow.

Arnaud

On Sat, Feb 19, 2011 at 8:00 PM, Mark Struberg <st...@yahoo.de> wrote:

> looks promising!
>
> I'm sure I miss big parts of the picture, but please allow me a few
> (probably dumb) questions.
>
> This means that an artifact is uniquely identified via the URL of the
> server we downloaded it from? What about distributing artifacts to different
> locations? Kind of a redundancy for maven.central. Is this already targeted
> (and I don't see it yet), or a completely different story?
>
> If artifacts (+pom+-...) served from different locations have the same
> sha-1, then I won't bother where to take it from (albeit they must be
> 'reachable' aka available in at least one enabled repo).
>
> LieGrue,
> strub
>
>
> --- On Sat, 2/19/11, nicolas de loof <ni...@gmail.com> wrote:
>
> > From: nicolas de loof <ni...@gmail.com>
> > Subject: Re: [PROPOSAL] Auto-Mirror Selection for Maven 3.x
> > To: "Maven Developers List" <de...@maven.apache.org>
> > Cc: "Stephen Connolly" <st...@gmail.com>, "John Casey" <
> jdcasey@commonjava.org>
> > Date: Saturday, February 19, 2011, 8:57 AM
> > I really like this feature suggest,
> > and it would be a must-have if also
> > backported to maven2 !
> >
> > Having to maintain mirroring based on declared repositories
> > ID is a pain,
> > especially when transitive dependencies pull multiple IDs
> > for the same repo
> > URL. From your schema, it seems the routing rules are based
> > on target URL,
> > that would solve this with a centralized setup.
> >
> > I'll take a look at code ASAP.
> > Nicolas
> >
> > 2011/2/19 Stephen Connolly <st...@gmail.com>
> >
> > > Yep
> > >
> > > On 18 February 2011 22:39, John Casey <jd...@commonjava.org>
> > wrote:
> > >
> > > > So you're saying it would work with existing
> > releases of Maven, like
> > > 2.2.1?
> > > > I'd be very interested to see that.
> > > >
> > > > -john
> > > >
> > > >
> > > > On 2/18/11 5:23 PM, Stephen Connolly wrote:
> > > >
> > > >> I'll have a look at your branch, but I have
> > an alternative proposal that
> > > >> can
> > > >> (I think) be made to work for any version of
> > maven, perhaps ivy too all
> > > by
> > > >> just dropping a jar into the lib folder...
> > I'll have to flesh it out to
> > > >> confirm my theory. I'll be on two long
> > flights at the start of march, so
> > > I
> > > >> hope to be able to share something the 2nd
> > week march
> > > >>
> > > >> - Stephen
> > > >>
> > > >> ---
> > > >> Sent from my Android phone, so random
> > spelling mistakes, random nonsense
> > > >> words and other nonsense are a direct result
> > of using swype to type on
> > > the
> > > >> screen
> > > >> On 18 Feb 2011 22:10, "John Casey"<jd...@commonjava.org>
> > wrote:
> > > >>
> > > >>
> > > > --
> > > > John Casey
> > > > Developer, PMC Member - Apache Maven (http://maven.apache.org)
> > > > Blog: http://www.johnofalltrades.name/
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: dev-help@maven.apache.org
> > > >
> > > >
> > >
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: [PROPOSAL] Auto-Mirror Selection for Maven 3.x

Posted by John Casey <jd...@commonjava.org>.

On 2/19/11 2:00 PM, Mark Struberg wrote:
> looks promising!
>
> I'm sure I miss big parts of the picture, but please allow me a few (probably dumb) questions.
>
> This means that an artifact is uniquely identified via the URL of the server we downloaded it from?

No. This is just an alternative implementation of the mirror-selection 
logic already in Maven, and powered by the mirrors listing in the 
settings.xml. Instead of requiring all of that one-off configuration in 
every user's settings.xml, this approach uses a JSON file on a server 
(by default, the canonical location would be somewhere on 
repository.apache.org most likely) to supply the list of mirrors from 
which to select.

The rest of the artifact-handling logic in Maven is the same.

What about distributing artifacts to different locations? Kind of a 
redundancy for maven.central. Is this already targeted (and I don't see 
it yet), or a completely different story?
>
> If artifacts (+pom+-...) served from different locations have the same sha-1, then I won't bother where to take it from (albeit they must be 'reachable' aka available in at least one enabled repo).
>
> LieGrue,
> strub
>
>
> --- On Sat, 2/19/11, nicolas de loof<ni...@gmail.com>  wrote:
>
>> From: nicolas de loof<ni...@gmail.com>
>> Subject: Re: [PROPOSAL] Auto-Mirror Selection for Maven 3.x
>> To: "Maven Developers List"<de...@maven.apache.org>
>> Cc: "Stephen Connolly"<st...@gmail.com>, "John Casey"<jd...@commonjava.org>
>> Date: Saturday, February 19, 2011, 8:57 AM
>> I really like this feature suggest,
>> and it would be a must-have if also
>> backported to maven2 !
>>
>> Having to maintain mirroring based on declared repositories
>> ID is a pain,
>> especially when transitive dependencies pull multiple IDs
>> for the same repo
>> URL. From your schema, it seems the routing rules are based
>> on target URL,
>> that would solve this with a centralized setup.
>>
>> I'll take a look at code ASAP.
>> Nicolas
>>
>> 2011/2/19 Stephen Connolly<st...@gmail.com>
>>
>>> Yep
>>>
>>> On 18 February 2011 22:39, John Casey<jd...@commonjava.org>
>> wrote:
>>>
>>>> So you're saying it would work with existing
>> releases of Maven, like
>>> 2.2.1?
>>>> I'd be very interested to see that.
>>>>
>>>> -john
>>>>
>>>>
>>>> On 2/18/11 5:23 PM, Stephen Connolly wrote:
>>>>
>>>>> I'll have a look at your branch, but I have
>> an alternative proposal that
>>>>> can
>>>>> (I think) be made to work for any version of
>> maven, perhaps ivy too all
>>> by
>>>>> just dropping a jar into the lib folder...
>> I'll have to flesh it out to
>>>>> confirm my theory. I'll be on two long
>> flights at the start of march, so
>>> I
>>>>> hope to be able to share something the 2nd
>> week march
>>>>>
>>>>> - Stephen
>>>>>
>>>>> ---
>>>>> Sent from my Android phone, so random
>> spelling mistakes, random nonsense
>>>>> words and other nonsense are a direct result
>> of using swype to type on
>>> the
>>>>> screen
>>>>> On 18 Feb 2011 22:10, "John Casey"<jd...@commonjava.org>
>> wrote:
>>>>>
>>>>>
>>>> --
>>>> John Casey
>>>> Developer, PMC Member - Apache Maven (http://maven.apache.org)
>>>> Blog: http://www.johnofalltrades.name/
>>>>
>>>>
>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>>
>>>>
>>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

-- 
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.johnofalltrades.name/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [PROPOSAL] Auto-Mirror Selection for Maven 3.x

Posted by Mark Struberg <st...@yahoo.de>.
looks promising!

I'm sure I miss big parts of the picture, but please allow me a few (probably dumb) questions.

This means that an artifact is uniquely identified via the URL of the server we downloaded it from? What about distributing artifacts to different locations? Kind of a redundancy for maven.central. Is this already targeted (and I don't see it yet), or a completely different story?

If artifacts (+pom+-...) served from different locations have the same sha-1, then I won't bother where to take it from (albeit they must be 'reachable' aka available in at least one enabled repo).

LieGrue,
strub


--- On Sat, 2/19/11, nicolas de loof <ni...@gmail.com> wrote:

> From: nicolas de loof <ni...@gmail.com>
> Subject: Re: [PROPOSAL] Auto-Mirror Selection for Maven 3.x
> To: "Maven Developers List" <de...@maven.apache.org>
> Cc: "Stephen Connolly" <st...@gmail.com>, "John Casey" <jd...@commonjava.org>
> Date: Saturday, February 19, 2011, 8:57 AM
> I really like this feature suggest,
> and it would be a must-have if also
> backported to maven2 !
> 
> Having to maintain mirroring based on declared repositories
> ID is a pain,
> especially when transitive dependencies pull multiple IDs
> for the same repo
> URL. From your schema, it seems the routing rules are based
> on target URL,
> that would solve this with a centralized setup.
> 
> I'll take a look at code ASAP.
> Nicolas
> 
> 2011/2/19 Stephen Connolly <st...@gmail.com>
> 
> > Yep
> >
> > On 18 February 2011 22:39, John Casey <jd...@commonjava.org>
> wrote:
> >
> > > So you're saying it would work with existing
> releases of Maven, like
> > 2.2.1?
> > > I'd be very interested to see that.
> > >
> > > -john
> > >
> > >
> > > On 2/18/11 5:23 PM, Stephen Connolly wrote:
> > >
> > >> I'll have a look at your branch, but I have
> an alternative proposal that
> > >> can
> > >> (I think) be made to work for any version of
> maven, perhaps ivy too all
> > by
> > >> just dropping a jar into the lib folder...
> I'll have to flesh it out to
> > >> confirm my theory. I'll be on two long
> flights at the start of march, so
> > I
> > >> hope to be able to share something the 2nd
> week march
> > >>
> > >> - Stephen
> > >>
> > >> ---
> > >> Sent from my Android phone, so random
> spelling mistakes, random nonsense
> > >> words and other nonsense are a direct result
> of using swype to type on
> > the
> > >> screen
> > >> On 18 Feb 2011 22:10, "John Casey"<jd...@commonjava.org> 
> wrote:
> > >>
> > >>
> > > --
> > > John Casey
> > > Developer, PMC Member - Apache Maven (http://maven.apache.org)
> > > Blog: http://www.johnofalltrades.name/
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > >
> > >
> >
> 


      

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [PROPOSAL] Auto-Mirror Selection for Maven 3.x

Posted by nicolas de loof <ni...@gmail.com>.
I really like this feature suggest, and it would be a must-have if also
backported to maven2 !

Having to maintain mirroring based on declared repositories ID is a pain,
especially when transitive dependencies pull multiple IDs for the same repo
URL. From your schema, it seems the routing rules are based on target URL,
that would solve this with a centralized setup.

I'll take a look at code ASAP.
Nicolas

2011/2/19 Stephen Connolly <st...@gmail.com>

> Yep
>
> On 18 February 2011 22:39, John Casey <jd...@commonjava.org> wrote:
>
> > So you're saying it would work with existing releases of Maven, like
> 2.2.1?
> > I'd be very interested to see that.
> >
> > -john
> >
> >
> > On 2/18/11 5:23 PM, Stephen Connolly wrote:
> >
> >> I'll have a look at your branch, but I have an alternative proposal that
> >> can
> >> (I think) be made to work for any version of maven, perhaps ivy too all
> by
> >> just dropping a jar into the lib folder... I'll have to flesh it out to
> >> confirm my theory. I'll be on two long flights at the start of march, so
> I
> >> hope to be able to share something the 2nd week march
> >>
> >> - Stephen
> >>
> >> ---
> >> Sent from my Android phone, so random spelling mistakes, random nonsense
> >> words and other nonsense are a direct result of using swype to type on
> the
> >> screen
> >> On 18 Feb 2011 22:10, "John Casey"<jd...@commonjava.org>  wrote:
> >>
> >>
> > --
> > John Casey
> > Developer, PMC Member - Apache Maven (http://maven.apache.org)
> > Blog: http://www.johnofalltrades.name/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>

Re: [PROPOSAL] Auto-Mirror Selection for Maven 3.x

Posted by Stephen Connolly <st...@gmail.com>.
Yep

On 18 February 2011 22:39, John Casey <jd...@commonjava.org> wrote:

> So you're saying it would work with existing releases of Maven, like 2.2.1?
> I'd be very interested to see that.
>
> -john
>
>
> On 2/18/11 5:23 PM, Stephen Connolly wrote:
>
>> I'll have a look at your branch, but I have an alternative proposal that
>> can
>> (I think) be made to work for any version of maven, perhaps ivy too all by
>> just dropping a jar into the lib folder... I'll have to flesh it out to
>> confirm my theory. I'll be on two long flights at the start of march, so I
>> hope to be able to share something the 2nd week march
>>
>> - Stephen
>>
>> ---
>> Sent from my Android phone, so random spelling mistakes, random nonsense
>> words and other nonsense are a direct result of using swype to type on the
>> screen
>> On 18 Feb 2011 22:10, "John Casey"<jd...@commonjava.org>  wrote:
>>
>>
> --
> John Casey
> Developer, PMC Member - Apache Maven (http://maven.apache.org)
> Blog: http://www.johnofalltrades.name/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: [PROPOSAL] Auto-Mirror Selection for Maven 3.x

Posted by John Casey <jd...@commonjava.org>.
So you're saying it would work with existing releases of Maven, like 
2.2.1? I'd be very interested to see that.

-john

On 2/18/11 5:23 PM, Stephen Connolly wrote:
> I'll have a look at your branch, but I have an alternative proposal that can
> (I think) be made to work for any version of maven, perhaps ivy too all by
> just dropping a jar into the lib folder... I'll have to flesh it out to
> confirm my theory. I'll be on two long flights at the start of march, so I
> hope to be able to share something the 2nd week march
>
> - Stephen
>
> ---
> Sent from my Android phone, so random spelling mistakes, random nonsense
> words and other nonsense are a direct result of using swype to type on the
> screen
> On 18 Feb 2011 22:10, "John Casey"<jd...@commonjava.org>  wrote:
>

-- 
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.johnofalltrades.name/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [PROPOSAL] Auto-Mirror Selection for Maven 3.x

Posted by Stephen Connolly <st...@gmail.com>.
I'll have a look at your branch, but I have an alternative proposal that can
(I think) be made to work for any version of maven, perhaps ivy too all by
just dropping a jar into the lib folder... I'll have to flesh it out to
confirm my theory. I'll be on two long flights at the start of march, so I
hope to be able to share something the 2nd week march

- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 18 Feb 2011 22:10, "John Casey" <jd...@commonjava.org> wrote:

Re: [PROPOSAL] Auto-Mirror Selection for Maven 3.x

Posted by John Casey <jd...@commonjava.org>.
Sorry, that diagram is at:

https://github.com/jdcasey/maven-3/blob/auto-mirror/src/site/resources/images/RouteM%20Integration.png

Thanks,

-john

On 2/18/11 5:07 PM, John Casey wrote:
> Hi all,
>
> I wanted to submit a proposal that would help us improve the design of
> mirroring support in Maven 3. The approach I advocate would reduce the
> amount of configuration needed to use local repository managers,
> streamline environment setup for new users in a custom environment, and
> provide a way to allow the maven repository system to scale a little
> better across more donated space in different locations.
>
> I've already got the implementation done, but I'm still trying to get
> the integration tests up and running again (there are something like 8
> failures). Right now, it's on a branch in my Github clone of the
> canonical apache/maven-3.git mirror. The full proposal is in the
> front-page README.md on that branch.
>
> The source + README is here:
>
> https://github.com/jdcasey/maven-3/tree/auto-mirror
>
> I've also added a small diagram to show the basic file format(s) and the
> Route-M classes...along with how they're integrated into the existing
> Maven architecture.
>
> Please, if you have some time, take a look. I'd really like to get this
> in place for a possible Maven 3.1 release.
>
> Thanks,
>
> -john
>

-- 
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.johnofalltrades.name/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org