ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kitching Simon <>
Subject RE: replace task
Date Wed, 01 Nov 2000 17:33:40 GMT
> -----Original Message-----
> From:	Jonathan Carlson []
> Sent:	Wednesday, November 01, 2000 6:08 PM
> To:	''
> Subject:	replace task
> Moving on...  ;-)
> Based on the documentation, it looks like the current replace task takes a
> *single* transformation (i.e. token/value) and applies it to *many* files.
> What I need is a task that will take *many* transformations (like from a
> properties file) and apply them to a *single* file (like a script
> template).
> Is there a task I missed that does this or do we need to write one?  If
> so,
> it seems similar enough to the current replace task that maybe they should
> be incorporated into the same task.
	[Kitching Simon]  
	I'd like to see this feature added too...

	The functionality of doing multiple replaces is sort of what
"filters" do,
	but filters only apply when copying a file around.

	I presume you're trying to do what I want: substitute a batch of
	into a tree full of files. In my case, after installing a web-app
into tomcat,
	I need to set JDBC params, and other stuff in web.xml. However,
	are also other things I need to tweak, like changing a stylesheet
	so testing/production look different.

	I ended up writing a perl script to do this (which you're welcome to
	if you email me). It takes a .properties-format file, like


	and modifies the installed document tree.

	PS: if anyone has a better solution for this problem, please
	let me know!! This works ok, but doesn't feel quite right.

> Jonathan
> Jonathan Carlson,  Software Developer 
> Such ever was loves way: to rise, it stoops.   
>      - Robert Browning 

View raw message