source: other-projects/trunk/realistic-books/packages/AntInstaller/web/manual/manual/CoreTasks/filter.html@ 19253

Last change on this file since 19253 was 19253, checked in by davidb, 15 years ago

Establishing a source code repository for Veronica's Realistic Book's software

File size: 2.9 KB
Line 
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
30an input file and sets these as filters.
31Token filters are used by all tasks that perform file copying operations
32through 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>
35Note 2: Either token and value attributes must be provided, or only the
36filtersfile 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> &lt;filter token=&quot;year&quot; value=&quot;2000&quot;/&gt;
65 &lt;copy todir=&quot;${dest.dir}&quot; filtering=&quot;true&quot;&gt;
66 &lt;fileset dir=&quot;${src.dir}&quot;/&gt;
67 &lt;/copy&gt;</pre>
68<p>will copy recursively all the files from the <i>src.dir</i> directory into
69the <i>dest.dir</i> directory replacing all the occurrences of the string <i>@year@</i>
70with <i>2000.</i></p>
71<pre> &lt;filter filtersfile=&quot;deploy_env.properties&quot;/&gt;</pre>
72will read all property entries from the <i>deploy_env.properties</i> file
73and set these as filters.
74
75
76
77</body>
78</html>
79
Note: See TracBrowser for help on using the repository browser.