ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maarten Coene <>
Subject Re: Problem: failed to create task or type antlib:org.apache.ivy.ant:retrieve
Date Fri, 18 Apr 2008 06:20:51 GMT
Can you use other tasks when you put them in your ~/.ant/lib, or do you have only problems
with the ivy.jar? 
Maybe your problem is related to


----- Original Message ----
From: Trevin Beattie <>
Sent: Friday, April 18, 2008 12:44:43 AM
Subject: Re: Problem: failed to create task or type antlib:org.apache.ivy.ant:retrieve

On Thu, 2008-04-17 at 23:00 +0200, Jacob Grydholt Jensen wrote:
> On 17/04/2008, Trevin Beattie <> wrote:
> > More details: I downloaded a fresh copy of the source tarballs of both
> >  ant-1.6.2 and ant-1.6.5 from, built them (without any
> >  vendor patches), and ran the full command line for each, *without*
> >  explicitly adding ivy on the classpath.  With ant-1.6.2, the build
> >  succeeded.  With ant-1.6.5, the build failed.  So it looks like ivy is
> >  incompatible with newer versions of ant.  (1.6.5 is 3 years old, BTW)
> I just tested 1.6.5 with 2.0.0-beta2 on Windows XP and it worked fine.
> So it doesn't seem that ivy is incompatible with ant 1.6.5 in general.
> But, it is strange that your combination of OS, ant and ivy does not
> work. What is the output of ant -v (version 1.6.5 and ivy in
> ~/.ant/lib)? I am also curious to see the value of ${user.home}.
> Best regards,
> Jacob Grydholt Jensen

I don't see user.home or any other properties in the '-v' output.  But
`ant -diagnostics' shows me: "user.home : /home/tbeattie".  Here's the
'-v' output:

Apache Ant version 1.6.5 compiled on August 30 2006
Buildfile: build.xml
Detected Java version: 1.5 in: /usr/java/jdk1.6.0_03/jre
Detected OS: Linux
parsing buildfile /home/tbeattie/src/apache-ivy-2.0.0-beta2/src/example/hello-ivy/build.xml
with URI = file:///home/tbeattie/src/apache-ivy-2.0.0-beta2/src/example/hello-ivy/build.xml
Project base dir set to: /home/tbeattie/src/apache-ivy-2.0.0-beta2/src/example/hello-ivy
Build sequence for target(s) `run' is [resolve, run]
Complete build sequence is [resolve, run, report, clean, clean-cache, ]


/home/tbeattie/src/apache-ivy-2.0.0-beta2/src/example/hello-ivy/build.xml:38: Could not create
task or type of type: antlib:org.apache.ivy.ant:retrieve.

Ant could not find the task or a class this task relies upon.

This is common and has a number of causes; the usual 
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file: 
 - You have misspelt 'antlib:org.apache.ivy.ant:retrieve'.
   Fix: check your spelling.
 - The task needs an external JAR file to execute
     and this is not found at the right place in the classpath.
   Fix: check the documentation for dependencies.
   Fix: declare the task.
 - The task is an Ant optional task and the JAR file and/or libraries
     implementing the functionality were not found at the time you
     yourself built your installation of Ant from the Ant sources.
   Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
     task and make sure it contains more than merely a META-INF/MANIFEST.MF.
     If all it contains is the manifest, then rebuild Ant with the needed
     libraries present in ${ant.home}/lib/optional/ , or alternatively,
     download a pre-built release version from
 - The build file was written for a later version of Ant
   Fix: upgrade to at least the latest release version of Ant
 - The task is not an Ant core or optional task 
     and needs to be declared using <taskdef>.
 - You are attempting to use a task defined using 
    <presetdef> or <macrodef> but have spelt wrong or not 
   defined it at the point of use

Remember that for JAR files to be visible to Ant tasks implemented
in ANT_HOME/lib, the files must be in the same directory or on the

Please neither file bug reports on this problem, nor email the
Ant mailing lists, until all of these causes have been explored,
as this is not an Ant bug.

Total time: 0 seconds

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

View raw message