ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject RE: <target>s unless/if: strangeness in default behaviour (imho) (ant 1.6.5)
Date Mon, 31 Aug 2009 11:19:53 GMT

-----Original Message-----
From: Gilles Scokart [] 
Sent: Monday, August 31, 2009 1:00 PM
To: Ant Users List
Subject: Re: <target>s unless/if: strangeness in default behaviour (imho) (ant 1.6.5)

2009/8/31 Francis GALIEGUE <>

> Which means that the dependencies of a target are executed before even
> any if="" or unless="" attributes are taken into account... This is
> rather counterintuitive to my eyes. Is this really the expected
> behaviour or is this a bug?

This is indeed as designed, and it is pretty usefull because you can set the
property p in t1 or t2.  This pattern is quiet often used.

Gilles Scokart

f.e. =

<target name="check_state">
  <condition property="${mname}.done">
    <available file="${ant.working.dir}/${mname}_script.params"/>

<target name="build" depends="check_state" unless="${mname}.done">

Regards, Gilbert

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

View raw message