|
FilterSetFilterSets 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 FilterSets support the In addition, FilterSets can specify
Filtersets are used for doing
replacements in tasks such as Filterset
Filter
Filtersfile
ExamplesYou are copying the <copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt"> <filterset> <filter token="DATE" value="${TODAY}"/> </filterset> </copy> You are copying the <copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt"> <filterset begintoken="%" endtoken="*"> <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.dir}/docs"> <fileset dir="${build.dir}/docs"> <include name="**/*.html"> </fileset> <filterset begintoken="%" endtoken="*"> <filtersfile file="${user.dir}/dist.properties"/> </filterset> </copy> Define a FilterSet and reference it later. <filterset id="myFilterSet" begintoken="%" endtoken="*"> <filter token="DATE" value="${TODAY}"/> </filterset> <copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt"> <filterset refid="myFilterSet"/> </copy> Copyright © 2001-2002 Apache Software Foundation. |