<properties file="abc.dev.properties"/> <properties file="abc.properties"/>
The first statement will load in all of the env dependant properties. The second will load in all of the others. Someone correct me if I'm wrong, but I don't believe the second statement will overwrite any of the properties that were already set by the first because you would have to "unset" those properties first. This seemed like a bug to me, but I'm sure it's by design... ________________________________ From: nagish <[email protected]> To: [email protected] Sent: Wednesday, May 13, 2009 10:11:23 AM Subject: Merge base settings with environment specific ones In my project some settings are environment dependent and others are not. We decided to partition these different settings into different files. The file naming convention is such that a file that contains environment independent settings can be named as anything with the "properties" extension while a file that contains environment dependent settings will have the target environment embedded in the name right before the "properties" extension. For example: abc.properties abc.dev.properties abc.int.properties abc.prd.properties xyz.properties xyz.dev.properties xyz.int.properties xyz.prd.properties ... Now at the build time, I want to run an Ant script for a target environment so that each environment independent setting file will be merged with its corresponding one for that particular environment. Continuing with the above example, suppose we are running the dev build, I want the Ant script to merge "abc.properties" with "abc.dev.properties" and "xyz.properties" with "xyz.dev.properties", ... etc. Of course, the actual property files names are unknown to the Ant script at the time when the Ant script is written. I would like to get some help on how to write an Ant script like this. Thanks very much. -- View this message in context: http://www.nabble.com/Merge-base-settings-with-environment-specific-ones-tp23524997p23524997.html Sent from the Ant - Users mailing list archive at Nabble.com.
