ant-user mailing list archives

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

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

Maybe.

> <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.

Stefan

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


Mime
View raw message