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=24756>. 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=24756 support property values containing refs to undefined properties Summary: support property values containing refs to undefined properties Product: Ant Version: 1.6Beta Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Core AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Once a property's value is set, it is never re-evaluated. If the initial value contains a reference to another not-yet-defined property, e.g.: <property name="foo.dir" value="${base.dir}/bar"/> ... <property name="base.dir" value="/usr/local"/> the second property's value is never substituted into the first's. This makes it difficult to implement non-trivial multi-project "default property" mechanisms that support overriding of the default property values. Here is an example: ========= build.xml CUT HERE ================= <?xml version="1.0"?> <project name="props-bug" default="show-bug"> <macrodef name="set-default-props"> <!-- Set default property values. More typically might be done in a separate project file that gets imported by multiple different development projects. --> <sequential> <property name="base.dir" value="/usr/local"/> <property name="foo.dir" value="${base.dir}/foo"/> </sequential> </macrodef> <target name="show-bug"> <!-- Override the default value of "foo.dir" without having to provide definition for "base.dir". This doesn't work because Ant doesn't re-evaluate "foo.dir"s value after it's initially set. --> <property name="foo.dir" value="${base.dir}/bar"/> <set-default-props/> <echo message="Expected value: /usr/local/bar"/> <echo message="Actual value: ${foo.dir}"/> </target> </project> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]