You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Raymond Feng <en...@gmail.com> on 2007/01/16 23:09:05 UTC

Is there a way to control the order of repositories?

Hi,

We use multiple maven repos in the build. Is there a way to control the order of the repositories to be searched for artifacts? In some cases, an arifact is published to both maven1 and maven2 repos and we prefer to use the one from the maven2 repo.

Thanks,
Raymond

Re: Is there a way to control the order of repositories?

Posted by Lasse Koskela <la...@gmail.com>.
Hi Andre,

I suppose I could just use Mergere's repository but how is it
different from others?
For example, does their DNS server automatically direct me to a nearby
server based on my IP...? Or is it just generally faster than, say,
the iBiblio servers?

Lasse

On 1/18/07, Andrea Malagodi <ma...@mac.com> wrote:
> Can you not just use: http://repo.mergere.com/maven2/ ?
>
> On 17 Jan 2007, at 23:13, Lasse Koskela wrote:
> > Please excuse me for hijacking the thread, but I've got another reason
> > for wanting to "order" repositories.
> >
> > Speed.
> >
> > What this means is that I'd like Maven to first check if the nearby
> > (fast) repository has the stuff I need and only then fall back to the
> > slower repository.

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


Re: Is there a way to control the order of repositories?

Posted by Andrea Malagodi <ma...@mac.com>.
Can you not just use: http://repo.mergere.com/maven2/ ?

Andre


On 17 Jan 2007, at 23:13, Lasse Koskela wrote:

> On 1/17/07, Raymond Feng <en...@gmail.com> wrote:
>> We use multiple maven repos in the build. Is there a way to  
>> control the order of the repositories to be searched for  
>> artifacts? In some cases, an arifact is published to both maven1  
>> and maven2 repos and we prefer to use the one from the maven2 repo.
>
> Please excuse me for hijacking the thread, but I've got another reason
> for wanting to "order" repositories.
>
> Speed.
>
> Let's say there's a repository in the office building next to me,
> which is a gazillion times as fast as an "official" one on the other
> side of the globe. Now, let's also say that the nearby repository is
> slow to synchronize with the far-away official repository.
>
> What this means is that I'd like Maven to first check if the nearby
> (fast) repository has the stuff I need and only then fall back to the
> slower repository.
>
> Lasse
>
>
> PS. Another related problem: I'm currently sitting in Finland. Next
> week, I'll be in Poland. A couple of weeks later somewhere else. If
> there was a way to set a "preferred order" for the repositories, I'd
> anyway have to change it quite often as I'm travelling. Unless...
>
> [begin smoking the proverbial crack]
>
> Maybe Maven could do a daily benchmark--a ping of some kind--against
> each repository, measuring the latency and reordering them
> accordingly, storing the measured latencies under "$HOME/.m2"?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


Re: Is there a way to control the order of repositories?

Posted by Raphaël Piéroni <ra...@gmail.com>.
Hi Lasse,

That's exactly why i plan to install an Archiva on my laptop.

Raphaël

2007/1/18, Lasse Koskela <la...@gmail.com>:
>
> Hi Wayne,
>
> I suppose using a local "proxy" repository would do the trick if I
> were always in the same place. However, I rarely work in the same
> place for longer than a few weeks, which means that the proxy
> repository should move with me :)
>
> Lasse
>
> On 1/18/07, Wayne Fay <wa...@gmail.com> wrote:
> > I think most of this functionality can/should be handled with a
> > Corporate Maven proxy rather than depending on Maven to provide it
> > directly.
> >
> > In fact, I think a bit of this functionality might already exist in
> > Archiva, Proximity, etc -- have you considered them?
> >
> > Wayne
> >
> > On 1/17/07, Lasse Koskela <la...@gmail.com> wrote:
> > > I'd like Maven to first check if the nearby (fast) repository has the
> > > stuff I need and only then fall back to the slower repository.
> > > [...]
> > > PS. Another related problem: I'm currently sitting in Finland. Next
> > > week, I'll be in Poland. A couple of weeks later somewhere else. If
> > > there was a way to set a "preferred order" for the repositories, I'd
> > > anyway have to change it quite often as I'm travelling. Unless...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Is there a way to control the order of repositories?

Posted by Lasse Koskela <la...@gmail.com>.
Hi Wayne,

I suppose using a local "proxy" repository would do the trick if I
were always in the same place. However, I rarely work in the same
place for longer than a few weeks, which means that the proxy
repository should move with me :)

Lasse

On 1/18/07, Wayne Fay <wa...@gmail.com> wrote:
> I think most of this functionality can/should be handled with a
> Corporate Maven proxy rather than depending on Maven to provide it
> directly.
>
> In fact, I think a bit of this functionality might already exist in
> Archiva, Proximity, etc -- have you considered them?
>
> Wayne
>
> On 1/17/07, Lasse Koskela <la...@gmail.com> wrote:
> > I'd like Maven to first check if the nearby (fast) repository has the
> > stuff I need and only then fall back to the slower repository.
> > [...]
> > PS. Another related problem: I'm currently sitting in Finland. Next
> > week, I'll be in Poland. A couple of weeks later somewhere else. If
> > there was a way to set a "preferred order" for the repositories, I'd
> > anyway have to change it quite often as I'm travelling. Unless...

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


