我有蚂蚁的问题。我想在蚂蚁中使用条件。但我得到错误:
BUILD FAILED
C:\Projekti\Projekt ANT\build.xml:412: Problem: failed to create task or type
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.
这是代码:
<target name="test">
<input message="Write some text: " addproperty="foo" />
<if>
<equals arg1="${foo}" arg2="bar" />
<then>
<echo message="The value of property foo is 'bar'" />
</then>
<elseif>
<equals arg1="${foo}" arg2="foo" />
<then>
<echo message="The value of property foo is 'foo'" />
</then>
</elseif>
<else>
<echo message="The value of property foo is not 'foo' or 'bar'" />
</else>
</if>
</target>
</project>