ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: Target executes despite 'unless'
Date Fri, 29 Aug 2003 18:38:03 GMT
Depends on the 'was.inited' property existence, not value... This is a usual
trap. Test the value using <condition <istrue>>, in another target
unfortunately. --DD

> -----Original Message-----
> From: Jack J. Woehr [mailto:jax@purematrix.com]
> Sent: Friday, August 29, 2003 1:19 PM
> To: Ant Users List
> Subject: Target executes despite 'unless'
> 
> [Apache Ant version 1.5]
> 
> In an overly complex build.xml authored by another, I have a target init
> of the form:
> 
>          <target description="Initialize the build process" name="init"
> unless="was.inited">
>              <echo message="value of was.inited is ${was.inited}"/>
>              <property name="was.inited" value="true"/>
>              <echo message="value of was.inited after setting is
> ${was.inited}"/>
>          </target>
> 
> This target always seems to execute every time it's referenced in a
> dependency despite the (echo'ed) setting of was.inited.
> 
> PMI, what have I misuderstood here, please?

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


Mime
View raw message