ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trevin Beattie <tbeat...@boingo.com>
Subject Problem: failed to create task or type antlib:org.apache.ivy.ant:retrieve
Date Thu, 17 Apr 2008 18:33:17 GMT
I'm running on Fedora Core 6, which comes with ant-1.6.5-2jpp.2.  I've
downloaded apache-ivy-2.0.0-beta2 and copied ivy-2.0.0-beta2.jar to
~/.ant/lib/.  When I attempt to build the hello-ivy test, I get the
following failure message:

[tbeattie@ernie hello-ivy]$ ant
Buildfile: build.xml

resolve:

BUILD FAILED
/home/tbeattie/src/apache-ivy-2.0.0-beta2/src/example/hello-ivy/build.xml:38: 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.

This appears to be an antlib declaration. 
Action: Check that the implementing library exists in one of:
        -/usr/share/ant/lib
        -/home/tbeattie/.ant/lib
        -a directory added on the command line with the -lib argument


Total time: 0 seconds
[tbeattie@ernie hello-ivy]$ ls /usr/share/ant/lib /home/tbeattie/.ant/lib
/home/tbeattie/.ant/lib:
ivy-2.0.0-beta2.jar

/usr/share/ant/lib:
ivy-2.0.0-beta2.jar

I've also tried copying ivy-2.0.0-beta2.jar to /usr/share/ant/lib/, and
upgraded ant to the version 1.7.0-1jpp.4.  It still gives me the same
error.

A coworker gets the same error on Red Hat Enterprise Linux 5 with
ant-1.6.5 installed, but if he downgrades to ant-1.6.2 (packaged by
JPackage Project, not by Red Hat) then it works.

Any ideas what could be wrong -- is it incompatible with ant 1.6.5+ or
is the Red Hat distribution of ant missing some vital build step?

