ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ludwig, Michael" <Michael.Lud...@delphi-mb.de>
Subject RE: simplify copy with regexpmapper (mapper/regexp)
Date Sat, 18 Sep 2010 15:43:52 GMT
> Here's working code:
> 
> <project default="copy">
>   <property name="source.dir" location="src"/>
>   <property name="target.dir" location="lib"/>
>   <target name="copy">
>     <copy todir="${target.dir}">
>       <fileset dir="${source.dir}">
>         <include name="*/lib/**/*.*"/>
>         <exclude name="**/urmel.*"/>
>       </fileset>
>       <regexpmapper handledirsep="yes"
>         from="^[-_a-zA-Z0-9]+/lib/(.*)"
>           to="\1" />
>     </copy>
>   </target>
> </project>

One more observation is that the <mapper> is also a "grepper"
(as in "map" and "grep" in Perl), i.e. a filter defining a match
constraint on the input and excluding non-matching content from
the operation.

Michael
Mime
View raw message