From 8d0a7dc50ac5f28978517eb289457e26b4b40c44 Mon Sep 17 00:00:00 2001 From: Antoine Levy-Lambert Date: Wed, 14 May 2003 20:19:14 +0000 Subject: [PATCH] added an example usage of subant with propertyset - request of Dominique Devienne PR:19181 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274581 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/CoreTasks/subant.html | 17 ++++++++++++++++- .../org/apache/tools/ant/taskdefs/SubAnt.xml | 15 +++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/docs/manual/CoreTasks/subant.html b/docs/manual/CoreTasks/subant.html index c047e12fc..4ae44af77 100644 --- a/docs/manual/CoreTasks/subant.html +++ b/docs/manual/CoreTasks/subant.html @@ -204,7 +204,7 @@ Adds a directory set to the implicit build path.

Note that the directories will be added to the build path in no particular order, so if order is significant, one should use a file list instead! - Note that the directories will be added to the build path in no particular order, so if order is significant, one should use a file list instead!]]> + Note that the directories will be added to the build path in no particular o]]>]]> @@ -360,6 +360,21 @@

this snippet build file will run ant in each subdirectory of the project directory, where a file called build.xml can be found. + The property build.dir will have the value subant1.build in the ant projects called by subant. +

+
+          <subant target="">
+             <propertyset>
+                  <propertyref prefix="toplevel"/>
+                  <mapper type="glob" from="foo*" to="bar*"/>
+             </propertyset>
+             <fileset dir="." includes="*/build.xml"/>
+          </subant>
+        
+

+ this snippet build file will run ant in each subdirectory of the project directory, + where a file called build.xml can be found. + All properties whose name starts with "foo" are passed, their names are changed to start with "bar" instead

diff --git a/proposal/xdocs/src/org/apache/tools/ant/taskdefs/SubAnt.xml b/proposal/xdocs/src/org/apache/tools/ant/taskdefs/SubAnt.xml index 29403afaa..5cdf9561a 100644 --- a/proposal/xdocs/src/org/apache/tools/ant/taskdefs/SubAnt.xml +++ b/proposal/xdocs/src/org/apache/tools/ant/taskdefs/SubAnt.xml @@ -25,6 +25,21 @@

this snippet build file will run ant in each subdirectory of the project directory, where a file called build.xml can be found. + The property build.dir will have the value subant1.build in the ant projects called by subant. +

+
+          <subant target="">
+             <propertyset>
+                  <propertyref prefix="toplevel"/>
+                  <mapper type="glob" from="foo*" to="bar*"/>
+             </propertyset>
+             <fileset dir="." includes="*/build.xml"/>
+          </subant>
+        
+

+ this snippet build file will run ant in each subdirectory of the project directory, + where a file called build.xml can be found. + All properties whose name starts with "foo" are passed, their names are changed to start with "bar" instead

\ No newline at end of file