source: release-kits/lirk3/resources/gs3-release-maker/apache-ant-1.6.5/docs/manual/CoreTasks/filter.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 2.2 KB
Line 
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
14an input file and sets these as filters.
15Token filters are used by all tasks that perform file copying operations
16through the Project commodity methods.</p>
17<p>Note 1: the token string must not contain the separators chars (@).<br>
18Note 2: Either token and value attributes must be provided, or only the
19filtersfile 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> &lt;filter token=&quot;year&quot; value=&quot;2000&quot;/&gt;
48 &lt;copy todir=&quot;${dest.dir}&quot; filtering=&quot;true&quot;&gt;
49 &lt;fileset dir=&quot;${src.dir}&quot;/&gt;
50 &lt;/copy&gt;</pre>
51<p>will copy recursively all the files from the <i>src.dir</i> directory into
52the <i>dest.dir</i> directory replacing all the occurrences of the string <i>@year@</i>
53with <i>2000.</i></p>
54<pre> &lt;filter filtersfile=&quot;deploy_env.properties&quot;/&gt;</pre>
55will read all property entries from the <i>deploy_env.properties</i> file
56and set these as filters.
57
58<hr>
59<p align="center">Copyright &copy; 2000-2002,2004 The Apache Software Foundation. All rights
60Reserved.</p>
61
62</body>
63</html>
64
Note: See TracBrowser for help on using the repository browser.