From e64467f9c0436598a01b38c39f040e9a8d0f27d7 Mon Sep 17 00:00:00 2001
From: Peter Reilly
Date: Mon, 16 Jun 2003 09:28:29 +0000
Subject: [PATCH] Added the mapper unpackage PR: 18908 Obtained from: Brad
Clark Submitted by: Peter Reilly
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274671 13f79535-47bb-0310-9956-ffa450edef68
---
WHATSNEW | 3 +
docs/manual/CoreTypes/mapper.html | 24 +++++-
.../org/apache/tools/ant/types/Mapper.java | 4 +-
.../tools/ant/util/UnPackageNameMapper.java | 85 +++++++++++++++++++
.../ant/util/UnPackageNameMapperTest.java | 76 +++++++++++++++++
5 files changed, 190 insertions(+), 2 deletions(-)
create mode 100644 src/main/org/apache/tools/ant/util/UnPackageNameMapper.java
create mode 100644 src/testcases/org/apache/tools/ant/util/UnPackageNameMapperTest.java
diff --git a/WHATSNEW b/WHATSNEW
index 6c806aed7..7be2cb179 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -410,6 +410,9 @@ Bugzilla Report 19180.
* config attribute added to set the location of a specific PVCS .cfg file
Bugzilla Report 9752
+* has an "unpackage" mapper
+ Bugzilla Report 18908
+
Changes from Ant 1.5.2 to Ant 1.5.3
===================================
diff --git a/docs/manual/CoreTypes/mapper.html b/docs/manual/CoreTypes/mapper.html
index ab077ef69..359201b10 100644
--- a/docs/manual/CoreTypes/mapper.html
+++ b/docs/manual/CoreTypes/mapper.html
@@ -365,9 +365,31 @@ with <uptodate>
and <junit>
output.
ignored |
+
+ This mapper is the inverse of the package mapper.
+ It replaces the dots in a package name with directory separators. This
+ is useful for matching XML formatter results against their JUnit test
+ test cases. The mapper shares the sample syntax
+ as the glob mapper.
+
+Example:
+
+<mapper type="unpackage"
+ from="TEST-*Test.xml" to="${test.src.dir}/*Test.java">
+
+
+
+ Source file name |
+ Target file name |
+
+
+ TEST-org.acme.AcmeTest.xml |
+ ${test.src.dir}/org/acme/AcmeTest.java |
+
+
-Copyright © 2000-2001 Apache Software Foundation. All rights
+
Copyright © 2000-2003 Apache Software Foundation. All rights
Reserved.