ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: testing for update on filter file
Date Mon, 01 Jul 2002 16:54:12 GMT
This works, but is more a work-around. The semantic of <copy> (its 'smarts')
is broken if the files are not copied when the filter file has changed. It
should be built-in to <copy> IMHO, and avoid doing the depends/if dance. I
think this is my single real gripe about Ant, all these convolutions one has
to go thru to perform something conditionally when it's not built-in to the
task itself. --DD

-----Original Message-----
From: Jon Skeet [] 
Sent: Friday, June 28, 2002 9:24 AM
To: Ant Users List
Subject: RE: testing for update on filter file

> I'm using the copy task in conjunction with an external 
> filter file.   I
> understand that if copy task detects if one of the source 
> files is newer
> than the target file, it will copy the source file to the 
> target, otherwise
> it will not copy the source file.  
> What I'm looking to do is trigger a copy of the source files, based on
> whether my filter file changed.  In other words, even if my 
> source files haven't changed, if something in the file filter changes, I 
> want the source files to be re-parsed with the tokens in the filter file
> copied to the target directories.
> How do I detect that the filter file has changed and how do I 
> subsequently trigger a copy on the source files?

Use the uptodate task to check whether the destination files are more recent
than all of your source files *and* your filter file, and set a property if
so. Then only execute the filter if the property isn't set.


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

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

View raw message