ant conditions problem
Posted
by senzacionale
on Stack Overflow
See other posts from Stack Overflow
or by senzacionale
Published on 2010-05-12T13:29:53Z
Indexed on
2010/05/12
13:34 UTC
Read the original article
Hit count: 217
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>
© Stack Overflow or respective owner