ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types Mapper.java
Date Sun, 30 Dec 2001 14:32:59 GMT
ehatcher    01/12/30 06:32:59

  Modified:    docs/manual/CoreTypes mapper.html
               src/main/org/apache/tools/ant/types Mapper.java
  Log:
  added package mapper as an official mapper type
  
  Revision  Changes    Path
  1.9       +26 -0     jakarta-ant/docs/manual/CoreTypes/mapper.html
  
  Index: mapper.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTypes/mapper.html,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- mapper.html	7 Dec 2001 10:55:25 -0000	1.8
  +++ mapper.html	30 Dec 2001 14:32:59 -0000	1.9
  @@ -340,6 +340,32 @@
     </tr>
   </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>&lt;uptodate&gt;</code> and <code>&lt;junit&gt;</code>
output.</p>
  +<b>Example:</b>
  +<blockquote><pre>
  +&lt;mapper type="package"
  +        from="*Test.java" to="TEST-*Test.xml"/&gt;
  +</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>
   <p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All
rights
   Reserved.</p>
  
  
  
  1.8       +4 -1      jakarta-ant/src/main/org/apache/tools/ant/types/Mapper.java
  
  Index: Mapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/Mapper.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Mapper.java	13 Dec 2001 11:53:43 -0000	1.7
  +++ Mapper.java	30 Dec 2001 14:32:59 -0000	1.8
  @@ -258,10 +258,13 @@
                                   "org.apache.tools.ant.util.MergingMapper");
               implementations.put("regexp", 
                                   "org.apache.tools.ant.util.RegexpPatternMapper");
  +            implementations.put("package", 
  +                                "org.apache.tools.ant.util.PackageNameMapper");
           }
   
           public String[] getValues() {
  -            return new String[] {"identity", "flatten", "glob", "merge", "regexp"};
  +            return new String[] {"identity", "flatten", "glob", 
  +                                 "merge", "regexp", "package"};
           }
   
           public String getImplementation() {
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message