>Which are the ant API we should use to know if a macro with name xyz is >defined or not.. > >for knowing the existing of targets I can use project.getTargets() to check >out is there a similar thing for macros.
<project> <macrodef name="mymacro"> <sequential/> </macrodef> <script language="javascript"> <![CDATA[ if (project.createTask("mymacro") == null) { project.log("mymacro does NOT exist"); } else { project.log("mymacro does exist"); } if (project.createTask("mymacro2") == null) { project.log("mymacro2 does NOT exist"); } else { project.log("mymacro2 does exist"); } ]]></script> </project> mymacro does exist mymacro2 does NOT exist BUILD SUCCESSFUL Jan --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org