我克隆了一个新的回购库,其中包含一个build.xml,该库以弹簧工具套件(STS)在〜/ .ant/lib中安装时找不到ivy.jar,并且命令行生成成功
<?xml version="1.0"?>
<project name="mbark" basedir=".." xmlns:ivy="antlib:org.apache.ivy.ant">
,但此行,当我在STS运行,
<target name="build" description="Compile main source tree java files">
<ivy:retrieve type="jar"/>
始终未能在类似这样的消息:
BUILD FAILED
/home/myusername/Documents/workspace-sts-3.2.0.RELEASE/mbark/conf/build.xml:26: 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.
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:
-/home/myusername/springsource/sts-3.2.0.RELEASE/plugins/org.apache.ant_1.8.3.v201301120609/lib
-/home/myusername/.ant/lib
-a directory added on the command line with the -lib argument
我可以浏览到我家的蚂蚁文件夹并找到ivy.jar;我可以从命令行构建;我也在项目中指定了ANT_HOME |属性|资源|链接的资源|路径变量(虽然我不认为这个设置会有帮助,但我做到了),但STS内部的运行蚂蚁仍然抱怨。
任何蚂蚁/常春藤专家都可以提供一些线索吗?
我确实安装了ivy.jar。使用ant和build.xml命令行构建完美。 – xiaochuanQ 2013-05-06 14:59:29