我克隆了一个新的 repo,它有一个 build.xml,它以
<?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
我可以浏览到我的 ant 主文件夹并找到 ivy.jar;我可以从命令行构建;我还在项目中指定了ANT_HOME | 属性 | 资源 | 链接资源 | 路径变量(虽然我不认为这个设置会有所帮助,但我做到了),但 STS 内运行的 ant 仍然抱怨。
任何蚂蚁/常春藤专家可以提供一些线索吗?