Perhaps you can achieve what you want using the MacroInstance methods (a subclass of Tasks) that you get from the method createTaskfor the macro, This is:
<macrodef name="my.macro">
<attribute name="attr1" default="NOT SET"/>
<sequential>
<echo message="attr1=@{attr1}" />
</sequential>
</macrodef>
<script language="javascript"><![CDATA[
var macro = project.createTask( "my.macro" );
macro.setDynamicAttribute( "attr1", "value_1" );
macro.execute();
]]></script>
It does this at startup:
[echo] attr1=value_1
source
share