ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Atherton <>
Subject RE: Maybe <present> should work with another file set.
Date Sat, 08 Jun 2002 00:17:24 GMT
At 01:05 PM 6/7/2002 -0700, Alexey Solofnenko wrote:

>I am preparing a image directory by copying files from several folders.
>After that I want to delete obsolete files (instead of deleting the whole
>directory at the beginning). The code is something like:
><copy todir="${image}">
>   <fileset .../>
>   <fileset dir="${image}">
>     <present targetdir="${src_dir} present="srconly"/>
>   </fileset>
>However source fileset can be quite complex. Do you think this feature
>should be added into ANT?

Ok, I'm more clear on why you want this. Reusing filesets when detecting 
obsolete files does make sense.

I think that there is another way to get that reuse, though. You could have 
something like this:

<project basedir="." target="">
   <selector id="complicated-selection">

   <target name="">
     <copy todir="${image}">
       <fileset dir="${src_dir}">
         <selector refid="complicated-selection"/>

   <target name="remove.obsolete">
       <fileset dir="${image}">
           <selector refid="complicated-selection"/>
           <present targetdir="${src_dir}" present="srconly"/>

Having said that, people don't necessarily want to rewrite their filesets 
in terms of selectors just to find obsolete files. Perhaps the usability 
benefits make it worth adding fileset references to <present> (and 
<depend>, I guess) for 1.6.

Anyone else have an opinion on this?

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

View raw message