【发布时间】:2011-06-13 21:48:08
【问题描述】:
我想做这样的事情
<target name="clean" description="clean">
<if>
<available file="${build}" type="dir" />
<then>
<delete dir="${build}" />
</then>
</if>
</target>
根据 stackoverflow.com 上的suggestions,我下载了 ant-contrib-1.0b3.jar 并将其放入我的路径中
此外,在 Ant Build 配置下,在类路径中,我有
运行我的 ANT 脚本时,我仍然得到
BUILD FAILED
C:\Repositories\blah\build.xml:60: Problem: failed to create task or type if
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.
我错过了什么?请告知
【问题讨论】:
标签: ant tags if-statement