I'm using Ant 1.9 on Mac 10.7.5 and I just installed Ivy. I'm having a problem getting dependencies to download. I have this build.xml file with my Ivy resolve target
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="hello-ivy" default="run">
<target name="resolve" description="retrieve dependencies with ivy">
<ivy:retrieve />
</target>
...
<target name="createSOAPClientJars" depends="resolve">
<generateSOAPClientJar serviceName="bsexample"
wsdlPath="${bsexample.service.wsdl.url}"/>
</target>
</project>
Then I have this ivy.xml file at the same level as my build.xml file:
<ivy-module version="2.0">
<info organisation="org.apache" module="hello-ivy"/>
<dependencies>
<dependency org="com.sun.xml.ws" name="jaxws-tools" rev="2.1.4"/>
</dependencies>
</ivy-module>
But when I run my Ant target, everything just hangs
Daves-MacBook-Pro:antws davea$ ant createSOAPClientJars
Buildfile: /Users/davea/antws/build.xml
resolve:
[ivy:retrieve] :: Apache Ivy 2.3.0 - 20130110142753 :: http://ant.apache.org/ivy/ ::
[ivy:retrieve] :: loading settings :: url = jar:file:/opt/apache-ant-1.9.0/lib/ivy-2.3.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: org.apache#hello-ivy;[email protected]
[ivy:retrieve] confs: [default]
What am I missing in order to get the dependencies to resolve and kickstart my target?
It looks like you're using the default ivy settings. This means ivy will attempt to download artifacts from Maven Central (largest repository of open source java software).
If your resolve is hanging it's most likely due the use of a network proxy. Ivy will attempt to connect and eventually time-out. Unfortunately there is an open issue IVY-735 calling for an ability to specify the time-out. I don't know how long ivy waits by default.....
I was having a similar issue as describe in Dave's original post. I checked my Internet connection as well as the repository URL listed in ivysettings.xml and everything looked okay.
I was letting the 'ant runtime' command wait in the background while I was looking into why the command didn't seem to resolve to a download URL and in 2 or 3 minutes of waiting, the package downloads started to happen.
I'm not sure, but maybe there is some sort of a default waiting time on the server side when an initial request is received on the maven repository server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With