Cari di Apache Ant 
    Apache Ant User Manual
Daftar Isi
(Sebelumnya) FailFixCRLF (Berikutnya)
Apache Ant Tasks

Filter

Filter

Description

Sets a token filter for this project or read multiple token filter froman input file and sets these as filters.Token filters are used by all tasks that perform file copying operationsthrough the Project commodity methods. See the warninghere before using.

Note 1: the token string must not contain the separators chars (@).
Note 2: Either token and value attributes must be provided, or only thefiltersfile attribute.

Parameters

Attribute Description Required
token the token string without @ Yes*
value the string that should be put to replace the token when the file is copied Yes*
filtersfile The file from which the filters must be read. This file must be a formatted as a property file. Yes*

* see notes 1 and 2 above parameters table.

Examples

  <filter token="year" value="2000"/>  <copy todir="${dest.dir}" filtering="true"> <fileset dir="${src.dir}"/>  </copy>

will copy recursively all the files from the src.dir directory intothe dest.dir directory replacing all the occurrences of the string @year@with 2000.

  <filter filtersfile="deploy_env.properties"/>
will read all property entries from the deploy_env.properties fileand set these as filters.
(Sebelumnya) FailFixCRLF (Berikutnya)