macro = ...createTask(...); for(...) { macro.setDynamic(...) macro.execute(); }
This should work. My example reused that too (1st with default value, 2nd run with custom value). You have to ensure that no required values are "deleted" in further runs. But if all runs require the setting of the same parameters (maybe with different values) this should be enough. Jan >-----Ursprüngliche Nachricht----- >Von: Raja Nagendra Kumar [mailto:nagendra.r...@tejasoft.com] >Gesendet: Donnerstag, 3. September 2009 10:10 >An: dev@ant.apache.org >Betreff: Re: AW: how to call a predefined target or macroin >build.xml from Custom Ant task > > >Thank You Jon, this rocks.. > >instead of createTask() every time, is there a way to reuse the already >existing one (either may be created by xml files or with in >other script >file..) > >Not sure how memory and cpu intesive is createTask() specially >when it is >for loop (in our case this macro is run many times). > >Regards, >Raja Nagendra Kumar >TejaSoft > > >-- >View this message in context: >http://www.nabble.com/how-to-call-a-predefined-target-or-macroi >n-build.xml-from-Custom-Ant-task-tp25260761p25271525.html >Sent from the Ant - Dev mailing list archive at Nabble.com. > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org >For additional commands, e-mail: dev-h...@ant.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org