morgand 2003/01/21 12:22:07
Modified: jelly build-all.xml
Log:
somewhat cleaner structure
Revision Changes Path
1.2 +77 -44 jakarta-commons-sandbox/jelly/build-all.xml
Index: build-all.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/jelly/build-all.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build-all.xml 21 Jan 2003 19:00:34 -0000 1.1
+++ build-all.xml 21 Jan 2003 20:22:07 -0000 1.2
@@ -2,11 +2,21 @@
<project default="jar" name="commons-jelly-build-all" basedir=".">
+ <!--
+ target that can be used via antcall task
+ to call a single target on all jelly build.xml scripts
+ -->
+ <target name="subexec">
+ <ant dir="." target="${sub.target}"/>
+ <ant dir="jelly-tags/ant" target="${sub.target}"/>
+ <ant dir="jelly-tags/junit" target="${sub.target}"/>
+ <ant dir="jelly-tags/util" target="${sub.target}"/>
+ </target>
+
<target name="clean">
- <ant dir="." target="clean"/>
- <ant dir="jelly-tags/ant" target="clean"/>
- <ant dir="jelly-tags/junit" target="clean"/>
- <ant dir="jelly-tags/util" target="clean"/>
+ <antcall target="subexec">
+ <param name="sub.target" value="clean"/>
+ </antcall>
</target>
<target name="jar">
@@ -15,64 +25,87 @@
<target name="jar-all" depends="jar-jelly,jar-ant,jar-junit,jar-util"/>
- <target name="jar-jelly">
- <echo message="Building Jelly..."/>
- <ant dir="." target="jar"/>
- </target>
-
- <target name="jar-ant" depends="jar-jelly,jar-util,jar-junit">
- <echo message="Building Ant taglib..."/>
- <ant dir="jelly-tags/ant" target="get-deps"/>
+ <!-- don't call directly, called inside jar-* tasks -->
+ <target name="prepare-taglib-deps">
+ <ant dir="jelly-tags/${sub.taglib}" target="get-deps"/>
<delete>
- <fileset dir="jelly-tags/ant/lib" includes="commons-jelly-*"/>
+ <fileset dir="jelly-tags/${sub.taglib}/lib" includes="commons-jelly-*"/>
</delete>
- <copy todir="jelly-tags/ant/lib">
+ <copy todir="jelly-tags/${sub.taglib}/lib">
<fileset dir="target" includes="commons-jelly-*.jar"/>
- <fileset dir="jelly-tags/util/target" includes="commons-jelly-*.jar"/>
- <fileset dir="jelly-tags/junit/target" includes="commons-jelly-*.jar"/>
</copy>
-
- <ant dir="jelly-tags/ant" target="jar">
+ </target>
+
+ <!-- don't call directly, called inside jar-* tasks -->
+ <target name="get-ext-taglib">
+ <copy todir="jelly-tags/${sub.taglib}/lib">
+ <fileset dir="jelly-tags/${sub.taglib.ext}/target"
includes="commons-jelly-*.jar"/>
+ </copy>
+ </target>
+
+ <!-- don't call directly, called inside jar-* tasks -->
+ <target name="build-taglib">
+ <ant dir="jelly-tags/${sub.taglib}" target="jar">
<property name="noget" value="true"/>
</ant>
+ </target>
+
+ <target name="jar-jelly">
+ <echo message="Building Jelly..."/>
+ <ant dir="." target="jar"/>
+ </target>
+
+ <target name="jar-ant" depends="jar-jelly,jar-util,jar-junit">
+ <echo message="Building Ant taglib..."/>
+ <antcall target="prepare-taglib-deps">
+ <param name="sub.taglib" value="ant"/>
+ </antcall>
+
+ <!-- copy in other Jelly taglib dependencies -->
+ <antcall target="get-ext-taglib">
+ <param name="sub.taglib" value="ant"/>
+ <param name="sub.taglib.ext" value="util"/>
+ </antcall>
+ <antcall target="get-ext-taglib">
+ <param name="sub.taglib" value="ant"/>
+ <param name="sub.taglib.ext" value="junit"/>
+ </antcall>
+
+ <antcall target="build-taglib">
+ <param name="sub.taglib" value="ant"/>
+ </antcall>
</target>
<target name="jar-util" depends="jar-jelly,jar-junit">
<echo message="Building Util taglib..."/>
- <ant dir="jelly-tags/util" target="get-deps"/>
-
- <delete>
- <fileset dir="jelly-tags/util/lib" includes="commons-jelly-*"/>
- </delete>
- <copy todir="jelly-tags/util/lib">
- <fileset dir="target" includes="commons-jelly-*.jar"/>
- <fileset dir="jelly-tags/junit/target" includes="commons-jelly-*.jar"/>
- </copy>
-
- <ant dir="jelly-tags/util" target="jar">
- <property name="noget" value="true"/>
- </ant>
-
+ <antcall target="prepare-taglib-deps">
+ <param name="sub.taglib" value="util"/>
+ </antcall>
+
+ <!-- copy in other Jelly taglib dependencies -->
+ <antcall target="get-ext-taglib">
+ <param name="sub.taglib" value="util"/>
+ <param name="sub.taglib.ext" value="junit"/>
+ </antcall>
+
+ <antcall target="build-taglib">
+ <param name="sub.taglib" value="util"/>
+ </antcall>
</target>
<target name="jar-junit" depends="jar-jelly">
<echo message="Building JUnit taglib..."/>
- <ant dir="jelly-tags/junit" target="get-deps"/>
-
- <delete>
- <fileset dir="jelly-tags/junit/lib" includes="commons-jelly-*"/>
- </delete>
- <copy todir="jelly-tags/junit/lib">
- <fileset dir="target" includes="commons-jelly-*.jar"/>
- </copy>
-
- <ant dir="jelly-tags/junit" target="jar">
- <property name="noget" value="true"/>
- </ant>
+ <antcall target="prepare-taglib-deps">
+ <param name="sub.taglib" value="junit"/>
+ </antcall>
+
+ <antcall target="build-taglib">
+ <param name="sub.taglib" value="junit"/>
+ </antcall>
</target>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>