On Jul 17, 2007, at 11:18 PM, Evan J wrote:
if (condition)
perform some task, i.e. echo message="condition met"
else
perform another task
Check out the AntContrib tasks at <http://ant-contrib.sourceforge.net/
tasks/tasks/index.html>.
There is actually an <if> ant task at <http://ant-
contrib.sourceforge.net/tasks/tasks/if.html>. I've used it quite
successfully with Ant 1.7.
If you don't want to use optional tasks, you can use the <condition>
task like this to emulate an <if><else> task:
<condition
property="os_is_windows"
value="true">
<os family="windows"/>
</condition>
<antcall task="windows_task"/>
<antcall task="unix_task"/>
<task name="windows_task if="os_is_windows">
<blah>
</blah>
</task>
<task name="unix_task" unless="os_is_windows">
<blah>
</blah>
</task>
David Weintraub
[EMAIL PROTECTED]
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]