ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: Copying based on fileset
Date Wed, 16 Jul 2003 05:19:39 GMT
Doesn´t that work?

<!-- all 'maybe-old' files -->
<copy todir="${new.dir}">
    <fileset dir="${src.dir}" />
</copy>

<!-- all patches -->
<copy todir="${new.dir}">
    <fileset dir="${patch.dir}">
    <mapper type="glob" from="*.java.patch" to="*.java"/>
</copy>


Jan


> -----Original Message-----
> From: Kyle Adams [mailto:kadams@gfs.com]
> Sent: Tuesday, July 15, 2003 10:07 PM
> To: user@ant.apache.org
> Subject: Copying based on fileset
> 
> 
> I'd like to write an ant file that, as part of the build 
> process, would apply X number of patches to their 
> corresponding files.  The source files are interspersed among 
> other non-patched files, hence the first thing I need to do 
> is copy the source files out of their src directory based on 
> the patch name.
> 
> For example:
> 
> I have patches/A.java.patch.  My src directory has A.java and 
> B.java.  I'd like to have Ant scan the patches directory 
> (because I may have an arbitrary number of patches in there), 
> map *.java.patch to *.java, and use the resulting list as the 
> fileset for copying from my src directory to my dest directory.
> 
> A.java.patch -> A.java, meaning A.java is copied out of src 
> while B.java is left behind.
> 
> I've looked at Mappers and Filters (of all types), but I'm 
> not seeing anything to do what I'd like to do.
> 
> Any ideas?
> 
> Kyle
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message