ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Proper use of <uptodate>
Date Tue, 18 Dec 2001 19:05:48 GMT
On Mon, 17 Dec 2001, Donnie Hale <donnie@haleonline.net> wrote:

> So I've tried putting an <uptodate> in my prepare task, and that
> seems to make sure jar2 doesn't get built if jar1 is up-to-date. And
> I have an <uptodate> in my jar1 task. But, with "unless" on my jar2
> task, that doesn't ensure that my jar2 task gets run if the jar1
> task is run.

Looks as if you could get things easier with the conditions task,
using <and> and several <uptodate>s inside of that.

> <uptodate property="jar2.notrequired" target="${libdir}/jar2.jar">
>     <srcfiles dir="${libdir}" includes="jar1.jar" />
> </uptodate>

looks fine.

> Also, how do "if" and "unless" interpret (quoting the docs) "the
> property that must [not] be be set"? Does that mean set to anything?

Exactly.  if just tests whether a given property exists, unless does
the same but with different results for the build process, of course.
The value of the property will be ignored.

> Lastly, is there a way to "unset" a property in a task?

No.

Stefan

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


Mime
View raw message