One more thing that may help: if I run `ant --execdebug', add
"/home/tbeattie/.ant/lib/ivy-2.0.0-beta2.jar" to the end of the (very
long) generated classpath, and enter the resulting command line, the
build will succeed:

[tbeattie@ernie hello-ivy]$ ant --execdebug
exec "/usr/java/jdk1.6.0_03/bin/java" -classpath
"/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/share/java/xml-commons-apis.jar:/usr/share/java/antlr.jar:/usr/share/java/ant/ant-antlr.jar:/usr/share/java/bcel.jar:/usr/share/java/ant/ant-apache-bcel.jar:/usr/share/java/bsf.jar:/usr/share/java/ant/ant-apache-bsf.jar:/usr/share/java/log4j.jar:/usr/share/java/ant/ant-apache-log4j.jar:/usr/share/java/oro.jar:/usr/share/java/ant/ant-apache-oro.jar:/usr/share/java/regexp.jar:/usr/share/java/ant/ant-apache-regexp.jar:/usr/share/java/xml-commons-resolver.jar:/usr/share/java/ant/ant-apache-resolver.jar:/usr/share/java/jakarta-commons-logging.jar:/usr/share/java/ant/ant-commons-logging.jar:/usr/share/java/jakarta-commons-net.jar:/usr/share/java/ant/ant-commons-net.jar:/usr/share/java/ant/ant-contrib.jar:/usr/share/java/javamail.jar:/usr/share/java/jaf.jar:/usr/share/java/ant/ant-javamail.jar:/usr/share/java/jdepend.jar:/usr/share/java/ant/ant-jdepend.jar:/usr/share/java/ant/ant-jmf.jar:/usr/share/java/jsch.jar:/usr/share/java/ant/ant-jsch.jar:/usr/share/java/junit.jar:/usr/share/java/ant/ant-junit.jar:/usr/share/java/ant/ant-nodeps.jar:/usr/share/java/ant/ant-swing.jar:/usr/share/java/jaxp_transform_impl.jar:/usr/share/java/ant/ant-trax.jar:/usr/java/jdk1.6.0_03/lib/tools.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/share/java/xml-commons-apis.jar:/usr/share/java/antlr.jar:/usr/share/java/bcel.jar:/usr/share/java/jaf.jar:/usr/share/java/javamail.jar:/usr/share/java/jdepend.jar:/usr/share/java/junit.jar:/usr/share/java/log4j.jar:/usr/share/java/oro.jar:/usr/share/java/regexp.jar:/usr/share/java/commons-logging.jar:/usr/share/java/jsch.jar:/usr/share/java/bsf.jar:/usr/share/java/xml-commons-resolver.jar"
-Dant.home="/usr/share/ant" -Dant.library.dir="/usr/share/ant/lib" org.apache.tools.ant.launch.Launcher
-cp ""
Buildfile: build.xml

resolve:

BUILD FAILED
/home/tbeattie/src/apache-ivy-2.0.0-beta2/src/example/hello-ivy/build.xml:38: 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.

This appears to be an antlib declaration. 
Action: Check that the implementing library exists in one of:
        -/usr/share/ant/lib
        -/home/tbeattie/.ant/lib
        -a directory added on the command line with the -lib argument


Total time: 0 seconds
[tbeattie@ernie hello-ivy]$ "/usr/java/jdk1.6.0_03/bin/java" -classpath
"/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/share/java/xml-commons-apis.jar:/usr/share/java/antlr.jar:/usr/share/java/ant/ant-antlr.jar:/usr/share/java/bcel.jar:/usr/share/java/ant/ant-apache-bcel.jar:/usr/share/java/bsf.jar:/usr/share/java/ant/ant-apache-bsf.jar:/usr/share/java/log4j.jar:/usr/share/java/ant/ant-apache-log4j.jar:/usr/share/java/oro.jar:/usr/share/java/ant/ant-apache-oro.jar:/usr/share/java/regexp.jar:/usr/share/java/ant/ant-apache-regexp.jar:/usr/share/java/xml-commons-resolver.jar:/usr/share/java/ant/ant-apache-resolver.jar:/usr/share/java/jakarta-commons-logging.jar:/usr/share/java/ant/ant-commons-logging.jar:/usr/share/java/jakarta-commons-net.jar:/usr/share/java/ant/ant-commons-net.jar:/usr/share/java/ant/ant-contrib.jar:/usr/share/java/javamail.jar:/usr/share/java/jaf.jar:/usr/share/java/ant/ant-javamail.jar:/usr/share/java/jdepend.jar:/usr/share/java/ant/ant-jdepend.jar:/usr/share/java/ant/ant-jmf.jar:/usr/share/java/jsch.jar:/usr/share/java/ant/ant-jsch.jar:/usr/share/java/junit.jar:/usr/share/java/ant/ant-junit.jar:/usr/share/java/ant/ant-nodeps.jar:/usr/share/java/ant/ant-swing.jar:/usr/share/java/jaxp_transform_impl.jar:/usr/share/java/ant/ant-trax.jar:/usr/java/jdk1.6.0_03/lib/tools.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/share/java/xml-commons-apis.jar:/usr/share/java/antlr.jar:/usr/share/java/bcel.jar:/usr/share/java/jaf.jar:/usr/share/java/javamail.jar:/usr/share/java/jdepend.jar:/usr/share/java/junit.jar:/usr/share/java/log4j.jar:/usr/share/java/oro.jar:/usr/share/java/regexp.jar:/usr/share/java/commons-logging.jar:/usr/share/java/jsch.jar:/usr/share/java/bsf.jar:/usr/share/java/xml-commons-resolver.jar:/home/tbeattie/.ant/lib/ivy-2.0.0-beta2.jar"
-Dant.home="/usr/share/ant" -Dant.library.dir="/usr/share/ant/lib" org.apache.tools.ant.launch.Launcher
-cp ""
Buildfile: build.xml

resolve:
No ivy:settings found for the default reference 'ivy.instance'.  A
default instance will be used
     [null] no settings file found, using default...
     [null] :: Ivy 2.0.0-beta2 - 20080225093827 ::
http://ant.apache.org/ivy/ ::
     [null] :: loading settings :: url =
jar:file:/home/tbeattie/.ant/lib/ivy-2.0.0-beta2.jar!/org/apache/ivy/core/settings/ivysettings.xml
[ivy:retrieve] :: resolving dependencies ::
org.apache#hello-ivy;working@ernie.boingo.com
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  found commons-lang#commons-lang;2.0 in public
[ivy:retrieve]  found commons-cli#commons-cli;1.0 in public
[ivy:retrieve]  found commons-logging#commons-logging;1.0 in public
[ivy:retrieve] downloading
http://repo1.maven.org/maven2/commons-lang/commons-lang/2.0/commons-lang-2.0.jar ...
[ivy:retrieve] .......................................................................................................................
(165kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve]  [SUCCESSFUL ] commons-lang#commons-lang;2.0!
commons-lang.jar (1218ms)
[ivy:retrieve] downloading
http://repo1.maven.org/maven2/commons-cli/commons-cli/1.0/commons-cli-1.0.jar ...
[ivy:retrieve] ...................... (29kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve]  [SUCCESSFUL ] commons-cli#commons-cli;1.0!
commons-cli.jar (1057ms)
[ivy:retrieve] downloading
http://repo1.maven.org/maven2/commons-logging/commons-logging/1.0/commons-logging-1.0.jar
...
[ivy:retrieve] ................. (21kB)
[ivy:retrieve] .. (0kB)
[ivy:retrieve]  [SUCCESSFUL ] commons-logging#commons-logging;1.0!
commons-logging.jar (991ms)
[ivy:retrieve] :: resolution report :: resolve 2865ms :: artifacts dl
3273ms
[ivy:retrieve]  :: evicted modules:
[ivy:retrieve]  commons-lang#commons-lang;1.0 by
[commons-lang#commons-lang;2.0] in [default]

---------------------------------------------------------------------
        |                  |            modules            ||
artifacts   |
        |       conf       | number| search|dwnlded|evicted|| number|
dwnlded|

---------------------------------------------------------------------
        |      default     |   4   |   3   |   3   |   1   ||   3   |
3   |

---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: org.apache#hello-ivy
[ivy:retrieve]  confs: [default]
[ivy:retrieve]  3 artifacts copied, 0 already retrieved (216kB/42ms)

run:
    [mkdir] Created
dir: /home/tbeattie/src/apache-ivy-2.0.0-beta2/src/example/hello-ivy/build
    [javac] Compiling 1 source file
to /home/tbeattie/src/apache-ivy-2.0.0-beta2/src/example/hello-ivy/build
     [java] standard message : hello ivy !
     [java] capitalized by org.apache.commons.lang.WordUtils : Hello
Ivy !

BUILD SUCCESSFUL
Total time: 8 seconds


-- Trevin Beattie



Mime
View raw message