You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2005/04/22 12:38:56 UTC
DO NOT REPLY [Bug 34569] -
add a new task named "macrocall"
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34569>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=34569
------- Additional Comments From jan@materne.de 2005-04-22 12:38 -------
Using <target>s instead of <macrodef> a
<antcall target="test${version}"/>
would work.
I played a little ... that should work
<project>
<macrodef name="test1" >
<attribute name="moduleName" />
<sequential>
<echo>Test 1</echo>
</sequential>
</macrodef>
<macrodef name="test2" >
<attribute name="moduleName" />
<sequential>
<echo>Test 2</echo>
</sequential>
</macrodef>
<macrodef name="test3" >
<attribute name="moduleName" />
<sequential>
<echo>Test 3</echo>
</sequential>
</macrodef>
<scriptdef name="caller" language="javascript">
<attribute name="modulename" />
<attribute name="version" />
<![CDATA[
modulename = attributes.get("modulename");
version = attributes.get("version");
task = project.createTask("test" + version);
task.setDynamicAttribute("modulename", modulename);
task.perform();
]]>
</scriptdef>
<echo> Direct Call </echo>
<test1 moduleName="mod"/>
<test2 moduleName="mod"/>
<test3 moduleName="mod"/>
<echo> Indirect Call </echo>
<caller version="1" moduleName="mod"/>
<caller version="2" moduleName="mod"/>
<caller version="3" moduleName="mod"/>
</project>
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org