From d50de9f7dce40b076462c0ecbdacda4ab48d5867 Mon Sep 17 00:00:00 2001
From: Jan Materne
Date: Sun, 27 Nov 2005 11:22:42 +0000
Subject: [PATCH] Example for STDIN/STDOUT redirection and supressing the
passing of the filename. Needs update when DD patches ;-)
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@349207 13f79535-47bb-0310-9956-ffa450edef68
---
docs/manual/CoreTasks/apply.html | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/docs/manual/CoreTasks/apply.html b/docs/manual/CoreTasks/apply.html
index 80c403c01..47d052d96 100644
--- a/docs/manual/CoreTasks/apply.html
+++ b/docs/manual/CoreTasks/apply.html
@@ -141,7 +141,7 @@ to send input to it is via the input and inputstring attributes.
errorproperty |
- The name of a property in which the standard error of the
+ | The name of a property in which the standard error of the
command should be stored. since Ant 1.6 |
No |
@@ -239,7 +239,7 @@ to send input to it is via the input and inputstring attributes.
commands in the user's path, set this to false.
since Ant 1.6
No, default is false |
-
+
maxparallel |
Limit the amount of parallelism by passing at
@@ -290,7 +290,7 @@ elements to define the directories for this task and refer to
- since Ant 1.7
+since Ant 1.7
You can use any number of nested resource collections.
mapper
@@ -407,8 +407,29 @@ dependency checking against output files--the target files in this case.
Applies the "ls" executable to all directories in the PATH, effectively
listing all executables that are available on the PATH.
+
+<apply executable="jsmin" addsourcefile="false">
+ <!-- Collect the JS-files -->
+ <fileset dir="src" includes="*.js"/>
+ <redirector>
+ <!-- redirect STDIN; fileset collects relative to its dir, but we need -->
+ <!-- relative to basedir -->
+ <inputmapper type="glob" from="*" to="src/*"/>
+ <!-- redirect STDOUT to file in dest-dir -->
+ <outputmapper id="out" type="glob" from="*.js" to="dest/*.js"/>
+ </redirector>
+</apply>
+
+Conversion of the command jsmin < src/a.js > dest/a.js but for
+all files in the src-directory. Because the filename itself should not be passed
+to the jsmin program, the addsourcefile is set to
+false .
+
+
+
+
Copyright © 2000-2005 The Apache Software Foundation. All rights
Reserved.
|