ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Drynda <...@pineridge.co.uk>
Subject Re: overwriting property specified in different files.
Date Wed, 09 Jul 2008 17:15:44 GMT
André Pilz <andre.pilz@pcvisit.de> wrote:
> ...
> that is standard behaviour for ant. The first property definition wins. 
> A simple solution for this example is to load the second property file 
> first.
> ...

That's exactly how we do it.

We have a default configuration held in a properties file.

Users (including the Test/UAT/CruiseControl/Staging/Production/etc users) each have a properties
file which contains a subset of the default configuration - i.e. just the parts they need
to change in order to develop/test/debug on their own systems/workstations/sand-boxes.

When Ant is run, first the User's properties file is loaded. Next, the default properties
file is loaded.

This has the following advantages (in no particular order):
    * User?s properties are the only ones that need to be customised for a particular user?s
instance.
    * Minimal configuation for a new user
    * New properties added during development can be moved to default properties once they
have been tested. Default properties are then propagated out without each user having to change
their own properties file every time something changes.

The bottom line is that a user doesn't have to make sure that their properties file contains
a full set of properties all of the time. If a new property is added during development, once
it is propagated in to the default properties file and checked in to the repository (along
with the associated code, one assumes) it is available for everyone after the next update
from the repository.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message