Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 70582 invoked from network); 13 May 2009 16:11:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 May 2009 16:11:55 -0000 Received: (qmail 40530 invoked by uid 500); 13 May 2009 16:11:54 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 40424 invoked by uid 500); 13 May 2009 16:11:53 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 40414 invoked by uid 99); 13 May 2009 16:11:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 May 2009 16:11:53 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 May 2009 16:11:44 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1M4H3D-0007er-D2 for user@ant.apache.org; Wed, 13 May 2009 09:11:23 -0700 Message-ID: <23524997.post@talk.nabble.com> Date: Wed, 13 May 2009 09:11:23 -0700 (PDT) From: nagish To: user@ant.apache.org Subject: Merge base settings with environment specific ones MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_53973_10545558.1242231083397" X-Nabble-From: jiang.lin@citi.com X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_53973_10545558.1242231083397 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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. ------=_Part_53973_10545558.1242231083397--