1 | <!--
|
---|
2 | Licensed to the Apache Software Foundation (ASF) under one or more
|
---|
3 | contributor license agreements. See the NOTICE file distributed with
|
---|
4 | this work for additional information regarding copyright ownership.
|
---|
5 | The ASF licenses this file to You under the Apache License, Version 2.0
|
---|
6 | (the "License"); you may not use this file except in compliance with
|
---|
7 | the License. You may obtain a copy of the License at
|
---|
8 |
|
---|
9 | http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 |
|
---|
11 | Unless required by applicable law or agreed to in writing, software
|
---|
12 | distributed under the License is distributed on an "AS IS" BASIS,
|
---|
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
14 | See the License for the specific language governing permissions and
|
---|
15 | limitations under the License.
|
---|
16 | -->
|
---|
17 | <html>
|
---|
18 |
|
---|
19 | <head>
|
---|
20 | <meta http-equiv="Content-Language" content="en-us">
|
---|
21 | <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
---|
22 | <title>Filter Task</title>
|
---|
23 | </head>
|
---|
24 |
|
---|
25 | <body>
|
---|
26 |
|
---|
27 | <h2><a name="filter">Filter</a></h2>
|
---|
28 | <h3>Description</h3>
|
---|
29 | <p>Sets a token filter for this project or read multiple token filter from
|
---|
30 | an input file and sets these as filters.
|
---|
31 | Token filters are used by all tasks that perform file copying operations
|
---|
32 | through the Project commodity methods. See the warning
|
---|
33 | <a href="../using.html#filters"><em>here</em></a> before using.</p>
|
---|
34 | <p>Note 1: the token string must not contain the separators chars (@).<br>
|
---|
35 | Note 2: Either token and value attributes must be provided, or only the
|
---|
36 | filtersfile attribute.</p>
|
---|
37 |
|
---|
38 | <h3>Parameters</h3>
|
---|
39 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
40 | <tr>
|
---|
41 | <td valign="top"><b>Attribute</b></td>
|
---|
42 | <td valign="top"><b>Description</b></td>
|
---|
43 | <td align="center" valign="top"><b>Required</b></td>
|
---|
44 | </tr>
|
---|
45 | <tr>
|
---|
46 | <td valign="top">token</td>
|
---|
47 | <td valign="top">the token string without @</td>
|
---|
48 | <td align="center" valign="top">Yes*</td>
|
---|
49 | </tr>
|
---|
50 | <tr>
|
---|
51 | <td valign="top">value</td>
|
---|
52 | <td valign="top">the string that should be put to replace the token when the
|
---|
53 | file is copied</td>
|
---|
54 | <td align="center" valign="top">Yes*</td>
|
---|
55 | </tr>
|
---|
56 | <tr>
|
---|
57 | <td valign="top">filtersfile</td>
|
---|
58 | <td valign="top">The file from which the filters must be read. This file must be a formatted as a property file. </td>
|
---|
59 | <td align="center" valign="top">Yes*</td>
|
---|
60 | </tr>
|
---|
61 | </table>
|
---|
62 | <p>* see notes 1 and 2 above parameters table.</p>
|
---|
63 | <h3>Examples</h3>
|
---|
64 | <pre> <filter token="year" value="2000"/>
|
---|
65 | <copy todir="${dest.dir}" filtering="true">
|
---|
66 | <fileset dir="${src.dir}"/>
|
---|
67 | </copy></pre>
|
---|
68 | <p>will copy recursively all the files from the <i>src.dir</i> directory into
|
---|
69 | the <i>dest.dir</i> directory replacing all the occurrences of the string <i>@year@</i>
|
---|
70 | with <i>2000.</i></p>
|
---|
71 | <pre> <filter filtersfile="deploy_env.properties"/></pre>
|
---|
72 | will read all property entries from the <i>deploy_env.properties</i> file
|
---|
73 | and set these as filters.
|
---|
74 |
|
---|
75 |
|
---|
76 |
|
---|
77 | </body>
|
---|
78 | </html>
|
---|
79 |
|
---|