ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: right way to use a condition
Date Tue, 25 May 2004 06:40:44 GMT
On Mon, 24 May 2004, Eric <> wrote:

> I'm thinking I haven't placed it in the right spot.


> <target name="test-init" description="--> prepare for testing"
>         unless="tests.uptodate">
> 	<condition property="tests.uptodate">


Here the unless attribute won't do anything since the property cannot
be set before you run the target - which is when Ant evaluates the
if/unless attributes.

> 	<target name="test"
> 	        depends="test-compile"
> 	        unless="tests.uptodate"

should work.  In your mail you said it would run no matter whether
your condition was true or false.  if and unless only check for the
existance of a property, not for its value, so this may be a reason
why this target will always run.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message