ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jing Xue <jing...@digizenstudio.com>
Subject Re: Mapping Maven scopes to Ivy configurations
Date Sat, 07 Jun 2008 17:32:15 GMT
On Wed, Jun 04, 2008 at 09:43:30AM -0700, Howard Lewis Ship wrote:
> In any case, I'm having trouble when I pull down a Maven 2 artifact;
> too many dependencies are pulled down as well.
> 
> It seems that when I reference an artifact, all dependency scopes
> (runtime and test) are included.

It's probably because when ivy automatically converts maven2's pom
files to ivy.xml's, it plays on the safe side and make the conf
dependencies as broad as possible.

> I've been trying different variations of the conf attribute in my
> <dependency> element.  To be honest I'm not quite sure how this is
> supposed to work; I believe that the LHS is the name of a
> configuration of my module, and the RHS is the name of a corresponding
> configuration of the dependency.
> 
> I totally grok the "use your own repository" message, but the stuff
> I'm writing is demos and examples where, like Maven, I want people to
> be able to build without a lot of explicit downloads and configuration
> ... so I really want to be able to pull data from the public ibiblio
> Maven repository.

You could include in the demo a local directory structured as an ivy
repo holding optimized ivy.xml's. In your resolver chain, resolve all
ivy files against this one first then against ibiblio.

> Also, is there an easy way to add additional Maven 2 repositories?
> This seems like something done in ivysettings.xml

Yep, they can be defined in the 'resolvers' section.

HTH.
-- 
Jing Xue

Mime
View raw message