ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nagish <jiang....@citi.com>
Subject Merge base settings with environment specific ones
Date Wed, 13 May 2009 16:11:23 GMT

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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message