ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Hoppe <ho...@sitewaerts.de>
Subject Copy files up one folder
Date Sun, 01 Apr 2001 10:41:24 GMT
Hi,

I guess what I'm trying to do must be quite standard, but I did not figure
out how to do it yet...

In my project I have lot's of configuration files, deployment descriptors
etc. which contain deployment specific tokens. I keep these files in a
sub-folder called ant-templates on different places in the source tree, e.g.

-de
   -sitewaerts
     -futuna
       -ejb
	   -entity
	     -ant-templates
			ejb-jar.xml
			weblogic-ejb-jar.xml
			...
	   -session
	     -ant-templates
			ejb-jar.xml
			weblogic-ejb-jar.xml
			...
	   -gui
	     -ant-templates
			client-props.xml

When building the project, I want to copy all xml files from the
ant-templates folders to the next higher folder in the source tree and
replace the tokens. I think that something like this snippet should work,
but I don't know how to set a 'todir' which is relative to each of the
occurrences found.

  <filter filtersfile="deployment.properties" />
  <copy todir="???" filtering="true" overwrite="true"
preservelastmodified="true">
    <fileset dir="src" >
	<include name="**/ant-templates/*.xml" />
    </fileset>
  </copy>


My first thought, todir=".." did of course not work, as the todir is
relative to the basedir. 

Thanks for any help!

Daniel

Mime
View raw message