Augment

Since Apache Ant 1.8.1

Description

Modify an existing reference by adding nested elements or (re-)assigning properties mapped as XML attributes. This is an unusual task that makes use of Ant's internal processing mechanisms to reload a previously declared reference by means of the id attribute, then treats the declared augment element as though it were the original element.

Parameters

Attribute Description Required
id The id of the reference to augment. If no such reference has been declared a BuildException is thrown. Yes

Additional permissible attributes are dependent on the reference to be modified.

Parameters specified as nested elements

Permissible nested elements are dependent on the reference to be modified.

Examples

Given

<fileset id="input-fs" dir="${basedir}"/>

invocation

<augment id="input-fs" excludes="foo"/>

modifies the excludes attribute of input-fs, whereas

<augment id="input-fs">
  <filename name="bar"/>
</augment>

adds a filename selector to input-fs.