What's the right way to use token replacement for my Ant builds?
 
We have a few files common to all environments and currently maintain a set of 
these files per environment -- xml files, property files, and a web.xml per 
environment not identical.  The files contain mostly static information except 
such variables as the urls or db connection and usrid/pw which change per 
environment.  Currently we retain a few sets of these files per environment, 
e.g. db.connections.qa, db.connections.uat, web.xml.qa, web.xml.dev, etc & 
their corresponding ant value in build.xml would be db.connections.${env}, 
where env equals qa, dev,  etc, and then I pass the qa or uat  parameters to 
the build.xml during the Ant compile process as -Denv=qa and generate a war 
file with their corresponding property files and web.xml per environment.
 
Would it be better, for the sake of automation consistency or cleanliness, for 
files whose values do vary per environment, to come up with one base or master 
file, such as db.connections or web.xml, and some of the values in each file 
which change for each environment to have token values @UID@ or @PASSWORD@, 
etc. And each master file has 3 or 4 environment related property files holding 
the actual values?
 
What's the best way to address this issue?
 
Thanks
 
 
_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits.
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009

Reply via email to