ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r349207 - /ant/core/trunk/docs/manual/CoreTasks/apply.html
Date Sun, 27 Nov 2005 11:22:53 GMT
Author: jhm
Date: Sun Nov 27 03:22:42 2005
New Revision: 349207

Example for STDIN/STDOUT redirection and supressing the passing of the filename.
Needs update when DD patches <apply> ;-)


Modified: ant/core/trunk/docs/manual/CoreTasks/apply.html
--- ant/core/trunk/docs/manual/CoreTasks/apply.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/apply.html Sun Nov 27 03:22:42 2005
@@ -141,7 +141,7 @@
     <td valign="top">errorproperty</td>
-    <td valign="top">The name of a property in which the standard error of the 
+    <td valign="top">The name of a property in which the standard error of the
       command should be stored.  <em>since&nbsp;Ant&nbsp;1.6</em></td>
     <td align="center" valign="top">No</td>
@@ -239,7 +239,7 @@
     commands in the user's path, set this to false.
     <td align="center" valign="top">No, default is <i>false</i></td>
-  </tr>                     
+  </tr>
     <td valign="top">maxparallel</td>
     <td valign="top">Limit the amount of parallelism by passing at
@@ -290,7 +290,7 @@
 <h4>Any other <a href="../CoreTypes/resources.html#collection">Resource
-<p><em>since Ant 1.7</em></p> 
+<p><em>since Ant 1.7</em></p>
 <p>You can use any number of nested resource collections.</p>
@@ -407,8 +407,29 @@
 Applies the "ls" executable to all directories in the PATH, effectively
 listing all executables that are available on the PATH.
+&lt;apply executable="jsmin" addsourcefile="false"&gt;
+    &lt;!-- Collect the JS-files --&gt;
+    &lt;fileset dir="src" includes="*.js"/&gt;
+    &lt;redirector&gt;
+        &lt;!-- redirect STDIN; fileset collects relative to its dir, but we need --&gt;
+        &lt;!-- relative to basedir --&gt;
+        &lt;inputmapper type="glob" from="*" to="src/*"/&gt;
+        &lt;!-- redirect STDOUT to file in dest-dir --&gt;
+        &lt;outputmapper id="out" type="glob" from="*.js" to="dest/*.js"/&gt;
+    &lt;/redirector&gt;
+Conversion of the command <code>jsmin &lt; src/a.js &gt; dest/a.js</code>
but for
+all files in the src-directory. Because the filename itself should not be passed
+to the <code>jsmin</code> program, the <code>addsourcefile</code>
is set to
 <hr><p align="center">Copyright &copy; 2000-2005 The Apache Software Foundation.
All rights
\ No newline at end of file

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message