FilterSet DataType
The
filterset DataType was introduced in Ant 1.4, and
allows for the definition of groups of filters. These filters
(implemented by the filter task) perform text
substitution in files as they are moved or copied. This is known as
token filtering. The text substitution occurs
when certain tokens are found in the input files. As the files are
moved or copied, the tokens are replaced by text defined in the
matching filter. Prior to Ant 1.4, the filter task
always used @ characters as token delimiters.
filterset allows you to customize the beginning
and ending token delimiters.
The filterset DataType is represented by the
<filterset> element.
<filterset> elements may appear as nested
content within the copy and
move tasks, or as target-level buildfile elements
(i.e., children of <project>). Following are
the allowable filterset attributes:
-
begintoken(1.4, String, N) The string marking the beginning of a token that nested filters search for. Defaults to
@.-
endtoken(1.4, String, N) The string marking the end of a token that nested filters search for. Defaults to
@.-
id(1.4, String, N) A unique identifier for this filter. This is required when the filter is defined as a target-level buildfile element and must be referenced later.
-
refid(1.4, Reference, N) A reference to a filter defined elsewhere in the buildfile.
A filterset may also contain the following:
- 0..n nested
<filter>elements (1.4) Each nested
<filter>element defines a token and the replacement text.<filter> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access