ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Inger <>
Subject [PATCH] new tasks: PropertyCopy ForEach
Date Wed, 22 Aug 2001 13:57:34 GMT
attached are two new tasks that i have written:

PropertyCopy - gives you the ability to copy the value of a named property
   to another property (sort of a double - dereference, since referring 
to something
   like "${org.${org}.name}" would be illegal in ant)

    <property name="" value="My Organization" />
    <property name="org" value="my_org" />
    <propertycopy name="MyName" from="org.${org}.name" />

ForEach - Iterates over a seperated list (default seperator is ','), and 
calls a
   particular target once for each item in the list, which the item as a 
   (the name of the parameter is an attribute that you supply)

    <target name="my_target">
      <echo message="${message}" />

    <foreach list="a,b,c" target="my_target" param="message" />

Matt Inger (
Sedona Corporation
455 S. Gulph Road, Suite 300
King of Prussia, PA 19406
(484) 679-2213
"Self-respect - the secure feeling that no one,
 as yet, is suspicious." -H.L. Mencken 

View raw message