我们有一个可通过 HTTP 访问的 Ivy 存储库。它可以被多台机器毫无问题地访问,但在 Windows 机器上,我们会收到服务器访问错误。
[ivy:retrieve] Loading jar:file:/C:/Users/moserma/.ant/lib/ivy-2.3.0-rc1.jar!/org/apache/ivy/core/settings/ivy.properties
[ivy:retrieve] :: Apache Ivy 2.3.0-rc1 - 20120416000235 :: http://ant.apache.org/ivy/ ::
[ivy:retrieve] jakarta commons httpclient not found: using jdk url handling
[ivy:retrieve] :: loading settings :: file = D:\moserma\newWorkspace\Lakshmi\ivy\ivysettings.xml
[ivy:retrieve] no default ivy user dir defined: set to C:\Users\moserma\.ivy2
[ivy:retrieve] settings loaded (66ms)
[ivy:retrieve] default cache: D:\moserma\newWorkspace\Lakshmi\ivy\ivy-cache
[ivy:retrieve] default resolver: ETHZ-HTTP
[ivy:retrieve] -- 1 resolvers:
[ivy:retrieve] ETHZ-HTTP [url]
[ivy:retrieve] no resolved descriptor found: launching default resolve
Overriding previous definition of property "ivy.version"
[ivy:retrieve] using ivy parser to parse file:/D:/moserma/newWorkspace/Lakshmi/ivy.xml
[ivy:retrieve] :: resolving dependencies :: ch.ethz.wai#Lakshmi;1.0
[ivy:retrieve] confs: [default]
[ivy:retrieve] validate = true
[ivy:retrieve] refresh = false
[ivy:retrieve] resolving dependencies for configuration 'default'
[ivy:retrieve] == resolving dependencies for ch.ethz.wai#Lakshmi;1.0 [default]
[ivy:retrieve] == resolving dependencies ch.ethz.wai#Lakshmi;1.0->checkstyle#checkstyle-all;5.5 [default->*]
[ivy:retrieve] tried http://ivy.ethz.ch/checkstyle/checkstyle-all/5.5/ivy-5.5.xml
[ivy:retrieve] ERROR: Server access Error: Connection reset url=http://ivy.ethz.ch/checkstyle/checkstyle-all/5.5/ivy-5.5.xml
[ivy:retrieve] tried http://ivy.ethz.ch/checkstyle/checkstyle-all/5.5/checkstyle-all-5.5.jar
[ivy:retrieve] ERROR: Server access Error: Connection reset url=http://ivy.ethz.ch/checkstyle/checkstyle-all/5.5/checkstyle-all-5.5.jar
[ivy:retrieve] ETHZ-HTTP: no ivy file nor artifact found for checkstyle#checkstyle-all;5.5
[ivy:retrieve] WARN: module not found: checkstyle#checkstyle-all;5.5
[ivy:retrieve] WARN: ==== ETHZ-HTTP: tried
[ivy:retrieve] WARN: http://ivy.ethz.ch/checkstyle/checkstyle-all/5.5/ivy-5.5.xml
[ivy:retrieve] WARN: -- artifact checkstyle#checkstyle-all;5.5!checkstyle-all.jar:
[ivy:retrieve] WARN: http://ivy.ethz.ch/checkstyle/checkstyle-all/5.5/checkstyle-all-5.5.jar
现在没有涉及防火墙或代理,并且可以使用其他工具(例如,浏览器、curl、wget ......)毫无问题地访问 URL。例如:
$ curl http://ivy.ethz.ch/checkstyle/checkstyle-all/5.5/ivy-5.5.xml
<ivy-module version="2.0">
<info organisation="checkstyle" module="checkstyle-all" revision="5.5" status="integration" publication="20120806133612"/>
<publications>
<artifact name="checkstyle-all" type="jar" ext="jar"/>
</publications>
</ivy-module>
在服务器端,日志什么也没有显示:没有错误,甚至没有连接
编辑 ivysettings.xml
应该没问题,因为它们可以在 Mac OS X 和 Linux 上毫无问题地使用:
<ivysettings>
<settings defaultResolver = "ETHZ-HTTP" >
<caches defaultCacheDir = "${ivy.settings.dir}/ivy-cache" />
</settings>
<resolvers>
<url name="ETHZ-HTTP">
<ivy pattern="http://ivy.ethz.ch/[organisation]/[module]/[revision]/[artifact]-[revision].xml" />
<artifact pattern="http://ivy.ethz.ch/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
</resolvers>
</ivysettings>
有什么提示吗?