ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Pelz Sherman <mpelzsher...@yahoo.com>
Subject RE: bug in "unless"?
Date Fri, 29 Jul 2005 21:12:20 GMT
Ah - that worked! Thank you! :-)

--- "Murray, Mike" <mbm@ptc.com> wrote:

> 	<target name="C" unless="foodir.exists">
> 
> -----Original Message-----
> From: Michael Pelz Sherman [mailto:mpelzsherman@yahoo.com]
> Sent: Friday, July 29, 2005 4:05 PM
> To: Ant Users List
> Subject: bug in "unless"?
> 
> 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
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 


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


Mime
View raw message