git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270486 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -340,6 +340,32 @@ jakarta-ORO and finally try jakarta-regexp.</li> | |||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| <h4><a name="package-mapper">package</a></h4> | |||||
| <p>Sharing the same syntax as the <a href="#glob-mapper">glob mapper</a>, | |||||
| the package mapper replaces | |||||
| directory separators found in the matched source pattern with dots in the target | |||||
| pattern placeholder. This mapper is particularly useful in combination | |||||
| with <code><uptodate></code> and <code><junit></code> output.</p> | |||||
| <b>Example:</b> | |||||
| <blockquote><pre> | |||||
| <mapper type="package" | |||||
| from="*Test.java" to="TEST-*Test.xml"/> | |||||
| </pre></blockquote> | |||||
| <table border="1" cellpadding="2" cellspacing="0"> | |||||
| <tr> | |||||
| <td valign="top"><b>Source file name</b></td> | |||||
| <td valign="top"><b>Target file name</b></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td valign="top"><code>org/apache/tools/ant/util/PackageMapperTest.java</code></td> | |||||
| <td valign="top"><code>TEST-org.apache.tools.ant.util.PackageMapperTest.xml</code></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td valign="top"><code>org/apache/tools/ant/util/Helper.java</code></td> | |||||
| <td valign="top">ignored</td> | |||||
| </tr> | |||||
| </table> | |||||
| <hr> | <hr> | ||||
| <p align="center">Copyright © 2000,2001 Apache Software Foundation. All rights | <p align="center">Copyright © 2000,2001 Apache Software Foundation. All rights | ||||
| Reserved.</p> | Reserved.</p> | ||||
| @@ -258,10 +258,13 @@ public class Mapper extends DataType implements Cloneable { | |||||
| "org.apache.tools.ant.util.MergingMapper"); | "org.apache.tools.ant.util.MergingMapper"); | ||||
| implementations.put("regexp", | implementations.put("regexp", | ||||
| "org.apache.tools.ant.util.RegexpPatternMapper"); | "org.apache.tools.ant.util.RegexpPatternMapper"); | ||||
| implementations.put("package", | |||||
| "org.apache.tools.ant.util.PackageNameMapper"); | |||||
| } | } | ||||
| public String[] getValues() { | public String[] getValues() { | ||||
| return new String[] {"identity", "flatten", "glob", "merge", "regexp"}; | |||||
| return new String[] {"identity", "flatten", "glob", | |||||
| "merge", "regexp", "package"}; | |||||
| } | } | ||||
| public String getImplementation() { | public String getImplementation() { | ||||