ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henning Waack <henning.wa...@gmx.de>
Subject Re: AW: XML and copy directories
Date Tue, 08 Feb 2005 09:08:33 GMT
Hello Jan.

Jan.Materne@rzf.fin-nrw.de wrote:
> Maybe that is a good start for your work...
> 
> Jan

Thanks very much for your help, this looks great to me! :) 
Right now, I am still not sure if I will use Ant, but this 
seems to be a good start!

bye

Henning

> build.xml
> ---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<
> ----
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <project name="test" basedir="." default="main">
>     <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
>     <target name="main">
>         <xmlproperty file="data.xml"/>
>         <delete dir="${data(todir)}"/>
>         <mkdir dir="${data(todir)}"/>
>         <for list="${data.dir}" param="srcdir">
>             <sequential>
>                 <copy todir="${data(todir)}" includeEmptyDirs="false">
>                     <fileset dir="@{srcdir}"/>
>                     <mapper type="regexp" from="(.*\\)*(.*)"
> to="\1@{srcdir}-\2"/>
>                 </copy>
>             </sequential>
>         </for>
>     </target>
> </project>
> ---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<
> ----
> 
> 
> data.xml
> ---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<
> ----
> <data todir="dest">
>   <dir>dir1</dir>
>   <dir>dir2</dir>
> </data>
> ---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<


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


Mime
View raw message