ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <>
Subject Re: When is unless/if checked?
Date Thu, 15 Apr 2004 08:04:56 GMT
You need to do:

<target name="conditional" depends="condition_checker" unless="condition">


Todor Boev wrote:

>Hello all,
>My question is when the unless/if conditions to execute a target are checked - only once
at the beginning of the build or just prior to target execution? Seems to me that ant goes
with the first option because the following:
><target name="condition_checker">
>   <property name="condition" value="true"/>
><target name="conditional" depends="condition_checker" unless="${condition}">
>  <echo message="Called with condition: ${condition}"/>
>will output
>[echo] Called with condition: true
>which is somewhat unexpected because the "conditional" should not be executed when condition=true.
>10x in advance for all replys.

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

View raw message