ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Amerige <>
Subject Filtering Macrodef Elements
Date Wed, 25 Jan 2012 11:51:47 GMT
Hi all,

I'm looking to filter a macrodef element before it gets interpreted so as to change it's behavior.
 Here's an example of what I'm 
talking about:

<target name="myentrypoint">
<%{mytask} %{myattribute}="%{myvalue}"/>

In other words, I want the definition of mymacro to do *token substitution *on the (implicit)
element body and then have that 
changed body executed.  (The token substitution algorithm, in my case, is not a simple replacement
procedure but requires some more 
complex processing, in case that matters to this question.)

Here are my limitations:

1.  My target is being called by some other Ant code.  I do not have any control of what happens
before I'm called, nor can I change 
how Ant was invoked or do any compilation.

2. Once in my target, I can use Groovy scriptdefs, Ant-Contrib, and anything that comes with
Ant 1.7.

Can anyone suggest how this might be done?  I did read "Developing with Apache Ant, Writing
Your Own Task 
<>," but I'm not sure if this helps considering
what I have available to me.  I'm hoping 
that since I have Groovy (essentially, Java), that something might still be possible.

Any ideas?

Many thanks,
Steve Amerige
SAS Institute, Deployment Software Development

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message