ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Philion" <phil...@acmerocket.com>
Subject Some thoughts about runtime evaluation of properties
Date Tue, 25 Jul 2000 15:44:45 GMT
Greetings -

I would really prefer to see properties, including ${}, get evaluated
at runtime. I've been thinking about how that could be done.

- All properties are handled by Project, including any immutability,
etc.

- The Property task will simply setProperty on the Project. An
exception could be thrown, or the new property value could just be
ignored (Project will log it).

- A PropertySheet (or something like that) will handle storing the
properties. It will parse the ${} values and store special referring
properties that will not be evaluated until each getProperty request.

For example:
    <property name="lib.dir" value="${build.dir}/lib"/>

This will be stored (under the key "lib.dir") as a special object that
contain the "unresolved property" (build.dir) and the appended value
"/lib".

When code requests project.getProperty("lib.dir"), the PropertySheet
recognizes that the property is an unresolved (complex? dependant?)
property and does the immediate substitution before returning the
property.

- Paul


Mime
View raw message