import-bot (20211) [Avatar] Offline
#1
[Originally posted by larsson2]

hi there,
i am looking for a way to replace a certain picec of data, the build version
number

e.g. "version 1.0.4"

in a html header file...i tried to use the replace task but have probelms
since this value in not constant and changes each time i do a build...can i
use replace to do this??

if not is there any way i can set the version number as a property which ANT
finds in the html file and then updates..

i.e. create a property called version.number in the html file
<td bgcolor="#ffff00" height="100" width="428"> "${version.number}" version
1.0.4

and set this property from within my properties file before i run the ANT
build..

version.number=<value i want>

any help would be gratefully appreciated.

thanks
charlie
import-bot (20211) [Avatar] Offline
#2
Re: the replace task
[Originally posted by steve_l]

yes, you can use properties in the arguments to replace. Indeed, you can put
them into any ant task attribute and nested text element. (if it takes a
string, it'll do property expansion, apart from a few like <Sql> that dont for
historical reasons.

you can also <copy> with a <filterset>; giving a list of things to filter.
This is good, as you rarely want to patch the in-situ originals.