ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: how to conditionally execute a task
Date Wed, 12 Jul 2006 10:22:15 GMT
Use conditional targets.

<condition property="isLinux">...
<condition property="isWindows">...
<target name="-doLinux" if="isLinux">
    linux specific stuff
</target>
<target name="-doWindows" if="isWindows">
    windows specific stuff
</target>
<target name="do" depens="-doLinux,-doWindows">
    global stuff
</target>


Jan


>-----Ursprüngliche Nachricht-----
>Von: Rémon van Gijn [mailto:r.van.gijn@portinfolink.com] 
>Gesendet: Mittwoch, 12. Juli 2006 12:07
>An: Ant Users List; Nagender Malik
>Betreff: RE: how to conditionally execute a task
>
>
>In ant you can use the "env" properties, in combination with 
>the ant-contrib extension that would allow you to create if statements.
>
>Met vriendelijke groet,
>Rémon van Gijn
>
>
>
>-----Original Message-----
>From: Nagender Malik 
>[mailto:nagender_malik@intersolutions.stpn.soft.net]
>Sent: woensdag 12 juli 2006 12:05
>To: Ant Group
>Subject: how to conditionally execute a task
>
>Hi All,
>
>i want to execute  a task conditionally based on operating 
>system property. how can we do that.
>
>please suggest....
>
>thanks,
>Nagender Malik   
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
>additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message