常春藤下载比预期更多的罐子

Jus*_*tin 7 eclipse ivy ivyde

简介: Ivy正在下载比我预期更多的罐子,我不知道为什么.

详细信息: 我正在将我的项目从使用Maven Ant Tasks进行依赖管理转换为Ivy.

到目前为止,我已经完成了以下工作:

  1. 将IvyDE安装到Eclipse(Helios)中
  2. 创建了一个ivy.xml
  3. 由于我以前成功使用Maven Ant Tasks,因此我将我的den.xml从build.xml复制到了ivy.xml.我确保更改依赖声明以使用Ivy格式(org,name,rev).
  4. 在我的Eclipse项目中添加了IvyDE类路径容器.

现在,当我在Eclipse中运行Ivy> Resolve时,我可以看到279个jar被下载到".ivy2\cache".这超过了Maven Ant Tasks之前下载的65个罐子.

为什么常春藤会让更多的罐子掉下来?据我所知,常春藤也在减少源和一些javadoc罐子.这解释了一些额外的罐子,但我最多认为常春藤应该下载195罐(65*3)而不是279.

我错过了什么或做错了什么?我很感激任何反馈和建议.

这是我的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>
Run Code Online (Sandbox Code Playgroud)

leo*_*mig 7

我有类似的问题,发现这封邮件有帮助.

问题是,如果你没有指定任何conf,Ivy假设你想要spring的所有配置,其中包括可选的conf.试试这个:

<dependency org="org.springframework" name="spring" rev="2.0.3"
conf="*->default"/>
Run Code Online (Sandbox Code Playgroud)

http://mail-archives.apache.org/mod_mbox/ant-ivy-user/200703.mbox/%3C635a05060703310946q2f50880aqe07219c9e3026b83@mail.gmail.com%3E