Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想创建一个自定义的 ant 任务,它从文件中读取以获取列表参数,然后遍历列表以使用列表项作为参数来调用宏定义。如何使用参数在 cumstom ant 任务中调用宏定义?
在您的自定义任务中,您可以调用
org.apache.tools.ant.taskdefs.MacroInstance macro = (org.apache.tools.ant.taskdefs.MacroInstance) getProject().createTask("myMacroName"); macro.setDynamicAttribute("name", value); macro.execute();