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 reduce the number of filesets in copy task
Date Tue, 02 Oct 2001 20:01:14 GMT
--- otisg@ivillage.com wrote:
> > <fileset dir="${src.dir}">
> >   <include name="ApacheJServ/**/*.java"/>
> >   <include name="HTTPClient/**/*.java"/>
> >   <include name="dnsjava/**/*.java"/>
> >   <include name="ecs/src/java/**/*.java"/>
> > </fileset>
> 
> Hello Diane,
> 
> The problem with this is that when you surround those filesets with a
> copy task (as above) the new dir structure will include
> ...ApacheJServ/..., ...HTTPClient/...., etc.
> 
> I am trying to only copy all dirs and .java files below those
> directories, and exclude the directories themselves...
> 
> Is that possible?

You could add a <mapper> after the <fileset> end-tag to strip off the
first directory element:

      <mapper type="regexp" from="^[\w]+[/\\](.*\.java)" to="\1"/>

Diane



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



__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com

Mime
View raw message