Re: Is there a way to control the order of repositories?

Posted by Wayne Fay <wa...@gmail.com>.
I think most of this functionality can/should be handled with a
Corporate Maven proxy rather than depending on Maven to provide it
directly.

In fact, I think a bit of this functionality might already exist in
Archiva, Proximity, etc -- have you considered them?

Wayne

On 1/17/07, Lasse Koskela <la...@gmail.com> wrote:
> On 1/17/07, Raymond Feng <en...@gmail.com> wrote:
> > We use multiple maven repos in the build. Is there a way to control the order of the repositories to be searched for artifacts? In some cases, an arifact is published to both maven1 and maven2 repos and we prefer to use the one from the maven2 repo.
>
> Please excuse me for hijacking the thread, but I've got another reason
> for wanting to "order" repositories.
>
> Speed.
>
> Let's say there's a repository in the office building next to me,
> which is a gazillion times as fast as an "official" one on the other
> side of the globe. Now, let's also say that the nearby repository is
> slow to synchronize with the far-away official repository.
>
> What this means is that I'd like Maven to first check if the nearby
> (fast) repository has the stuff I need and only then fall back to the
> slower repository.
>
> Lasse
>
>
> PS. Another related problem: I'm currently sitting in Finland. Next
> week, I'll be in Poland. A couple of weeks later somewhere else. If
> there was a way to set a "preferred order" for the repositories, I'd
> anyway have to change it quite often as I'm travelling. Unless...
>
> [begin smoking the proverbial crack]
>
> Maybe Maven could do a daily benchmark--a ping of some kind--against
> each repository, measuring the latency and reordering them
> accordingly, storing the measured latencies under "$HOME/.m2"?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: Is there a way to control the order of repositories?

Posted by Lasse Koskela <la...@gmail.com>.
On 1/17/07, Raymond Feng <en...@gmail.com> wrote:
> We use multiple maven repos in the build. Is there a way to control the order of the repositories to be searched for artifacts? In some cases, an arifact is published to both maven1 and maven2 repos and we prefer to use the one from the maven2 repo.

Please excuse me for hijacking the thread, but I've got another reason
for wanting to "order" repositories.

Speed.

Let's say there's a repository in the office building next to me,
which is a gazillion times as fast as an "official" one on the other
side of the globe. Now, let's also say that the nearby repository is
slow to synchronize with the far-away official repository.

What this means is that I'd like Maven to first check if the nearby
(fast) repository has the stuff I need and only then fall back to the
slower repository.

Lasse


PS. Another related problem: I'm currently sitting in Finland. Next
week, I'll be in Poland. A couple of weeks later somewhere else. If
there was a way to set a "preferred order" for the repositories, I'd
anyway have to change it quite often as I'm travelling. Unless...

[begin smoking the proverbial crack]

Maybe Maven could do a daily benchmark--a ping of some kind--against
each repository, measuring the latency and reordering them
accordingly, storing the measured latencies under "$HOME/.m2"?

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


Re: Is there a way to control the order of repositories?

Posted by franz see <fr...@gmail.com>.
Good day,

Yes allan, you are correct. A binary with a certain artifact key (
groupId:artifactId:version ) should be the same no matter from what
repository it came from. 

If you have binaries with the same same artifact key, you may want to rename
one of them ( i.e. by changing the version ).

Cheers,
Franz


allan ramirez wrote:
> 
> I dont think there is a way to control the order of the repositories. But
> anyone can correct me if  Im wrong.
> 
> -allan
> 
> On 1/17/07, Raymond Feng <en...@gmail.com> wrote:
>>
>> Hi,
>>
>> We use multiple maven repos in the build. Is there a way to control the
>> order of the repositories to be searched for artifacts? In some cases, an
>> arifact is published to both maven1 and maven2 repos and we prefer to use
>> the one from the maven2 repo.
>>
>> Thanks,
>> Raymond
>>
>>
> 
> 
> -- 
> ==========================================================
> - alramirez
> 
> 

-- 
View this message in context: http://www.nabble.com/Is-there-a-way-to-control-the-order-of-repositories--tf3023877s177.html#a8408353
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Is there a way to control the order of repositories?

Posted by allan ramirez <aq...@gmail.com>.
I dont think there is a way to control the order of the repositories. But
anyone can correct me if  Im wrong.

-allan

On 1/17/07, Raymond Feng <en...@gmail.com> wrote:
>
> Hi,
>
> We use multiple maven repos in the build. Is there a way to control the
> order of the repositories to be searched for artifacts? In some cases, an
> arifact is published to both maven1 and maven2 repos and we prefer to use
> the one from the maven2 repo.
>
> Thanks,
> Raymond
>
>


-- 
==========================================================
- alramirez