ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Fetzer <elstonk...@yahoo.com>
Subject Re: Merge base settings with environment specific ones
Date Wed, 13 May 2009 19:54:07 GMT
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.




________________________________
From: nagish <jiang.lin@citi.com>
To: user@ant.apache.org
Sent: Wednesday, May 13, 2009 1:20:58 PM
Subject: Re: Merge base settings with environment specific ones


Thanks Eric. What you did certainly is one of the options. I was wondering if
the same thing could also be done with Ant built-in capabilities. One thing
I'm not sure is that once the script gets a set of base setting files, i.e.
those that don't have environment tag embedded in their names, how it can
iterate through the set to pair each base file with the corresponding
environment specific one, i.e. "a.properties" with "a.dev.properties",
"b.properties" with "b.dev.properties", ... etc, so that each pair of files
can be merged together to form a new setting file to be packaged into the
application that is being built...


Eric Fetzer wrote:
> 
> Yeah, the NAnt script would use the <exec> task to call the program with
> the argument specifying what environment it was building from.  So in Ant
> terms:
> 
> <for list="dev,qa,uat,prod" param="environment">
>     <exec dir="." executable="configure.exe">
>           <arg line="@{environment}"/>
>     </exec>
>     <now configs are set correctly so you stage it for deploy and package
> it for that environment using your favorite installation tool/>
> </for>
> 

-- 
View this message in context: http://www.nabble.com/Merge-base-settings-with-environment-specific-ones-tp23524997p23528278.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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message