0

我对 java 不是很熟悉,但是我有一个正在处理的项目,在我的工作计算机上一切都按预期工作(构建、运行等),但是,当我ant -v在家用计算机上时,我得到了下列的。

[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve]      [NOT FOUND  ] javax.mail#mail;1.4!mail.jar(javadoc) (99ms)
[ivy:retrieve]  ==== public: tried
[ivy:retrieve]    http://repo1.maven.org/maven2/javax/mail/mail/1.4/mail-1.4-javadoc.jar
[ivy:retrieve]      [NOT FOUND  ] junit#junit;4.8.1!junit.jar(javadoc) (47ms)
[ivy:retrieve]  ==== public: tried
[ivy:retrieve]    http://repo1.maven.org/maven2/junit/junit/4.8.1/junit-4.8.1-javadoc.jar
[ivy:retrieve]      [NOT FOUND  ] com.mockrunner#mockrunner;0.3.1!mockrunner.jar(source) (47ms)
[ivy:retrieve]  ==== public: tried
[ivy:retrieve]    http://repo1.maven.org/maven2/com/mockrunner/mockrunner/0.3.1/mockrunner-0.3.1-sources.jar
[ivy:retrieve]      [NOT FOUND  ] com.mockrunner#mockrunner;0.3.1!mockrunner.jar(javadoc) (56ms)
[ivy:retrieve]  ==== public: tried
[ivy:retrieve]    http://repo1.maven.org/maven2/com/mockrunner/mockrunner/0.3.1/mockrunner-0.3.1-javadoc.jar
[ivy:retrieve]      ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]      ::              FAILED DOWNLOADS            ::
[ivy:retrieve]      :: ^ see resolution messages for details  ^ ::
[ivy:retrieve]      ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]      :: javax.mail#mail;1.4!mail.jar(javadoc)
[ivy:retrieve]      :: junit#junit;4.8.1!junit.jar(javadoc)
[ivy:retrieve]      :: com.mockrunner#mockrunner;0.3.1!mockrunner.jar(source)
[ivy:retrieve]      :: com.mockrunner#mockrunner;0.3.1!mockrunner.jar(javadoc)
[ivy:retrieve]      ::::::::::::::::::::::::::::::::::::::::::::::
4

1 回答 1

1

通过进入 ivy.xml 文件并更改依赖项如下解决了该问题

是(没有工作)

<dependency org="javax.mail" name="mail" rev="1.4"/>
<dependency org="junit" name="junit" rev="4.8.1"/>
<dependency org="com.mockrunner" name="mockrunner" rev="0.3.1"/>

是(固定)

<dependency org="javax.mail" name="mail" rev="1.4" conf="default->master"/>
<dependency org="junit" name="junit" rev="4.8.1" conf="default->master"/>
<dependency org="com.mockrunner" name="mockrunner" rev="0.3.1" conf="default->master"/>
于 2013-10-16T13:37:27.183 回答