Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ivy downloading more jars than expected

Tags:

eclipse

ivy

ivyde

Summary: Ivy is downloading more jars than I expect and I don't know why.

Details: I'm converting my project from using Maven Ant Tasks for dependency management to Ivy.

So far, I have done the following:

  1. Installed IvyDE into my Eclipse (Helios)
  2. Created an ivy.xml
  3. Since I was previously successfully using Maven Ant Tasks I copied my dendencies from my build.xml to the ivy.xml. I made sure to change the dependency declarations to use the Ivy format (org, name, rev).
  4. Added the IvyDE classpath container to my Eclipse project.

Now when I run Ivy > Resolve in Eclipse I can see that 279 jars are downloaded to ".ivy2\cache". This is way more than the 65 jars the Maven Ant Tasks were previously downloading.

Why is Ivy bringing down so many more jars? I understand that Ivy is also bringing down source and some javadoc jars. That explains some of the extra jars but I figure at most Ivy should download 195 jars (65*3) not 279.

What am I missing or doing wrong? I'd appreciate any feedback and suggestions.

Here's the contents of my ivy.xml

<?xml version="1.0" encoding="ISO-8859-1"?>

<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info
    organisation="org.robbins"
    module="FlashCardsWeb"
    status="integration">
</info>

<dependencies>

    <dependency org="org.apache.struts" name="struts2-core" rev="2.2.3"/>

    <dependency org="org.apache.struts" name="struts2-spring-plugin" rev="2.2.3">
        <exclude org="org.springframework" name="spring-web" />
        <exclude org="org.springframework" name="spring-beans" />
        <exclude org="org.springframework" name="spring-context" />
        <exclude org="org.springframework" name="spring-core" />
    </dependency>

    <dependency org="org.springframework" name="spring-web" rev="3.0.5.RELEASE"/>
    <dependency org="org.springframework" name="spring-beans" rev="3.0.5.RELEASE"/>
    <dependency org="org.springframework" name="spring-context" rev="3.0.5.RELEASE"/>
    <dependency org="org.springframework" name="spring-core" rev="3.0.5.RELEASE"/>
    <dependency org="org.springframework" name="spring-jdbc" rev="3.0.5.RELEASE"/>
    <dependency org="org.springframework" name="spring-orm" rev="3.0.5.RELEASE"/>

    <dependency org="org.apache.struts" name="struts2-tiles-plugin" rev="2.2.1.1"/>
    <dependency org="com.jgeppert.struts2.jquery" name="struts2-jquery-plugin" rev="3.0.1"/>
    <dependency org="com.jgeppert.struts2.jquery" name="struts2-jquery-richtext-plugin" rev="3.0.1"/>

    <dependency org="org.hibernate" name="hibernate-core" rev="3.6.2.Final"/>
    <dependency org="org.hibernate" name="hibernate-c3p0" rev="3.6.2.Final"/>
    <dependency org="org.hibernate" name="hibernate-entitymanager" rev="3.6.2.Final"/>
    <dependency org="org.hibernate" name="hibernate-tools" rev="3.2.4.GA"/>
    <dependency org="c3p0" name="c3p0" rev="0.9.1"/>

    <dependency org="org.slf4j" name="slf4j-simple" rev="1.6.1"/>
    <dependency org="commons-logging" name="commons-logging" rev="1.0.4"/>

    <dependency org="mysql" name="mysql-connector-java" rev="5.1.15"/>
    <dependency org="junit" name="junit" rev="4.8.1"/>
    <dependency org="log4j" name="log4j" rev="1.2.14"/>
    <dependency org="org.openid4java" name="openid4java-nodeps" rev="0.9.6" />
    <dependency org="org.apache.httpcomponents" name="httpclient" rev="4.0" />
    <dependency org="net.sourceforge.nekohtml" name="nekohtml" rev="1.9.10" />
</dependencies>

like image 524
Justin Avatar asked Sep 10 '11 17:09

Justin


1 Answers

I had a similar issue and found this mail message helped.

The problem is that if you don't specify any conf, Ivy assumes you want all the configurations of spring, which includes the optional conf. Try that instead:

<dependency org="org.springframework" name="spring" rev="2.0.3"
conf="*->default"/>

http://mail-archives.apache.org/mod_mbox/ant-ivy-user/200703.mbox/%[email protected]%3E

like image 199
leonigmig Avatar answered Nov 27 '22 15:11

leonigmig