ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Woehr <...@purematrix.com>
Subject Re: Property Task -- Nested Property Composition
Date Fri, 21 May 2004 18:06:18 GMT
Peter Reilly wrote:

> see:
> http://ant.apache.org/faq.html#propertyvalue-as-name-for-property
>

Thanks, Peter .. this is the second time the Macrodef task has really saved my bacon when
I planned on
Ant doing something it doesn't actually do :-) Here's what I ended up with:

         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
         <!-- Composition of some properties based on .properties files sourced by build.xml
                             -->
         <!-- Allows you define a new property with a value of ${a.${b}} which can't be
done by the Property task alone.  -->
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
         <macrodef name="macro.compose-property">
             <attribute name="name"/>
             <attribute name="stem"/>
             <attribute name="selector"/>
             <sequential>
                 <property name="@{name}" value="${@{stem}.@{selector}}"/>
             </sequential>
         </macrodef>

--
Jack J. Woehr            # "[F]ar in the empty sky a solitary esophagus slept
http://www.well.com/~jax #  upon motionless wing; everywhere brooded stillness,
http://www.softwoehr.com #  serenity, and the peace of God." - Mark Twain




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message