| Calling a target from within a target and passing arguments... | Calling a target from within a target and passing arguments... 2005-06-22 - By Bijo Alex Thomas
Jan is right. Even <macrodef> has less performance overhead compared to <antcall> as <antcall> creates and initializes an altogether new project.
Regards, Bijo
_________________________________ Bijo Alex Thomas DSRC, 6, Smith Road, Chennai - 2 Mail: bijoalex@(protected) Website: http://dsrc.com
----- Original Message ----- From: <Jan.Materne@(protected)> To: <user@(protected)> Sent: Tuesday, June 21, 2005 11:15 AM Subject: AW: Calling a target from within a target and passing arguments...
I would use <macrodef>
<macrodef name="a"> <attribute name="x"/> <attribute name="y"/> <sequential> <echo>called 'a' with x='@{x}' and y='@{y}'</echo> </sequential> </macrodef>
<target name="b"> <a x="hello" y="world"/> </target>
needs Ant 1.6+
cheers Jan
>-----Urspr??ngliche Nachricht----- >Von: Jeffrey E Care [mailto:carej@(protected)] >Gesendet: Dienstag, 21. Juni 2005 00:06 >An: Ant Users List >Betreff: Re: Calling a target from within a target and passing >arguments... > >Check the manual for the <antcall> task. > >-- >Jeffrey E. Care (carej@(protected)) >WebSphere Build SWAT Team Lead >WebSphere Build Tooling Lead (Project Mantis) >https://w3.opensource.ibm.com/projects/mantis > > >"Santoshi, Vishal" <Vishal_Santoshi@(protected)> wrote on 06/20/2005 >05:56:05 PM: > >> Is it possible to call a target from within another target >and pass in >> arguments to the called target ? >> >> Or >> >> Is this possible? >> >> <target A> >> <!-- depends on args x and y --> >> </target> >> >> <target B> >> <!-- calls target A with two arguments that are intercepted by >> target A >as x and y--> >> </target> >
--------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
--------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|
 |