import-bot (20211) [Avatar] Offline
[Originally posted by azure]


We use a properties-file to control our application. We have one
properties-file that contains default values ( The
developer/deployer can override values in this file by setting a property -
merge.prefix - to some value.

If merge.prefix is set to "my", then the file will be
merged with and the resulting file copied to the destination

This procedure is used to build releases for development, acceptans, testing,
production environments etc.

We've written a custom ANT-task to do this, and it works nicely. But -
something tells me that this could be done with the standard ANT-tasks... If
it can, how?

Best Regards //Anders
import-bot (20211) [Avatar] Offline
Re: Merging property files
[Originally posted by erikhatcher]

There was a task written for Jetspeed (by Eric Pugh) that will merge property
files, but there is no
good way to do this with Ant out of the box. You can probably do some things
<propertyfile> and <property file="...">, but it won't be as good as a custom
peter_h (3) [Avatar] Offline
Re: Merging property files
Try using <exec> call to an external software that can edit the XML file. For instance, I'm experimenting with XML-Starlet. A bit clunky but works.