You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Glynbach <gl...@brokerbox.com> on 2008/04/11 15:58:09 UTC
Repository search order
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Repository search order
Posted by Glynbach <gl...@brokerbox.com>.
My mistake, only on seeing it in html on the forum do I see I have left out
the http://
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-tp16627819s177p16627821.html
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: Repository search order
Posted by Jason van Zyl <ja...@maven.org>.
On 12-Apr-08, at 9:24 AM, Peter Horlock wrote:
> Which Repo Manager would you prefer?
>
I'm openly and wholly biased because my company produces Nexus. So I'm
not the one to ask for a non-partisan opinion.
> Sonatype Nexus or Maven Archiva? Nexus is well documentated in the
> Sonatype
> Maven book, which is a big plus imho,
> and I also read it's supported by their Eclipse Maven (m2eclipse)
> plugin,
> which is probably also quite helpful.
Facts that are certain:
- Tamas has worked the longest on any repository manager, first with
proximity and now with Nexus. He works on Nexus full-time a fact of
which I'm very proud of.
- Nexus has the most thorough documentation with the chapter in the
maven book and this will be expanded as we add more features.
- Nexus integrates best with Eclipse in the form of m2eclipse and
that's certainly due to the fact that we (Sonatype) work on both. That
integration will become richer very rapidly. Nexus is already also
used in the Netbeans integration, and will be in IDEA as well. So the
most popular form of IDE integration already is, or will be using
Nexus technologies. We already have index proxying working as well
which is very cool. So when you proxy Maven central for example, you
can search Maven central's index without requiring a full mirror
- We have no external resource dependencies like databases which is a
huge plus in large environments. We know this for a fact because aside
from Google we are working with and talking to companies which have
very large IT infrastructures and developer populations and
introducing a database requirement just makes your adoption/
procurement process a lot harder.
- Nexus already has a complete REST API which will be the cornerstone
of 3rd party integration. We use Restlet and are working with the
Restlet authors to provide optimal and secure REST access.
- We are fixing errors in Nexus very quickly. The beta-2 was released
very shortly after the beta-1, and this will continue toward the 1.0.
- We don't require WebDAV for deployment, we actually figured out a
way to use REST with a simple PUT for deployment which greatly
simplifies the client side not requiring WebDAV. All one should care
about is security, and DAV doesn't really help here and REST just
makes things far simpler.
>
> However, Archiva seems to be the most stable Repo Manager.
More stable in what way?
I suggest as an exercise for yourself use the Apache Benchmark tool
(comes standard with apache) and hammer both Archiva and Nexus and
decide for yourself which one is more stable.
Load up Nexus' default distribution and Archiva's default distribution
with a profiler and judge for yourself what the foot prints are for
use. We will create some benchmarks for people to look at but we are
very sensitive to resource use and performance. We're working with the
Jetty authors to utilize the Jetty client library and creating a
memory file map cache to serve out heavily used artifacts at near
static content speeds.
>
>
> It's really hard to decide.
>
> I would be interested in everyone else's opinions.
>
http://weblogs.java.net/blog/johnsmart/archive/2008/04/nexus_my_next_m.html
Ultimately you have to try them both and decide. Try setting them both
up and see what you think. Compare the integration with Eclipse with
your developers and let them help you decide. Also join the mailing
lists and measure how fast releases come out, and how quickly issues
are dealt with as this is an important aspect as well.
> Thanks,
>
> Peter
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
happiness is like a butterfly: the more you chase it, the more it will
elude you, but if you turn your attention to other things, it will come
and sit softly on your shoulder ...
-- Thoreau
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Repository search order
Posted by Peter Horlock <pe...@googlemail.com>.
Which Repo Manager would you prefer?
Sonatype Nexus or Maven Archiva? Nexus is well documentated in the Sonatype
Maven book, which is a big plus imho,
and I also read it's supported by their Eclipse Maven (m2eclipse) plugin,
which is probably also quite helpful.
However, Archiva seems to be the most stable Repo Manager.
It's really hard to decide.
I would be interested in everyone else's opinions.
Thanks,
Peter
RE: Repository search order
Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Usually corporations want the central control that delegating everything
to a single url provides. However you are still able to address the
individual repositories if you want. This will also allow you to switch
the urls with a profile. For machines that are entirely internal (corp
desktops), setting up to use the internal proxy is easy by adding a
mirror url. It's the traveling machines that need a bit more work.
When I used to work where we had an internal proximity setup and I was
working from home (sometimes on maven, sometimes corp stuff), I setup
that corp repo as a repo using the grouped url and just activated it in
a profile when I needed it. Since I added it to my list last, any public
artifacts are pulled from the repos directly and only the corp artifacts
(and things from repos I might not have configured) would be retrieved
from the corp repo over the vpn.
-----Original Message-----
From: Mark Hewett [mailto:mark.hewett@gmail.com]
Sent: Saturday, April 12, 2008 6:24 PM
To: Maven Users List
Subject: Re: Repository search order
On Fri, Apr 11, 2008 at 12:42 PM, Jason van Zyl <ja...@maven.org> wrote:
> 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#
>
>
I've not tried using a repository manager for a while, so maybe I'm not
understanding/remembering something, but is there a way to use a
repository
manager without making your builds dependent upon the correct
configuration
in settings.xml and on the repository manager being available? I don't
version my settings.xml with my project source code, and we don't
necessarily share a common settings.xml in our team, so depending on
settings in there makes the build potentially non-repeatable and
environmentally sensitive. I also tend to work disconnected from the
company network quite a bit, so depending upon a corporate repository
manager in order for the builds to work correctly can also be an issue
(e.g.
if Nexus is grouping several repositories under one URL, people are
likely
to miss adding the appropriate repository definition to the POM, and
also
the issue of artifacts in central also being in some 3rd party
repositories
- maybe with different content - which Nexus can work around - if I'm
not
using the Nexus proxy/mirror, maybe I'll pick up different artifacts).
I think these were the issue I ran into last time around. I'll have to
give
it a go again - but has anyone else run into similar issues using
repository
managers, and if so, how do you work around them?
Thanks,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Repository search order
Posted by Mark Hewett <ma...@gmail.com>.
On Fri, Apr 11, 2008 at 12:42 PM, Jason van Zyl <ja...@maven.org> wrote:
> 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#
>
>
I've not tried using a repository manager for a while, so maybe I'm not
understanding/remembering something, but is there a way to use a repository
manager without making your builds dependent upon the correct configuration
in settings.xml and on the repository manager being available? I don't
version my settings.xml with my project source code, and we don't
necessarily share a common settings.xml in our team, so depending on
settings in there makes the build potentially non-repeatable and
environmentally sensitive. I also tend to work disconnected from the
company network quite a bit, so depending upon a corporate repository
manager in order for the builds to work correctly can also be an issue (e.g.
if Nexus is grouping several repositories under one URL, people are likely
to miss adding the appropriate repository definition to the POM, and also
the issue of artifacts in central also being in some 3rd party repositories
- maybe with different content - which Nexus can work around - if I'm not
using the Nexus proxy/mirror, maybe I'll pick up different artifacts).
I think these were the issue I ran into last time around. I'll have to give
it a go again - but has anyone else run into similar issues using repository
managers, and if so, how do you work around them?
Thanks,
Mark
Re: Repository search order
Posted by Jason van Zyl <ja...@maven.org>.
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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Repository search order
Posted by Jason van Zyl <ja...@maven.org>.
This is something that we dealt with specifically with a client with
Nexus. The Atlassian repositories were a complete mess (james tells me
this has been corrected), doing similar things with artifacts in
central and mixing snapshots and releases together. Nexus can actually
block requests for artifacts from a particular repository. So, in your
case you could block every request for an apache artifact from the
jboss repositories. With the routing in Nexus you can incrementally
block all the garbage that finds its way into public repositories.
Nexus first priority was to prevent crippling your internal
environment and protecting you from the outside world.
We plan to allow the general submission of these routing tables back
to our copy of Nexus running on our mirror of central so that open
source projects and people providing public repositories can clean up
their shit which adversely affects all Maven users.
I think all the metadata can be cleaned up inside 12 months, but until
then you have to protect your internal organization. With Nexus you
can group, route, and transform around problems. You group to order
and aggregate repositories behind one end point, you can route around
bad artifacts and crap repositories, and we dynamically rewrite
metadata on the fly to separate snapshot and release metadata so you
don't get hosed.
On 12-Apr-08, at 11:45 AM, Tom Huybrechts wrote:
> Be careful with the jboss repository. It contains artifacts that have
> the same groupId, artifactId and version as artifacts in central, but
> with different content. Mixing both is asking for trouble...
>
> Tom
>
> On Fri, Apr 11, 2008 at 3:58 PM, Glynbach
> <gl...@brokerbox.com> 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: 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
>
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
happiness is like a butterfly: the more you chase it, the more it will
elude you, but if you turn your attention to other things, it will come
and sit softly on your shoulder ...
-- Thoreau
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Repository search order
Posted by Tom Huybrechts <to...@gmail.com>.
Be careful with the jboss repository. It contains artifacts that have
the same groupId, artifactId and version as artifacts in central, but
with different content. Mixing both is asking for trouble...
Tom
On Fri, Apr 11, 2008 at 3:58 PM, Glynbach <gl...@brokerbox.com> 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: 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