Why is Ivy unable to resolve spring-test dependency that is visible in my web browser?
I have an ivy.xml that can successfully resolve all of its dependencies, except the following one.
<dependency org="org.springframework" name="spring-test" rev="3.0.2.RELEASE" force="true" conf="compile->test"/>
My ivysettings.xml has the following resolver:
<ibiblio name="maven" m2compatible="true" root="http://repo2.maven.org/maven2/" />
When I attempt to resolve dependencies, I receive the following error message:
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
However, when I navigate to that URL in my browser, I've can see the .pom and the .jars. What coul开发者_运维知识库d be preventing Ivy from resolving this dependency?
Certainly sounds like a proxy issue.
Any chance the other spring dependencies were previously downloaded (for example when you were working at home) and were retrieved from the ivy cache?
To configure ANT to use the same proxy as your web browser you need to read this web page. In summary, set the following environment variables with the appropriate values:
export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"
I had the same issue with 3.0.5 but I don't use a proxy. The fix for me was to add the spring repo for releases as I only had external in my ivysettings.xml.
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>
精彩评论