11

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,

3 Answers 3

11

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)

1
  • That did it, thanks! I just made a symlink in ${HOME}/.ant/lib to the ivy.jar file.
    – Ziggy
    Jul 23, 2012 at 17:26
12

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.

1
  • 1
    Thanks, this worked for me. Although I get a warning about a 'non-official version' May 28, 2013 at 7:20
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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