ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ckn...@onebox.com
Subject RE: Re: Iterate over "filelist" with java task?
Date Sat, 13 May 2006 00:25:47 GMT
Thank you for your reply, but it answered a question I didn't ask. I want to know what element
can be the parent of a <macrodef>, not which elements a <macrodef> can contain.
Let me list some examples:

Is a <macrodef> a child of <target>?
Is a <macrodef> a child of <project>?
Is a <macrodef> the child of some other element?
-- 
Charles Knell
cknell@onebox.com - email



-----Original Message-----
From:     Grant Lewis <ukchucktown@yahoo.com>
Sent:     Fri, 12 May 2006 19:16:38 -0400
To:       Ant Users List <user@ant.apache.org>
Subject:  Re: Iterate over "filelist" with java task?

A macrodef can pretty much include any other ant task between its
sequential tag.  Below is an example from the docs showing the macro
definition and a call to the macro. Pay close attention to the
<some-tasks/> tag and replace it with a tag named <some-files/> and you
get the general idea of a macro. When the macro is executed, the tags
between the sequential tags are executed and the elements in the macro
are replaced with the content between those tags when you call the
macro, enabling you to use different file sets, for example, when
executing a block of tags.

Grant

<macrodef name="testing">
   <attribute name="v" default="NOT SET"/>
   <element name="some-tasks" optional="yes"/>
   <sequential>
      <echo>v is @{v}</echo>
      <some-tasks/>
   </sequential>
</macrodef>

<testing v="This is v">
   <some-tasks>
      <echo>this is a test</echo>
   </some-tasks>
</testing>



cknell@onebox.com wrote:
> Thanks, I am using 1.6.5. I'v checked the docs but there's something missing. What is/are
the parent element/s of the <macrodef> and the resulting task?

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




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


Mime
View raw message