From 03302b660a12f5673cc7b3d750e80948064b82fb Mon Sep 17 00:00:00 2001
From: Diane Holt FilterSets are groups of filters. Filters can be defined as token value pairs
+ FilterSets are groups of filters. Filters can be defined as token-value
+pairs
or be read in from a file. FilterSets can appear inside tasks that support this
-feature or at the same level as Filterset
+FilterSet
-target
- i.e., as children of
-project
.
Filtersets are used for doing
-replacements in tasks like copy etc.
+feature or at the same level as <target>
- i.e., as
+children of
+<project>
.
In addition, FilterSets can specify
+begintoken
and/or
+endtoken
attributes to define what to match.
Filtersets are used for doing
+replacements in tasks such as <copy>
, etc.
@date@
).@date@
).@date@
)Thursday, April 26, 2001
).You are copying the version.txt file to the dist directory from the build directory -but wish to replace the token @DATE@ with todays date.
+You are copying the version.txt
file to the dist
+directory from the build
directory
+but wish to replace the token @date@
with today's date.
--<copy file="${build.home}/version.txt" toFile="${dist.home}/version.txt"> +<copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt"> <filterset> - <filter token="DATE" value="${DATE}"/> + <filter token="date" value="${TODAY}"/> </filterset> </copy>
You are copying the version.txt file to the dist directory from the build directory -but wish to replace the token %DATE* with todays date.
+You are copying the version.txt
file to the dist
+directory from the build directory
+but wish to replace the token %date*
with today's date.
-<copy file="${build.home}/version.txt" toFile="${dist.home}/version.txt"> +<copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt"> <filterset begintoken="%" endtoken="*"> - <filter token="DATE" value="${DATE}"/> + <filter token="date" value="${TODAY}"/> </filterset> </copy>
Copy all the docs but change all dates and appropriate notices as stored in a file.
-<copy toDir="${dist.home}/docs" > - <fileset dir="${build.home}/docs"> +<copy toDir="${dist.dir}/docs" > + <fileset dir="${build.dir}/docs"> <include name="**/*.html"> </fileset> <filterset begintoken="%" endtoken="*"> - <filter token="DATE" value="${DATE}"/> - <filtersfile file="${user.home}/dist.properties"/> + <filtersfile file="${user.dir}/dist.properties"/> </filterset> </copy>
Copyright © 2001 Apache Software Foundation. All rights -Reserved.