ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: loadproperties gotcha
Date Thu, 17 Oct 2002 12:25:39 GMT
On Tue, 15 Oct 2002, John-Mason Shackelford <ShacJo@ncs.com> wrote:
> Stefan,
> 
>> Both tasks use Properties#load(InputStream)
> 
> Ah, then this explains the behavior. When Ant loads a property file
> it is just pulling key-value pairs out of a HashTable. When a
> property is previously defined normal substitution occurs so that:
> 
> my.property.one = foo
> my.property.two = ${my.property.one} bar

This works with <property> (because Ant takes two passes), like Erik
explains.

What you were talking about is using the same key twice in the same
properties file - and this is where my comment you cite applied to,
there is no (coded) difference between <loadproperty> and
<properties> as both would only see one of the values, and the
Property class of your VM has decided which one that is.

Stefan

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


Mime
View raw message