我有一个ivy.xml,它可以成功地解析它的所有依赖项,除了下面的一个。
<dependency org="org.springframework" name="spring-test" rev="3.0.2.RELEASE" force="true" conf="compile->test"/>我的ivysettings.xml有以下解析器:
<ibiblio name="maven" m2compatible="true" root="http://repo2.maven.org/maven2/" />当我尝试解析依赖关系时,我收到以下错误消息:
Server access Error: Connection refused: connect url=http://repo2.maven.org/maven2/org/springframework/spring-test/3.0.2.RELEASE/spring-test-3.0.2.RELEASE.pom但是,当我在浏览器中导航到该URL时,我可以看到.pom和.jars。是什么阻止了Ivy解决这种依赖呢?
发布于 2010-12-17 05:11:22
这听起来当然像是一个代理问题。
有没有可能之前下载了其他spring依赖项(例如,当您在家工作时),并从ivy缓存中检索到这些依赖项?
要将ANT配置为使用与您的web浏览器相同的代理,您需要阅读this web page。总之,使用适当的值设置以下环境变量:
export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080" 发布于 2011-09-15 23:45:26
我在3.0.5版本中也遇到了同样的问题,但我没有使用代理。我的修复方法是为发布添加spring repo,因为我的ivysettings.xml中只有external。
ivysettings.xml
<ivysettings>
<settings defaultResolver="chain"/>
<resolvers>
<chain name="chain">
<ibiblio name="central" m2compatible="true"/>
<ibiblio name="springsource-external" m2compatible="true" root="http://repository.springsource.com/maven/bundles/external"/>
<ibiblio name="springsource-release" m2compatible="true" root="http://repository.springsource.com/maven/bundles/release"/>
</chain>
</resolvers>
</ivysettings>https://stackoverflow.com/questions/4463140
复制相似问题