ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas SMETS" <tsm...@tsmets.lautre.net>
Subject if / unless ... Misanderstanding or problem ... ?
Date Thu, 12 Aug 2004 10:55:48 GMT

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


Mime
View raw message