1 | <html>
|
---|
2 |
|
---|
3 | <head>
|
---|
4 | <meta http-equiv="Content-Language" content="en-us">
|
---|
5 | <title>Filter Task</title>
|
---|
6 | <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
|
---|
7 | </head>
|
---|
8 |
|
---|
9 | <body>
|
---|
10 |
|
---|
11 | <h2><a name="filter">Filter</a></h2>
|
---|
12 | <h3>Description</h3>
|
---|
13 | <p>Sets a token filter for this project or read multiple token filter from
|
---|
14 | an input file and sets these as filters.
|
---|
15 | Token filters are used by all tasks that perform file copying operations
|
---|
16 | through the Project commodity methods.</p>
|
---|
17 | <p>Note 1: the token string must not contain the separators chars (@).<br>
|
---|
18 | Note 2: Either token and value attributes must be provided, or only the
|
---|
19 | filtersfile attribute.</p>
|
---|
20 |
|
---|
21 | <h3>Parameters</h3>
|
---|
22 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
23 | <tr>
|
---|
24 | <td valign="top"><b>Attribute</b></td>
|
---|
25 | <td valign="top"><b>Description</b></td>
|
---|
26 | <td align="center" valign="top"><b>Required</b></td>
|
---|
27 | </tr>
|
---|
28 | <tr>
|
---|
29 | <td valign="top">token</td>
|
---|
30 | <td valign="top">the token string without @</td>
|
---|
31 | <td align="center" valign="top">Yes*</td>
|
---|
32 | </tr>
|
---|
33 | <tr>
|
---|
34 | <td valign="top">value</td>
|
---|
35 | <td valign="top">the string that should be put to replace the token when the
|
---|
36 | file is copied</td>
|
---|
37 | <td align="center" valign="top">Yes*</td>
|
---|
38 | </tr>
|
---|
39 | <tr>
|
---|
40 | <td valign="top">filtersfile</td>
|
---|
41 | <td valign="top">The file from which the filters must be read. This file must be a formatted as a property file. </td>
|
---|
42 | <td align="center" valign="top">Yes*</td>
|
---|
43 | </tr>
|
---|
44 | </table>
|
---|
45 | <p>* see notes 1 and 2 above parameters table.</p>
|
---|
46 | <h3>Examples</h3>
|
---|
47 | <pre> <filter token="year" value="2000"/>
|
---|
48 | <copy todir="${dest.dir}" filtering="true">
|
---|
49 | <fileset dir="${src.dir}"/>
|
---|
50 | </copy></pre>
|
---|
51 | <p>will copy recursively all the files from the <i>src.dir</i> directory into
|
---|
52 | the <i>dest.dir</i> directory replacing all the occurrences of the string <i>@year@</i>
|
---|
53 | with <i>2000.</i></p>
|
---|
54 | <pre> <filter filtersfile="deploy_env.properties"/></pre>
|
---|
55 | will read all property entries from the <i>deploy_env.properties</i> file
|
---|
56 | and set these as filters.
|
---|
57 |
|
---|
58 | <hr>
|
---|
59 | <p align="center">Copyright © 2000-2002,2004 The Apache Software Foundation. All rights
|
---|
60 | Reserved.</p>
|
---|
61 |
|
---|
62 | </body>
|
---|
63 | </html>
|
---|
64 |
|
---|