我在Mac 10.7.5上使用Ant 1.9而我刚刚安装了Ivy.我遇到了下载依赖项的问题.我有这个build.xml文件和我的常春藤解决目标 project xmlns:ivy="antlib:org.apache.ivy.ant" name="hello-ivy" default="run" target name
<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>
然后我将此ivy.xml文件与build.xml文件放在同一级别:
<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>
但是当我运行我的Ant目标时,一切都会挂起
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;working@Daves-MacBook-Pro.local [ivy:retrieve] confs: [default]
为了获得依赖关系来解决并启动我的目标,我缺少什么?
看起来您正在使用默认的常春藤设置.这意味着常春藤将尝试从Maven Central(最大的开源Java软件库)下载工件.如果你的决心悬而未决,那很可能是因为使用了网络代理.常春藤将尝试连接并最终超时.不幸的是,有一个未解决的问题IVY-735要求能够指定超时.我不知道常春藤有多长时间等待…..