Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 16554 invoked from network); 4 Aug 2008 15:05:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Aug 2008 15:05:56 -0000 Received: (qmail 43612 invoked by uid 500); 4 Aug 2008 15:05:54 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 43577 invoked by uid 500); 4 Aug 2008 15:05:54 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 43566 invoked by uid 99); 4 Aug 2008 15:05:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Aug 2008 08:05:54 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ejciramella@upromise.com designates 12.197.7.59 as permitted sender) Received: from [12.197.7.59] (HELO transporter.corp.upromise.com) (12.197.7.59) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 04 Aug 2008 15:04:56 +0000 Received: from upromise.com (wssmtp.corp.upromise.com [172.22.144.104]) by transporter.corp.upromise.com (Postfix) with ESMTP id 9523D4A1A for ; Mon, 4 Aug 2008 11:05:21 -0400 (EDT) Received: from wssmtp ([127.0.0.1]) by upromise.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 4 Aug 2008 11:05:21 -0400 Received: from knight.corp.upromise.com ([172.22.144.78]) by wssmtp with Microsoft SMTPSVC(6.0.3790.3959); Mon, 4 Aug 2008 11:05:21 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Loading interdependent properties files WAS RE: Trying (and failing) to build the nightly snapshot Date: Mon, 4 Aug 2008 11:05:21 -0400 Message-ID: In-Reply-To: <930388.10706.qm@web55104.mail.re4.yahoo.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Loading interdependent properties files WAS RE: Trying (and failing) to build the nightly snapshot Thread-Index: Acj2QBpG/crGnHHWRMK7iqFaKLlJvQAAx19Q From: "EJ Ciramella" To: "Ant Developers List" X-OriginalArrivalTime: 04 Aug 2008 15:05:21.0680 (UTC) FILETIME=[83EF5100:01C8F643] X-Virus-Checked: Checked by ClamAV on apache.org How does ant choose which properties take precedence? So say db.port is defined in three properties files (default.properties, stack.properties and machine.properties). Generally, we'd load them in this order: Machine.properties Stack.properties Default.properties Developers re-use default.properties, the stack generally uses a certain port and finally, a particular machine (say a secondary machine) would use a third variation. How would that loadproperties task choose which one takes precedence? -----Original Message----- From: Matt Benson [mailto:gudnabrsam@yahoo.com]=20 Sent: Monday, August 04, 2008 10:40 AM To: Ant Developers List Subject: Loading interdependent properties files WAS RE: Trying (and failing) to build the nightly snapshot --- EJ Ciramella wrote: > Right - in an ideal world, sure.=20 >=20 > We're using ant for deployments and the first file > is the MOST specific > file, the secondary one is the more generic file. >=20 > So, in a nutshell, we can't alter the order of the > property files. >=20 > What is interesting though is if all the properties > are in the SAME > file, there's no problem (as all the expansion can > happen at once). Can > I do something with concat? or > something? >=20 > If concat could do something like, "first found > takes precedence but in > general add all the properties" that would be > perfect... >=20 In Ant 1.7.x, if you can "bundle" all your files, you should be able to them. HTH, Matt > -----Original Message----- > From: Steve Loughran [mailto:stevel@apache.org]=20 > Sent: Monday, August 04, 2008 9:48 AM > To: Ant Developers List > Subject: Re: Trying (and failing) to build the > nightly snapshot >=20 > EJ Ciramella wrote: > > I think I misunderstood this particular bug. It > appears to be a > problem > > with $${someprop} versus loading two property > files and the first one > > containing a ${property} that is set in the second > one loaded. > >=20 > > To be explicit, if you have two property files, > a.properties and > > b.properties, in the first one loaded you have a > ${property} that is > set > > in b.properties, ant leaves it as ${}. > >=20 > > a.properties: > >=20 > > foo=3Dbar > >=20 > > coolprop=3D${foo}:${from.b.properties} > >=20 > >=20 > >=20 > >=20 > >=20 > > b.properties: > >=20 > > from.b.properties=3Dawesome > >=20 > >=20 > >=20 > >=20 > > build.xml: > >=20 > > > > > > =20 > > > > This is a problem: > ${coolprop} > > > > > >=20 > > You'll see this: > >=20 > > This is a problem: bar:${from.b.properties} >=20 > That's because property expansion takes place when > the properties files=20 > are loaded. If you want properties from > b.properties, load it before=20 > a.properties >=20 >=20 >=20 >=20 > --=20 > Steve Loughran =20 > http://www.1060.org/blogxter/publish/5 > Author: Ant in Action http://antbook.org/ >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: > dev-unsubscribe@ant.apache.org > For additional commands, e-mail: > dev-help@ant.apache.org >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: > dev-unsubscribe@ant.apache.org > For additional commands, e-mail: > dev-help@ant.apache.org >=20 >=20 =20 --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org