From 9b8fa0748f63b3fa68ff20eb449699eaf1c6432f Mon Sep 17 00:00:00 2001
From: Stefan Bodewig
Date: Thu, 5 Dec 2013 17:19:24 +0000
Subject: [PATCH] Add nested propertyset to filterset. PR 55794. Submitted by
Richard Steele
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1548210 13f79535-47bb-0310-9956-ffa450edef68
---
CONTRIBUTORS | 1 +
WHATSNEW | 3 ++
contributors.xml | 4 +++
manual/Types/filterset.html | 16 +++++++++
.../org/apache/tools/ant/types/FilterSet.java | 27 ++++++++++++---
src/tests/antunit/types/filterset-test.xml | 33 +++++++++++++++++++
6 files changed, 80 insertions(+), 4 deletions(-)
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 9f184fd0e..172058b3b 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -295,6 +295,7 @@ Raphael Pierquin
Ray Waldin
Remie Bolte
Richard Evans
+Richard Steele
Rick Beton
Robert Anderson
Robert Clark
diff --git a/WHATSNEW b/WHATSNEW
index 7c1920c92..45a3fe70e 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -29,6 +29,9 @@ Other changes:
* Addition of 'skipNonTests' attribute to and
tasks to allow the tasks to skip classes that don't contain tests.
+ * now supports a nested to specify filters.
+ Bugzilla Report 55794.
+
Changes from Ant 1.9.1 TO Ant 1.9.2
===================================
diff --git a/contributors.xml b/contributors.xml
index 06cf723fb..9b663e7b6 100644
--- a/contributors.xml
+++ b/contributors.xml
@@ -1189,6 +1189,10 @@
Richard
Evans
+
+ Richard
+ Steele
+
Rick
Beton
diff --git a/manual/Types/filterset.html b/manual/Types/filterset.html
index 0ac198991..8b0dfe185 100644
--- a/manual/Types/filterset.html
+++ b/manual/Types/filterset.html
@@ -45,6 +45,9 @@ filters.
Filtersets are used for doing
replacements in tasks such as <copy>
, etc.
+Filters can also by specified by one or more nested propertysets, the
+ contents of which are applied when the filterset is created.
+
If you specify multiple values for the same token, the last one
defined within a filterset will be used.
@@ -181,4 +184,17 @@ but wish to replace the token %DATE*
with today's date.
<filterset refid="myFilterSet"/>
</copy>
+
+You are copying the version.txt
file to the dist
+directory from the build
directory
+but wish to replace the token @project.date@
with the property of the same name.
+
+<copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">
+ <filterset>
+ <propertyset>
+ <propertyref name="project.date"/>
+ </propertyset>
+ </filterset>
+</copy>
+