ant conditions problem
- by senzacionale
I have problem with ant. I woul dlike to use conditions in ant. But i get error of:
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 / declarations have taken place.
and this is code:
<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>