1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
5
<TITLE>Ant User Manual</TITLE>
6
<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
7
<META http-equiv="Content-Language" content="en-us">
8
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
12
<H2><A name="fileset">Filterset</A></H2>
14
<P>FilterSets are groups of filters. Filters can be defined as token value pairs
15
or be read in from a file. FilterSets can appear inside tasks that support this
16
feature or at the same level as <CODE>target</CODE> - i.e., as children of
17
<CODE>project</CODE>.</P>In addition, Filtersets can have begintoken and/or
18
endtoken attributes to define what to match. <BR>Filtersets are used for doing
19
replacements in tasks like copy etc.<BR>
23
<TABLE cellSpacing=0 cellPadding=2 border=1>
25
<TD vAlign=top><B>Attribute</B></TD>
26
<TD vAlign=top><B>Description</B></TD>
27
<TD vAlign=top><B>Default</B></TD>
28
<TD vAlign=top align="center"><B>Required</B></TD>
31
<TD vAlign=top>begintoken</TD>
32
<TD vAlign=top>The string marking the beginning of a token. eg
33
<STRONG>@</STRONG>Date@</TD>
35
<TD vAlign=top align="center">No</TD>
38
<TD vAlign=top>endtoken</TD>
39
<TD vAlign=top>The string marking the end of a token. eg
40
@Date<STRONG>@</STRONG></TD>
42
<TD vAlign=top align="center">No</TD>
47
<TABLE cellSpacing=0 cellPadding=2 border=1>
49
<TD vAlign=top><B>Attribute</B></TD>
50
<TD vAlign=top><B>Description</B></TD>
51
<TD vAlign=top align="center"><B>Required</B></TD>
54
<TD vAlign=top>token</TD>
55
<TD vAlign=top>The token to replace eg @<STRONG>Date</STRONG>@</TD>
56
<TD vAlign=top align="center">Yes</TD>
59
<TD vAlign=top>value</TD>
60
<TD vAlign=top>The value to replace it with eg Thursday, April 26, 2001</TD>
61
<TD vAlign=top align="center">Yes</TD>
66
<TABLE cellSpacing=0 cellPadding=2 border=1>
68
<TD vAlign=top><B>Attribute</B></TD>
69
<TD vAlign=top><B>Description</B></TD>
70
<TD vAlign=top align="center"><B>Required</B></TD>
73
<TD vAlign=top>file</TD>
74
<TD vAlign=top>The file to load tokens from should be a properties file of
75
name value pairs.</TD>
76
<TD vAlign=top align="center">Yes</TD>
82
<p>You are copying the version.txt file to the dist directory from the build directory
83
but wish to replace the token @DATE@ with todays date.</p>
85
<copy file="${build.home}/version.txt" toFile="${dist.home}/version.txt">
87
<filter token="DATE" value="${DATE}"/>
92
<p>You are copying the version.txt file to the dist directory from the build directory
93
but wish to replace the token %DATE* with todays date.</p>
95
<copy file="${build.home}/version.txt" toFile="${dist.home}/version.txt">
96
<filterset begintoken="%" endtoken="*">
97
<filter token="DATE" value="${DATE}"/>
102
<p>Copy all the docs but change all dates and appropriate notices as stored in a file.</p>
104
<copy toDir="${dist.home}/docs" >
105
<fileset dir="${build.home}/docs">
106
<include name="**/*.html">
108
<filterset begintoken="%" endtoken="*">
109
<filter token="DATE" value="${DATE}"/>
110
<filtersfile file="${user.home}/dist.properties"/>
117
<P align=center>Copyright © 2000,2001 Apache Software Foundation. All rights
118
Reserved.</P></BODY></HTML>