Brad O'Hearne wrote:

What is the generally accepted convention for handling builds where there are configuration files whose values are different depending upon the target platform being built for? For example, I may have a configuration file with JDBC URLs in it, and these values may be different depending upon whether I am building for a development environment, or a testing or production environment. Or, another example would be variations in web.xml files depending upon whether the WAR file will be deployed to a dev, test, or production environment. .

I generally try to avoid this scenario, because it's inevitable at some point that someone is going to put the test build into production by mistake, and your test database will become live, or vice versa.

Ideally installation specific config should go in an environment of some kind external to your build, possibly stored in a separate repository, or pointed to by environment variables.

In other words, it should be as hard as possible for the wrong config to go in the wrong place.

Regards,
Graham
--

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to