ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vikas Phonsa <>
Subject Help : Properties in For- Each Task
Date Thu, 02 Oct 2003 21:55:50 GMT

In my build file I'm setting a property named cvsdestin in the default
target. Then I'm using the for-each task of ant-contrib to call other

<property name="cvsdestin" value="cool"/>

If I echo out the value of ${cvsdestin} in the first target (check1) called
thru foreach then it prints "cool".

Now check1 target calls another target named check2 thru foreach and if I
echo ${cvsdestin} in check2 I just get "${cvsdestin}" and not "cool".

Everything else is working fine. 

Any ideas ??

    <target name="main">
                <property file=""/>
               <property name="cvsdestin" value="cool"/>	
        <foreach list="${name.list}" delimiter="," param="name"
target="check1" inheritall="true"/>

    <target name="check1">
        <!-- Get the properties ${name}.* -->
        <propertycopy name="root" from="${name}.root" silent="true"/>
        <propertycopy name="dest" from="${name}.checkoutdir" silent="true"/>
	<property name="cvsdest" value="cool"/>       
        <echo> root = ${root} </echo>
        <echo> dest = ${dest} </echo>
	 <echo> cvsdestin = ${cvsdestin} </echo>

<foreach target="check2" param="">
        <dirset dir="${root}" includes="*"/>

 <target name="check2">              
        <echo> cvsroot = ${} </echo>
	 <echo> cvsdestyyyy = ${cvsdestin} </echo>  


Vikas PHonsa

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message