2006-09-11 04:19:00 +00:00
|
|
|
<!--
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
2001-02-13 12:32:01 +00:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Language" content="en-us">
|
2005-04-29 18:58:16 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
2002-02-03 22:00:42 +00:00
|
|
|
<title>Filter Task</title>
|
2001-02-13 12:32:01 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
2018-01-22 23:52:21 +01:00
|
|
|
<h2 id="filter">Filter</h2>
|
2001-02-13 12:32:01 +00:00
|
|
|
<h3>Description</h3>
|
2018-03-04 10:36:45 +01:00
|
|
|
<p>Sets a token filter for this project or reads a properties file as multiple token filter
|
|
|
|
definitions and sets them. Token filters are used by all tasks that perform file copying operations
|
|
|
|
through the Project commodity methods. See the
|
|
|
|
warning <a href="../using.html#filters"><em>here</em></a> before using.</p>
|
2018-03-03 21:26:50 +01:00
|
|
|
<p>The task uses <q>@</q> as token separator. Token strings cannot contain separator characters;
|
|
|
|
incorrect tokens are ignored.</p>
|
2001-02-13 12:32:01 +00:00
|
|
|
|
|
|
|
<h3>Parameters</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<table class="attr">
|
2001-02-13 12:32:01 +00:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<th>Attribute</th>
|
|
|
|
<th>Description</th>
|
|
|
|
<th>Required</th>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>token</td>
|
2018-03-03 21:26:50 +01:00
|
|
|
<td>the token string without the separator chars (<q>@</q>)</td>
|
|
|
|
<td rowspan="3">Yes; either both <var>token</var> and <var>value</var>, or
|
|
|
|
only <var>filtersfile</var></td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>value</td>
|
2018-03-03 21:26:50 +01:00
|
|
|
<td class="left">the string that should be put to replace the token when the file is copied</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>filtersfile</td>
|
2018-03-03 21:26:50 +01:00
|
|
|
<td class="left">The file from which the filters must be read. This file must be a formatted as
|
|
|
|
a property file.</td>
|
2001-02-13 12:32:01 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<h3>Examples</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<pre>
|
|
|
|
<filter token="year" value="2000"/>
|
|
|
|
<copy todir="${dest.dir}" filtering="true">
|
|
|
|
<fileset dir="${src.dir}"/>
|
|
|
|
</copy></pre>
|
|
|
|
<p>will copy recursively all the files from the <samp>src.dir</samp> directory into
|
|
|
|
the <samp>dest.dir</samp> directory replacing all the occurrences of the string <code>@year@</code>
|
|
|
|
with <q>2000</q>.</p>
|
|
|
|
<pre><filter filtersfile="deploy_env.properties"/></pre>
|
|
|
|
<p>will read all property entries from the <samp>deploy_env.properties</samp> file and set these as
|
|
|
|
filters.</p>
|
2001-02-13 12:32:01 +00:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|