Or use a <macrodef> rather than <antcall>. There are very few reasons to still be using <antcall> anymore now that <macrodef> exists.
Jake Quoting "Conelly, Luis (GE Energy, Non GE, GENE)" <[EMAIL PROTECTED]>: > there's an Ant-Contrib feature... I think it's <antcallback> [1] which has > something related... > [1] http://ant-contrib.sourceforge.net/tasks/antcallback_task.html > > HTH > > -----Original Message----- > From: Sharad [mailto:[EMAIL PROTECTED] > Sent: Monday, October 11, 2004 11:45 AM > To: Ant Users List > Subject: How to get the return value from the <antcall /> > > > Hi, > > I want to create a target which can be called using <antcall />. But i want > to get the return value from the called target. Is there a way to get it? > > I tried using ant contrib's variable property using <ac:var .../> but the > property value is not returned from the called target. Follows is the code > snipped i tried : > > <project name="testing" default="args" > xmlns:ac="antlib:net.sf.antcontrib"> > <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> > > <ac:var name="ret" value="0"/> > <target name="args"> > <property name="argument1" value="one"/> > <antcall target="function"> > <param name="arg1" value="${argument1}"/> > </antcall> > <echo message="functionReturnvalue = ${ret}"/> > </target> > > <target name="function"> > <echo message="arg1 = ${arg1}"/> > <ac:if> > <ac:then> > <ac:var name="ret" value="1"/> > </ac:then> > <ac:else> > <ac:var name="ret" value="2"/> > </ac:else> > </ac:if> > </target> > </project> > > Thanks and Regards, > Sharad. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]