ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
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 name="-doWindows" if="isWindows">
    windows specific stuff
<target name="do" depens="-doLinux,-doWindows">
    global stuff


>-----Ursprüngliche Nachricht-----
>Von: Rémon van Gijn [] 
>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 
>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....
>Nagender Malik   
>To unsubscribe, e-mail: For 
>additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message