ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Fetzer <>
Subject Re: Merge base settings with environment specific ones
Date Wed, 13 May 2009 16:28:22 GMT
<properties file=""/>
<properties file=""/>

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 <>
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:


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 "" with "" and
"" with "", ... 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:
Sent from the Ant - Users mailing list archive at

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