1
這就是我想要做的事:試圖讓這個目標條件
<target name="example">
<if>
<equals arg1="${var}" arg2="true" />
<then>
<exec executable="/bin/bash">
<arg value="script.sh" />
</exec>
</then>
</if>
</target>
當我執行與螞蟻例如目標我得到這個錯誤:
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.
我真的需要幫助在這裏。我真的很感激它
以下的答案演示如何安裝缺少第三方的依賴:http://stackoverflow.com/questions/34351322/there-isnt-antlib-xml-in-my- ant-contrib-0-3/34361910#34361910 –