Proxy settings with ivy...
Posted
by user315228
on Stack Overflow
See other posts from Stack Overflow
or by user315228
Published on 2010-05-27T12:29:30Z
Indexed on
2010/05/27
12:31 UTC
Read the original article
Hit count: 549
Hi,
I have an issue where in I have defined dependancies in ivy.xml on our internal corporate svn. I am able to access this svn site without any proxy task in ant. While my dependencies resides on ibiblio, that’s something outside our corporate, and needs proxy inorder to download something. I am facing problem using ivy here:
I have following in build.xml
<target name="proxy">
<property name="proxy.host" value="xyz.proxy.net"/>
<property name="proxy.port" value="8443"/>
<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>
</target>
<!-- resolve the dependencies of stratus -->
<target name="resolveTestDependency" depends="testResolve, proxy" description="retrieve test dependencies with ivy">
<ivy:settings file="stratus-ivysettings.xml" />
<ivy:retrieve conf="test" pattern="${jars}/[artifact]-[revision].[ext]"/><!--pattern here specifies where do you want to download lib to?-->
</target>
<target name=" testResolve ">
<ivy:settings file="stratus-ivysettings.xml" />
<ivy:resolve conf="test" file="stratus-ivy.xml"/>
</target>
Following is the excerpt from stratus-ivysettings.xml
<resolvers>
<!-- here you define your file in private machine not on the repo (e.g. jPricer.jar or edgApi.jar)-->
<url name="privateFS">
<ivy pattern="http://xyz.svn.com/ivyRepository/[organisation]/ivy/ivy.xml"/>
</url>
.
.
.
<url name="public" m2compatible="true">
<artifact pattern="http://www.ibiblio.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
</url>
.
.
.
So as can be seen here for getting ivy.xml, I don’t need any proxy as its within our own network which cant be accesses when I set proxy. But on the other hand I am using ibiblio as well which is external to our network and works only with proxy. So above build.xml wont work in that case. Can somebody help here.
I don’t need proxy while getting ivy.xml (as if I have proxy, ivy wont be able to find ivy file behind proxy from within the network), and I just need it when my resolver goes to public url.
© Stack Overflow or respective owner