Home » Apache Ant Filter Task

Apache Ant Filter Task

by Online Tutorials Library

Apache Ant Filter Task

The filter tasks are token filters which are used by all tasks which uses copy task. This task uses @ as a token separator.

Apache Ant Filter Task Attributes

Attribute Description Required
token Set a token string without the separator chars @. Yes
value the string that should be put to replace the token when the file is copied.
filtersfile The file from which the filters must be read.

Apache Ant Filter Task Example

Copy all the files from the src.dir directory into the dest.dir directory by filtering all the occurrences of the string @[email protected] with 2009.

// build.xml

Read property file

The below example will read all the properties from property file.

You may also like