Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've installed ant... and I've installed ivy (both from synaptic), but ant can't find ivy!

When I run ant to build 'october-chess-engine' I get the following:

BUILD FAILED
/home/zeigfreid/repos/october-chess-engine/build.xml:32: Problem: failed to create task or type antlib:org.apache.ivy.ant:resolve
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:
        -/usr/share/ant/lib
        -/home/zeigfreid/.ant/lib
        -a directory added on the command line with the -lib argument

I'm not sure how to proceed! I checked out this question, but it didn't address my issue.

Thanks,

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

How did you install ivy? In any case you need to put ivy.jar (from http://ant.apache.org/ivy/download.html) in any of the listed directories

  • /usr/share/ant/lib
  • ${HOME}/.ant/lib (in your case /home/zeigfreid/.ant/lib)

You can check what and is loading if you execute it with the -v option (verbose)

share|improve this answer
    
That did it, thanks! I just made a symlink in ${HOME}/.ant/lib to the ivy.jar file. –  Ziggy Jul 23 '12 at 17:26
add comment

This seems to be a common issue, as I had the same problem. After installing ivy with apt-get, it didn't show up in the desired folders, but in:

[...]
/usr/share/doc/ivy
/usr/share/doc/ivy/README
/usr/share/doc/ivy/README.Debian
/usr/share/doc/ivy/changelog.Debian.gz
/usr/share/doc/ivy/changelog.gz
/usr/share/doc/ivy/copyright
/usr/share/java/ivy-2.2.0.jar
/usr/share/java/ivy.jar
[...]

(You may have to update your mlocate database with updatedb and then use locate ivy to find it.)

To solve this: create a link in the /usr/share/ant/lib/

sudo ln -s -T /usr/share/java/ivy.jar /usr/share/ant/lib/ivy.jar

Note, that /usr/share/java/ivy.jar is a link itself.

share|improve this answer
1  
Thanks, this worked for me. Although I get a warning about a 'non-official version' –  RobAu May 28 '13 at 7:20
add comment

I found very useful to let ant to install ivy, see automatically installation.

This way the only operating system dependency is ant, and there is no need to add extra configuration like ANT_OPTS or classpath.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.