Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
foreach expanding properties

foreach expanding properties

2005-05-18       - By Rebhan, Gilbert


Hi,

i'm just testing what kind of syntax in my propertyfile is
suitable when using the <foreach> task in antcontrib.

so far i have
propertysyntax :

modul.1=FirstModul
modul.1.version=1_2_3

i also tried ${modul.1}.version

modul.2=SecondModul
modul.2.version=0_2_3
modul.3=ThirdModul
modul.3.version=1_3_1
modul.list=${modul.1},${modul.2},${modul.3}

with snippet :

<foreach list="${modul.list}" delimiter="," param="modul" target="test"
inheritall="true"/>
   </target>

   <target name="test">

    <echo>${modul}</echo>

works fine, giving me the names of the moduls,

but

<echo>${modul}= $${modul.version}</echo>
or
<echo>${modul}= ${modul.version}</echo>

gives me only

[echo] FirstModul=${modul.version}

when i want to get the version expanded too.

Question = how to alter the propertysyntax or buildscript to get the
version expanded ?

Any hints ?

Gilbert

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.