Darth_Punk - 2007-05-08

I am trying to get the example of the propertyselector task working, described in the ant-crontrib manual. Its about this example:

The following code
   
    <property name="package.ABC.name" value="abc pack name" />
    <property name="package.DEF.name" value="def pack name" />
    <property name="package.GHI.name" value="ghi pack name" />
    <property name="package.JKL.name" value="jkl pack name" />

    <propertyselector property="pack.list"
                         delimiter=","
                         match="package\.([^\.]*)\.name"
                         select="\1"
                         casesensitive="false" />  

would yield the results
   
    ABC,DEF,GHI,JKL 

You could then iterate through this list using the ForEach Task as follows:
   
    <foreach list="${pack.list}"
                delimiter=","
                target="print.name"
                param="pack.id" />

    <target name="print.name" >
      <propertycopy name="pack.name" value="package.${pack.id}.name" />
      <echo message="${pack.name}" />
    </target>

Would print
   
      [echo] abc pack name
      [echo] def pack name
      [echo] ghi pack name
      [echo] jkl pack name

however when i try tris on my dev box, i'm getting this error:

C:\projecten\Testproject\build.xml:186: The following error occurred while executing this line:
C:\projecten\Testproject\build.xml:194: Property 'package.GHI.name' is not defined.

I'm using Eclipse 3.2 as IDE, JDK 1.6 and Ant 1.7.0. I only changed the propertycopy task into
<propertycopy property="pack.name" from="package.${pack.id}.name" override="true" /> because, the name ATTRIBUTE does not accept the value attribute.
Does someone know what is wrong in the example?