ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: How to make copy depend on filtersfile???
Date Thu, 23 Aug 2001 20:25:14 GMT
You could try using the <uptodate> task on the filtersfile and setting an
"overwrite" property (you'll need to add the "overwrite" addr to you
<copy> task), so that when the filtersfile is newer than the files to be
copied, overwrite="${overwrite}" will evaluate to true (have the value for
${overwrite} set to "false" by default [ie., if it didn't get set to
"true" by <uptodate>]).

Diane

--- Jim Crossley <jcrossley@ifleet.com> wrote:
> Hi Ant people.
> 
> I've defined some filters using a filtersfile, and I can copy some
> files containing the filter tokens, and they're magically populated
> with the values from the filtersfile.  So far, so good.
> 
> My problem: how to make the copy task depend not only on its
> destination files but on the filtersfile itself?
> 
> Here's a snippet from my build file:
> 
>     <filter filtersfile="${deploy.props}"/>
>     <copy todir="${deploy.home}/WEB-INF" filtering="true">
>       <fileset dir="etc"/>
>     </copy>
> 
> Short of specifying 'overwrite="true"' in the copy task, how can I
> make it "depend" on my filtersfile?  Touching the filtersfile will not
> cause the copy task to execute since none of its source files are
> newer than its destination ones.
> 
> Thanks.


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Mime
View raw message