ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject Re: v1.3 -- problems retrieving properties from <property file="SOMEF ILE">
Date Wed, 02 May 2001 12:06:22 GMT
From: "Diane Holt" <>
> --- Nico Seessle <> wrote:
> > > (Maybe this should go in the FAQ.)
> > >
> > The better place would be Bugzilla with a little testcase :-) So we can
> > fix that and don't need to describe wrong behaviour...
> As I recall, it may not be fixable -- I think it has to do with the order
> in which properties get set. That is, if you have something like:
> root.dir=/my/tree
> out.dir=${root.dir}/classes
> you will likely get a log message saying that property root.dir isn't
> Conor could probably explain it in more detail.

OK, when reading in from a properties file, you can ignore this message :-)

What happens is this:

The properties are read in as a Properties object. They are then read out
with an enumeration and added to Ant's collection of properties. The order
of properties returned by that enumeration is, in general, not the same as
the order of the properties in the file. So, there may effectively be
forward references in the order returned by the enumeration. When this
occurs, Ant will print this message but then resolve the forward reference
within the properties object from the properties file.

In other words, properties in a properties file are more declarative than
those in a build file :-).

Now I agree that the warning there is a problem. The reason I left it in,
however, is that it is generally very difficult to catch use of properties
which are not set. I'll probably get rid of it now.

So, to the original poster, if you ignore the messages, can you check that
the values are actually being set correctly.

Sorry for the confusion.


View raw message