A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Engineering
»
Ant, Maven and Other Build Tools
Author
Many Maven repositories in pom.xml or settings.xml mirrors
Pierre Le Roux
Greenhorn
Joined: Feb 09, 2012
Posts: 2
posted
Feb 09, 2012 11:00:44
0
Hello,
I would like to declare repositories in pom.xml or mirrors in settings.xml.
My aim is to retrieve some artifact from
maven
central and some others from oss sonatype public.
for this i declared 2 repositories :
* either in my pom like this
<repositories> <repository> <id>central</id> <url>http://repo1.maven.org/maven2/</url> </repository> <repository> <id>Sonatype repository</id> <name>Sonatype's Maven repository</name> <url>http://oss.sonatype.org/content/groups/public</url> </repository> </repositories>
* either in my settings.xml like this :
<mirror> <id>central</id> <mirrorOf>*</mirrorOf> <url>http://repo1.maven.org/maven2/</url> </mirror> <mirror> <id>Sonatype repository</id> <mirrorOf>*</mirrorOf> <url>http://oss.sonatype.org/content/groups/public</url> </mirror>
I would like Maven to do this process :
if the package doesn't exist on the first repository, it tries to find it on the second one.
Is there a way to do it without using a custom repository such as Archiva or nexus ?
Thanks for you help.
Pierre Le Roux
Greenhorn
Joined: Feb 09, 2012
Posts: 2
posted
Feb 09, 2012 16:00:13
1
OK.
There's no problem for those who use Maven 2.2.1 but problem appears since Maven 3.
I just created a bug on
http://jira.codehaus.org/browse/MNG-5241
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 5575
I like...
posted
Feb 10, 2012 14:11:59
0
That's good to know. I always expected the repositories to be searched in the order in which they appear.
JBoss In Action
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: Many Maven repositories in pom.xml or settings.xml mirrors
Similar Threads
Maven Local repository Vs nexus
Build project from the Local Repository instead of Remote Repository
Why is Eclipse/Maven project not picking up the values from settings.xml?
Maven - plugin downoading problem
(RESOLVED) Re: Could not find repository
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter