ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: uptodate vs. outofdate and if/unless gotchas
Date Thu, 04 Mar 2004 17:07:54 GMT
> From: Stirling, Scott [mailto:scott.stirling@workscape.com]
> Hi,
> 
> These tasks seem like they do the same thing on the surface, but they
> actually set a property based on opposite conditions.
> 

You're really missing the part that <outofdate> is not designed to set a
property, but to *do* something when target files are out-of-date, i.e. are
not uptodate. I use <outofdate> extensively, and never set a property with
it. Really, with <outofdate> (which is part of Ant-Contrib, not Ant BTW),
you don't need <uptodate>, and simply reverse the logic.

With <outofdate>, think Makefile dependencies. This is the logic <outofdate>
was designed to replicate, and if you think it terms of file dependencies,
then it's crystal clear.

<outofdate>'s goal is to perform its nested <sequential> only when needed,
i.e. when its target files are ouf-of-date, not to set properties. --DD

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


Mime
View raw message