Bug 32725 - Default value for macrodef element parameter
Summary: Default value for macrodef element parameter
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.6.1
Hardware: PC Windows XP
: P2 enhancement with 3 votes (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL: http://stackoverflow.com/q/731351
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-16 00:51 UTC by Kohsuke Kawaguchi
Modified: 2011-11-15 09:42 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kohsuke Kawaguchi 2004-12-16 00:51:26 UTC
Currently, elements of a macrodef cannot have default values,
even though attributes can have them.

It would be nice if I can write something like:

<macrodef name="foo">
  <element name="a" optional="true">
    <some />
    <tasks />
  </element>
  <sequential> ... </sequential>
</macrodef>

so that the following two invocations would be equivalent:

<foo>
  <a>
    <some />
    <tasks />
  </a>
</foo>

<foo />  <!-- the nested 'a' element defaulted -->