ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 17782] - expandproperties not substituting within same file
Date Wed, 12 Mar 2003 16:58:51 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17782>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17782

expandproperties not substituting within same file





------- Additional Comments From bodewig@apache.org  2003-03-12 16:58 -------
No, unrelated.

This bug here has a rather simple reason.  The expandproperties filter gets to
read the file line by line and ask the project instance for defined properties.
loadproperties in turn will read the entire file, before setting any properties
in the project.  This means, the project won't know about the properties in the
file before it has been read completely.

This is rather tedious to fix as the filter must not keep track of the properties
it has already read as a filter coming later in the chain may cancel out the
line defining the property.

Making loadproperties read the file line by line may not solve the problem either
as we may have filters in the chain that have to read multiple lines at once
to do their job.  If they read four lines further just to realize they can
pass up a certain line, property expansion wouldn't work for these four lines
and an expandproperties filter that gets invoked first (hope I haven't lost you).

I don't see a solution ATM (otherwise the bug would have been assigned to
myself).  If loading a property file and expanding properties that have been
defined in the file on the fly is all you need, <property file="..."/> currently
looks like the better alternative.

Mime
View raw message