At 12:06 PM 1/15/2002 -0800, Diane Holt wrote:
>See bug #1733 in the bugs database -- a couple of alternative approaches
>were suggested, as well as a little task that allows for dereferencing:
>   http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1733

The suggestion there for a fixed set of property files (which is actually 
the technique I use in a modular build system but I didn't recommend 
because it turns out to be a little cumbersome), leads to another generic 
approach for dynamic property names which doesn't require any optional tasks:

<?xml version="1.0"?>
<project name="dynamicproperty" basedir="." default="main">
    <target name="init">
      <property name="a" value="aaa"/>
      <property name="b" value="bbb"/>
      <property name="c" value="${a}.${b}"/>
      <property name="aaa.bbb" value="x"/>
      <echo file="dynamicproperties.tmp">
         d=$${${c}}
      </echo>
      <property file="dynamicproperties.tmp"/>
    </target>

    <target name="main" depends="init">
      <echo>
         Property 'd' value is "${d}".
      </echo>
    </target>
</project>

That is a little gross but is a direct solution to the originally posed 
problem.

jim

----------------------------------------------------------------
James P. White     Pagesmiths' home is http://www.pagesmiths.com
Live free http://www.ushistory.org/franklin/quotable/quote04.htm
Try Kawa, the Java-based Scheme http://www.gnu.org/software/kawa


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to