Mentre utilizza ivy:retrieve
, non riesce a risolvere la dipendenza che dovrebbe essere scaricata. L'output è simile al seguente:Ivy non riesce a risolvere una dipendenza, impossibile trovare la causa
Buildfile: C:\Users\Simon\workspace\apollo\build.xml
init:
resolve:
BUILD FAILED
C:\Users\Simon\workspace\apollo\build.xml:42: Problem: failed to create task or type antlib:org.apache.ivy.ant:retrieve
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
No types or tasks have been defined in this namespace yet
This appears to be an antlib declaration.
Action: Check that the implementing library exists in one of:
-C:\Users\Simon\eclipse\plugins\org.apache.ant_1.8.2.v20120109-1030\lib
-C:\Users\Simon\.ant\lib
-a directory added on the command line with the -lib argument
Total time: 348 milliseconds
La sezione dedicata del build.xml
assomiglia così:
<target name="resolve" depends="init">
<ivy:retrieve pattern="${lib}/[artifact]-[revision].[ext]" sync="true" />
</target>
Anche qui è un elenco di quello che dovrebbe essere il download (dal build.xml
)
<target name="doc" depends="build">
<javadoc sourcepath="${src}" classpathref="libraries" access="private" destdir="${doc}" windowtitle="Apollo">
<doclet name="org.jboss.apiviz.APIviz" pathref="libraries">
<param name="-sourceclasspath" value="${bin}" />
<param name="-author" />
<param name="-version" />
<param name="-use" />
<param name="-nopackagediagram" />
</doclet>
<doctitle><![CDATA[<h1>Apollo</h1>]]></doctitle>
<link href="http://download.oracle.com/javase/6/docs/api/" />
<link href="http://docs.jboss.org/netty/3.2/api/" />
<link href="http://guava-libraries.googlecode.com/svn/trunk/javadoc/" />
<link href="http://www.junit.org/apidocs/" />
<link href="http://commons.apache.org/compress/apidocs/" />
<link href="http://jruby.org/apidocs/" />
</javadoc>
</target>
Molto ben dettagliato. –
domanda di feedback rapido: se ivy è nella tua ant_home/lib non hai bisogno di taskdef? questo era completamente nuovo per me: D – oers
Sì. È sconcertante il motivo per cui il progetto ANT non spedisce il vaso dell'edera per impostazione predefinita. –