Todd, Charles Tewksbury posted a task for this (which I have attached below). I'll try to have a look at committing it this weekend. Charles' posting is copied below:
Conor > -----Original Message----- > From: Charles Tewksbury [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 17 May 2000 2:32 > To: [EMAIL PROTECTED] > Subject: ReplaceMultiple Task > > > Greetings, > > I have included a new taskdef for replacing a string in all files in a > directory and subdirectories. It is generally based on the Replace task. > > Usage: > <replacemultiple > basedir="${some.dir}" > token="lookForTerm" > value="replaceWithTerm" > /> > > It actually extends MatchingTask vice Task and the default.properties file > would be modified by adding: > replacemultiple=org.apache.tools.ant.taskdefs.ReplaceMultiple > > Being relatively new to ANT, I'm not sure if this taskdef has already been > built and is awaiting inclusion but since I can't find one in the > repository, I am sending this out for review. > > - Charles W. Tewksbury > > > > -----Original Message----- > From: Todd McGrath [mailto:[EMAIL PROTECTED] > Sent: Friday, 23 June 2000 1:31 > To: [EMAIL PROTECTED] > Subject: multiple files with Replace task > > > Hi everybody- > > I need replace multiple strings in *multiple* .java > files, but unable to use the Replace task. It seems > as if I need to specify each individual file and > cannot work on a directory tree of files? > > Has anyone else ran into this? > > Any thoughts? > > (I don't think KeySubst task will work, because file > name needs ot remain the same) > > I'll be happy to try to write a new task for this type > of functionality, but wanted to check with the list > first. > > -Todd > > __________________________________________________ > Do You Yahoo!? > Send instant messages with Yahoo! Messenger. > http://im.yahoo.com/ >
ReplaceMultiple.java
Description: Binary data
