ant-user mailing list archives

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

I respect your opinion. Just to clarify -- the base property file contains
only environment independent settings while the environment specific
property files contain only settings specific to the target environment. In
other words, the latter is not supposed to override the former, rather it
extends the former.

For example, there are two settings: date format and log file path -- the
first one is the same across all environment and the second is environment
specific. If we name the property file as "abc.properties", then

1. date format setting will go to "abc.properties".
2. log file path setting for DEV will go to "abc.dev.properties", for INT,
it will go to "abc.int.properties", for PROD, it will go to
"abc.prd.properties", ... and so forth and so on.

So there is no overlap between "abc.properties" and "abc.dev.properties" and
you do NOT need to maintain the same setting in both files. Yes, the log
file path setting for different environment will reside in different files
-- this way all the settings for all the environments can be checked into
the source control system.

When you say "just copy a.dev.properties to a.properties and that's the end
of it", I assume you mean doing it manually. But whole idea is to have all
the subprojects follow the same scheme so that merging base settings with
environment specific settings can be done at the build time by an Ant script
automatically as opposed to by each developer manually.

Thanks.

Eric Fetzer wrote:
> 
> I really don't like the concept of managing multiple sets of the same
> source code for different environments.  If I have a.properties and
> a.dev.properties, I then need to maintain the same thing in multiple
> places and WILL screw up.  If that's a game that you're willing to play,
> just copy a.dev.properties to a.properties and that's the end of it. 
> Personally, I just keep a.properties and modify settings of that file
> based on what it should be for different environments.
> 

-- 
View this message in context: http://www.nabble.com/Merge-base-settings-with-environment-specific-ones-tp23524997p23529305.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Mime
View raw message