我克隆了一個新的回購庫,其中包含一個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