ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Carlton" <Carlton.Br...@BellSouth.com>
Subject RE: help with copy and glob mapper
Date Wed, 14 Dec 2005 03:04:37 GMT
> -----Original Message-----
> From: EJ Ciramella [mailto:ejciramella@upromise.com]
> Sent: Tuesday, December 13, 2005 3:54 PM
> To: user@ant.apache.org
> Subject: help with copy and glob mapper
> 
> We have a series of templates in a particular directory and I was
hoping
> to use copy/glob mapper/expand properties in order to move them into
the
> build directory AND rename them.  At a point, the directory paths are
> identical, so what I was hoping to do is something like this:
> 
>    <copy todir="target" verbose="true">
>     <fileset dir="source" includes="**/*"/>
>     <globmapper from="template-*" to="*"/>
>     <filterchain>
>       <expandproperties/>
>     </filterchain>
>   </copy>
> 
> But for whatever reason, this only picks up files at the top level
(things
> in source, but not source/somesubdir/someotherdir).
> 
> Is there a way to do this?

Hmmmm, I'm no expert but it looks like your mapper needs to reflect the
arbitrary directory depth by using **.
Can't lay my hands on any tested example code but see if some
combination like this is helpful:
<mapper type="glob" from="**/template-*" to="**/*"/>

or something like that, add stars or subtract stars to suit your
particular need.  and if that doesn't work, try pulling a little deeper
in your fileset if you don't have too many files.   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message