ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Pelz Sherman <mpelzsher...@yahoo.com>
Subject bug in "unless"?
Date Fri, 29 Jul 2005 21:05:19 GMT
Hi,

In ant 1.6.2, the following seems to indicate a bug with "unless":

<project name="foo">
	<target name="B">
		<available file="foo" type="dir" property="foodir.exists"/>
		<echo>Executing B</echo>
	</target>

	<target name="C" unless="${foodir.exists}">
		<echo>Executing C; foodir.exists is ${foodir.exists}</echo>
	</target>

	<target name="A" depends="B, C">
		<echo>Executing A</echo>
	</target>
</project>

$ mkdir foo
$ ant -f foo.xml A
Buildfile: foo.xml

B:
     [echo] Executing B

C:
     [echo] Executing C; foodir.exists is true

A:
     [echo] Executing A

BUILD SUCCESSFUL
Total time: 0 seconds

Unless I'm missing something, target C should not be executed if the directory
"foo" exists. Can someone please enlighten me? Thanks!

- Michael


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


Mime
View raw message