ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: Commons Configuration and Ivy
Date Wed, 13 Feb 2008 18:56:17 GMT
On Feb 13, 2008 4:27 PM, Emmanuel Bourg <ebourg@apache.org> wrote:

> Hi,
>
> I just started playing with Ivy and tried retrieving the Commons
> Configuration artifact, but I noticed that Ivy keeps pulling the
> optional and test jars even if I only request the default jars. Here are
> the ivy.xml file and the Ant build I used:
>
> <ivy-module version="2.0">
>     <info organisation="test" module="test"/>
>     <configurations>
>         <conf name="default"/>
>     </configurations>
>     <dependencies>
>         <dependency
>             org="commons-configuration"
>             name="commons-configuration"
>             rev="1.4"
>             conf="default"/>
>     </dependencies>
> </ivy-module>
>
>
> <project name="test" default="go" xmlns:ivy="antlib:org.apache.ivy.ant">
>     <target name="go">
>         <ivy:retrieve conf="default"/>
>     </target>
> </project>
>
> If I change for the 1.5 revision it's slightly better (junit and xerces
> are gone), but it still retrieves the optional jars such as
> servlet-api.jar, and it retrieves the test dependencies of
> commons-logging (log4j, logkit and avalon).
>
> Is this a known issue or am I doing something wrong ?

I think the problem comes from the metadata in the maven 2 repo:
commons-configuration 1.4 depends on commons-jxpath 1.2 in scope compile,
which in turn depends on servletapi 2.2 in scope compile too. According to
maven 2 scope management documentation [1], it's normal you get servletapi
with this metadata. I guess there are similar reasons for other
dependencies. To understand why Ivy brings a dependency, I suggest
generating the html report (alternatively you can simply go in your ivy
cache root and open the xml report file with a web browser). This should
help you understand why you'll need a lot of excludes when using maven 2
repo...

Xavier

>
>
> Thanks for your help,
>
> Emmanuel Bourg
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message