You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Angeshwar Deepak <an...@yahoo.com> on 2004/08/03 11:41:16 UTC
Problem in using property
Hi,
I am using a foreach which passes the param to an ant
target.
<foreach list="logging" target="test.loop"
param="loop.var" inheritall="true"
inheritrefs="true"/>
<target name="test.loop">
<echo message="TEST1: loop.var=${loop.var}" />
<property name="loops.var" value="${loop.var}" />
<antcall target="init-props1" />
</target>
<!--I am calling another target where the property is
passed-->
<target name="init-props1">
<echo>*Project home: ${loops.var}*</echo>
</target>
The problem is I want to pass the value of property to
another target without using a <antcall target...
because in some other ant target I am using depend
for e.g.
...
<antcall target="examine-proj" />
...
<target name="examine-proj" depends="init-props1">
So the init-props1 runs first and only then
examine-proj, so this will result in a infinite loop,
i.e.
examine-proj will be called which calls again
init-props1 and so on.
So I want the param value property from foreach to be
accessible everywhere. How can this be done?
Somebody suggest some solution.
bye,
with regards,
Deepak.
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org