ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
Subject Re: Unexpected behavior with <target unless="variable">
Date Wed, 25 Feb 2004 21:39:24 GMT
Basel,
I think every thing is fine here.
The target target.name is not executed.
Its name appears in the output of the logger, but the message "in 
target" is not displayed.
If you remove the line saying <property name="some.condition" value="true"/>
then this message appears.

Cheers,

Antoine

$ ant -version
Apache Ant version 1.6.0 compiled on December 18 2003
$ ant -f c:/dev/testant/testantcall.xml
Buildfile: c:\dev\testant\testantcall.xml
first:
another.target:
target.name:

BUILD SUCCESSFUL
Total time: 0 seconds
---------------------->&>--------------------------------
<project name="testantcall" default="first">
<property name="some.condition" value="true"/>
<target name="first">
<antcall target="target.name" />
</target>
<target name="another.target"/>
<target name="target.name"
               depends="another.target"
               unless="some.condition" >

<echo message="in target"/>
</target>
</project>
---------------------->&>--------------------------------

Basel Ahmed wrote:


>Hey all,
>
>I'm seeing some unexpected behavior within the target unless option.
>
>The troublesome script segment looks something like this:
>
><antcall target="target.name" />
>
><target name="target.name"
>               depends="another.target"
>               unless="some.condition" >
>
></target>
>
>
>I have verified that the condition is set (echoing to the screen).
>
>  
>



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


Mime
View raw message