Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 15137 invoked from network); 13 Oct 2005 04:55:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Oct 2005 04:55:33 -0000 Received: (qmail 98433 invoked by uid 500); 13 Oct 2005 04:55:32 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 98141 invoked by uid 500); 13 Oct 2005 04:55:30 -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 98130 invoked by uid 99); 13 Oct 2005 04:55:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Oct 2005 21:55:30 -0700 Received-SPF: pass (asf.osuosl.org: local policy) Received: from [210.245.32.200] (HELO mail.fts-vn.com) (210.245.32.200) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Oct 2005 21:55:32 -0700 Received: from [172.16.1.13] (helo=[172.16.1.13]) by mail.fts-vn.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1EPv7T-0000N8-1a for dev@ant.apache.org; Thu, 13 Oct 2005 11:55:07 +0700 Message-ID: <434DE8F8.5070301@it.fts-vn.com> Date: Thu, 13 Oct 2005 11:56:24 +0700 From: Kev Jackson User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Developers List Subject: Re: Quick question about properties References: <434DD845.50802@it.fts-vn.com> <87zmpeqckx.fsf@www.samaflost.de> In-Reply-To: <87zmpeqckx.fsf@www.samaflost.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.8 {--} X-Spam-Report: Spam detection software, running on the system "mail.fts-vn.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Stefan Bodewig wrote: >On Thu, 13 Oct 2005, Kev Jackson wrote: > > > >>However if I try to run the project buildfile (./build.xml), none of >>the properties are available (quick checks with echo just give me >>variables instead of expanded properties). >> >> > >This is not what I've seen in the past. Properties declared in the >imported build file just worked as expected. Are you sure your >property file is loaded at all? > > > As promised here's a small example where a property from the common/build.properties is being referenced in the project.properties and it doesn't get expanded - inline and attached as Zip file for convenience [...] Content analysis details: (-2.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.8 ALL_TRUSTED Did not pass through any untrusted hosts X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Stefan Bodewig wrote: >On Thu, 13 Oct 2005, Kev Jackson wrote: > > > >>However if I try to run the project buildfile (./build.xml), none of >>the properties are available (quick checks with echo just give me >>variables instead of expanded properties). >> >> > >This is not what I've seen in the past. Properties declared in the >imported build file just worked as expected. Are you sure your >property file is loaded at all? > > > As promised here's a small example where a property from the common/build.properties is being referenced in the project.properties and it doesn't get expanded - inline and attached as Zip file for convenience ./common/build.xml common/build.properties a="Hello" ./build.xml ./project.properties b=${a}", Hello, Hello" Output Buildfile: build.xml init: [echo] "Hello" from common/build.properties hello: [echo] ${a}", Hello, Hello" from project.properties, "Hello" from common/build.properties However (having just read an email about order of properties) with ./build.xml Everything works fine! So (a little counter-intuitively I think). The imported file seems to be placed in situ (with respect to properties), and I cannot reference a common property in a project properties file unless I import the file *before*. I read all the documents, and there's this big thing about imported files being added to the end of the file - it's stressed in the manual IIRC, but if this is so, then I'd never be able to access the properties as they'd always come after my reference to them. I think I just confused myself! ;) It's behaving here as if it was inline - which is fine, just very unexpected Kev --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org