Of course, you could also just use Ant-contrib's<if> task... It
supports if-then-else functionality.
Michael Giroux wrote:
Hi Evan,
On 7/17/07, Evan J <[EMAIL PROTECTED]> wrote:
if (condition)
perform some task, i.e. echo message="condition met"
else
perform another task
Is there such task available in Ant 1.7?
This can be accomplished by wrapping the tasks in individual targets
then defining a target that drives the others via depends:
<condition property="condition.is.set">
<!-- your test hee -->
</condition>
<target name="t1" if="condition.is.set">
<echo>condition was true</echo>
</target>
<target name="t2" unless="condition.is.set">
<echo>condition was false</echo>
</target>
<target name="driver" depends="t1,t2">
<!-- if condition.is.set then t1 is executed else t2 is executed -->
</target>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Scot P. Floess
27 Lake Royale
Louisburg, NC 27549
252-478-8087 (Home)
919-754-4592 (Work)
Chief Architect JPlate http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim