This is another classic example of why using a repository manager is a
good thing. You can specify repositories in one central place, and
with Nexus you can order, group, and route which means you can get
certain artifacts from particular repositories if you so choose. Using
Nexus will also help you manager all your repository use from one
location. If you're a lone developer then this isn't much of an
advantage, but if there is a team then using a repository manager has
definite advantages.
You can read about repository managers here:
http://www.sonatype.com/book/reference/repository-manager.html#
On 11-Apr-08, at 6:58 AM, Glynbach wrote:
Hi
I added the jboss repository to my POM to add a jta dependecy. But
running
mvn test gives an error retrieving the jta jar. The error shows
maven is
trying to get the jar from the maven repository (which exists but
has no jar
in it) rather than the jboss repository. Can I stipulate which
repository
should be used in the dependency?
pom entries are :
<project>
<repositories>
<repository>
<id>jboss</id>
<url>repository.jboss.com/maven2</url>
</repository>
</repositories>
..
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.0.1B</version>
</dependency>
..
In the console I can see the following output:
----------
1 required artifact is missing.
for artifact:
com.fdar.apress.s2:app:war:1.0-SNAPSHOT
from the specified remote repositories:
jboss (repository.jboss.com/maven2),
central (http://repo1.maven.org/maven2)
and also:
url = http://repo1.maven.org/maven2
Downloading:
http://repo1.maven.org/maven2/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar
[ERROR]
Thanks for any help
--
View this message in context:
http://www.nabble.com/Repository-search-order-tp16627819s177p16627819.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
We know what we are, but know not what we may be.
-- Shakespeare
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]