You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Thomas SMETS <ts...@tsmets.lautre.net> on 2004/08/12 12:55:48 UTC
if / unless ... Misanderstanding or problem ... ?
Here is my build file :
<project name="Test"
default="run"
basedir=".">
<!-- set global properties for this build -->
<property file="build.properties"/>
<target name="run.1.1" >
<echo>Hello 1.1</echo>
</target>
<target name="run.1.2" >
<echo>Hello 1.2 </echo>
</target>
<target name="run.2.1" >
<echo>Hello 2.1</echo>
</target>
<target name="run.2.2" >
<echo>Hello 2.2 </echo>
</target>
<target name="run.1"
depends="run.1.1,run.1.2"
if="${exploded}">
<echo>Hello 1 </echo>
</target>
<target name="run.2"
depends="run.2.1,run.2.2"
unless="${exploded}">
<echo>Hello 2 </echo>
</target>
<target name="run"
depends="run.1,run.2" >
<echo>Hello
exploded = ${exploded} </echo>
</target>
</project>
In the "build.properties" files, I have only the following line :
exploded = true
Now the problemis that the outcome is the following :
ant -buildfile Test.xml
Buildfile: Test.xml
run.1.1:
[echo] Hello 1.1
run.1.2:
[echo] Hello 1.2
run.1:
run.2.1:
[echo] Hello 2.1
run.2.2:
[echo] Hello 2.2
run.2:
[echo] Hello 2
run:
[echo] Hello
[echo] exploded = true
BUILD SUCCESSFUL
Total time: 0 seconds
JDK is the 1.4 provided with BEA 8.1
ANT is 1.6.2
Any hint in what goes wrong ... ?
\T,
--
Thomas SMETS
rue J. Wytsmanstraat 62
1050 Brussels
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org