ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Rich" <>
Subject RE: Using replace
Date Thu, 08 Apr 2004 18:50:36 GMT
In the manual is a description of Replace that says
"Replace is a directory based task for replacing the occurrence of a given string with
another string in selected file.

If you want to replace a text that crosses line boundaries, you must use a nested
<replacetoken> element.

The output file is only written if it differs from the existing file. This prevents
spurious rebuilds based on unchanged files which have been regenerated by this task."

So if this is what you want to do you simply code the appropriate set of attributes (also
described in the manual) and replace will do what it is supposed to do.  There are also
some examples in the manual.  It is not difficult to figure out if you read the manual and
work with the examples.

If this is not what you want to do then you need to provide a better description of your
specific requirements after reading the manual to see if there is anything that may do
what you want to do.

I have been using Ant for about 2 months and _all_ my questions have been answered by
reading the manual and trying it out.
Thanks.  Bill

Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA  95120-3905
phone:      +1 408 268-2452
mobile:     +1 408 410-9713
Santa Cruz: +1 831 464-9007
fax:        +1 413 669-9716 or

-----Original Message-----
From: Sunil Ravipati []
Sent: Thursday, April 08, 2004 11:25 AM
Subject: Using replace

How do I use replace to replace a value or set a value of properties in a property file .


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message