如何安装ant&ivy?


11

我已经安装了蚂蚁...并且已经安装了常春藤(均来自突触),但是蚂蚁找不到常春藤!

当我运行ant来构建“ october-chess-engine”时,我得到以下信息:

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

我不确定如何进行!我检查了这个问题,但没有解决我的问题。

谢谢,

Answers:


10

您是如何安装常春藤的?无论如何,您都需要将ivy.jar(来自http://ant.apache.org/ivy/download.html)放在任何列出的目录中

  • /usr/share/ant/lib
  • ${HOME}/.ant/lib(根据您的情况/home/zeigfreid/.ant/lib

如果使用-v选项(详细)执行它,则可以检查加载了什么内容


做到了,谢谢!我只是在$ {HOME} /。ant / lib中建立了一个指向ivy.jar文件的符号链接。
Ziggy

10

这似乎是一个常见的问题,因为我有同样的问题。使用安装常春藤apt-get,它没有显示在所需的文件夹中,但显示在:

[...]
/ 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
[...]

(您可能必须使用更新mlocate数据库, updatedb 然后使用 locate ivy 它来查找它。)

解决方法:在 /usr/share/ant/lib/

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

注意,那/usr/share/java/ivy.jar是一个链接本身。


1
谢谢,这对我有用。尽管我收到有关“非官方版本”的警告
-RobAu

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.