You can invoke macros easily from Java or Groovy. Groovy is easier, but if you want to write a task, it isn't too difficult. You can check out the various macroforeach tasks around to get an idea of what you need to do. Or just invoke it from groovy like:

<groovy>
ant."${x}"(...)
</groovy>

Pretty certain that is the correct syntax, but you might want to verify that in the groovy docs.
-bp


On Mar 24, 2009, at 6:35 AM, Felix Dorner wrote:

Hi Ant users,

I have three macros: a, b, c, and a property 'x'. Is there a way to execute the macro ${x}, i.e. a if ${x}=a, b if ${x}=b, c if ${x}=c, (fail otherwise) with ant core? Something like <macroExec macro="$ {x}"/>

Thanks,
Felix

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to