You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Steve Cohen <SC...@sportvision.com> on 2003/02/05 22:09:24 UTC

echo true or false

The <available>, <condition>, etc. set of tasks all work by setting a
property if a condition is met.  My problem is that I would like to echo
the results of this test.  
<condition property="my.property>
	... whatever tests
</condition>
<echo message="my.property=${my.property}"/>

If the property is set,
"true" will be echoed.  If it hasn't been set, "${my.property}" will be
echoed.

Pretty ugly.  I would like "false" to be echoed.

I would like the ability to set a property true or false depending on
the results of a conditional test.

What is the easiest way to accomplish what I am after?


-----------------------------------------------
Steve Cohen
Sr. Software Engineer
Sportvision Inc.
scohen@sportvision.com
http://www.sportvision.com

Please note: As a result of the merger of 
Ignite Sports and Sportvision, my email address 
has changed to scohen@sportvision.com