ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: Help : Properties in For- Each Task
Date Fri, 03 Oct 2003 08:00:52 GMT
The foreach in target "check1" does not have the attribute
"inheritall" set to true. The default for this is false.

Peter
On Thursday 02 October 2003 22:55, Vikas Phonsa wrote:
> Hi,
>
> 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
> targets.
>
> <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="autocheckout.properties"/>
>                <property name="cvsdestin" value="cool"/>
>         <foreach list="${name.list}" delimiter="," param="name"
> target="check1" inheritall="true"/>
>     </target>
>
>     <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="check2.name">
>       <path>
>         <dirset dir="${root}" includes="*"/>
>       </path>
>     </foreach>
>     </target>
>
>  <target name="check2">
>         <echo> cvsroot = ${check2.name} </echo>
> 	 <echo> cvsdestyyyy = ${cvsdestin} </echo>
>
>     </target>
>
>
> Thanks
>
> Vikas PHonsa
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


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


Mime
View raw message