ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: can ant write to property file?
Date Sat, 28 Aug 2004 01:05:07 GMT
"Yiling Lu" <> wrote ..
> I want to let ant write a name/value pair to the property file, is there
> a way to do this?

property files are just files....

if u want to find and replace a value in an existing property file just use the <replace/>

or barring token replacement u need to match using regular expression

Ant has a variety of methods for finding and replacing stuff...for example you could load
a property file and filter as you go....

one lo tech method you may use <echo/> to write to a file

lastly if you use XML property files you could use a deep copy xslt identity transformation...replacing
only the XML you want.....

gl, Jim Fuller

View raw message