sure here it is :

<!-- the 'myVar' variable gets the right value inside the sequential tag,
but not in the called target.
 it keeps always the same value in there despite the 'unset' ???  -->

       <target name="forTest">
                <for param="package">
                   <path>
                     <fileset dir="folder" includes="*.zip"/>
                   </path>

                   <sequential>
                                <echo message="current package : @{package} "/>
                                <var name="myVar" value="@{package}"/>
                                <echo message="my var is  : ${myVar} "/>
                                <call target="runtargetTest2"/>
                                <unset name="myVar"/>
                   </sequential>
                 </for>
        </target>

        

        <target name="runtargetTest2">
                
                <echo message="Running test2 . package is : ${myVar}.."/>
                
        </target>

thank you

-- 
View this message in context: 
http://www.nabble.com/Call-a-target-with-parameter--tp12050352p21610828.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to