ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <erikhatc...@earthlink.net>
Subject Re: Copy and Replace
Date Fri, 07 Sep 2001 20:03:32 GMT
You can do a copy/replace in one step without affecting the original file
like this:

        <copy file="web.xml" filtering="true" todir="${build.dir}"/>

Use the <filter> task to set up the replacement strings and tokenize your
source file with the appropriate format (see the <filter> and <copy>
documentation for more details).

----- Original Message -----
From: "Christian Cryder" <christianc@enhydra.org>
To: "Ant-User" <ant-user@jakarta.apache.org>
Sent: Friday, September 07, 2001 12:25 PM
Subject: Copy and Replace


> I need to copy files into a new directory, and I'd like to perform a
replace
> on various string values they might contain in the process.
>
> Since the Replace task is a fileset, I'm pretty sure I can pass that as an
> argument to the copy task. However, will the copy occur without actually
> changing the original files? Or does the replace happen on the original
> files prior to the copy occuring?
>
> To accomplish what I'm after, do I need to do it in two steps: copy, then
> replace?
>
> Thanks,
> Christian
> ------------------------------------------------
> Christian Cryder [christianc@enhydra.org]
> Barracuda - MVC Component Framework for Webapps
> http://barracuda.enhydra.org
> ------------------------------------------------
>         "What a great time to be a Geek"
>


Mime
View raw message