User: user57
Date: 01/08/02 14:54:37
Modified: etc Tag: jboss_buildmagic build-bank.xml
Log:
o consolidated the information required to compile, build jars and run
test cases into properties, patternsets and paths.
Revision Changes Path
No revision
No revision
1.1.2.6 +73 -30 jbosstest/etc/Attic/build-bank.xml
Index: build-bank.xml
===================================================================
RCS file: /cvsroot/jboss/jbosstest/etc/Attic/build-bank.xml,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- build-bank.xml 2001/08/02 06:25:52 1.1.2.5
+++ build-bank.xml 2001/08/02 21:54:37 1.1.2.6
@@ -9,10 +9,8 @@
<!-- -->
<!-- ====================================================================== -->
-<!-- $Id: build-bank.xml,v 1.1.2.5 2001/08/02 06:25:52 user57 Exp $ -->
+<!-- $Id: build-bank.xml,v 1.1.2.6 2001/08/02 21:54:37 user57 Exp $ -->
-<!-- The JBossTest bank testsuite build file -->
-
<project default="main">
<!--
@@ -31,7 +29,44 @@
<pathelement path="${testsuite.module.apache.ant.classpath}"/>
</path>
+ <!--
+ | Setup the test properties and patternsets used to generate jars.
+ -->
+
+ <property name="test.name" value="bank"/>
+ <property name="test.path" value="org/jboss/test/bank"/>
+ <property name="test.package" value="org.jboss.test.bank"/>
+
+ <property name="test.application.jar"
+ value="${build.jars}/${test.name}.jar"/>
+ <patternset id="test.application.classes">
+ <include name="org/jboss/test/util/ejb/**"/>
+ <include name="${test.path}/interfaces/**"/>
+ <include name="${test.path}/ejb/**"/>
+ </patternset>
+ <patternset id="test.application.resources">
+ <include name="**/*.xml"/>
+ </patternset>
+
+ <property name="test.client.jar"
+ value="${build.jars}/${test.name}test.jar"/>
+ <patternset id="test.client.classes">
+ <include name="org/jboss/test/util/**"/>
+ <include name="${test.path}/interfaces/**"/>
+ <include name="${test.path}/test/**"/>
+ </patternset>
+ <patternset id="test.client.resources">
+ <include name="*.*"/>
+ </patternset>
+
+ <path id="test.classpath">
+ <pathelement location="${test.client.jar}"/>
+ <path refid="javac.classpath"/>
+ <path refid="apache.ant.classpath"/>
+ <path refid="apache.ant.ext.classpath"/>
+ </path>
+
<!-- =================================================================== -->
<!-- Compiles the source code -->
<!-- =================================================================== -->
@@ -55,7 +90,7 @@
failonerror="${javac.fail.onerror}">
<src path="${source.java}"/>
<classpath refid="javac.classpath"/>
- <include name="org/jboss/test/bank/**"/>
+ <include name="${test.path}/**"/>
</javac>
</target>
@@ -67,29 +102,24 @@
<target name="jars" depends="compile">
<mkdir dir="${build.jars}"/>
- <!-- build banktest.jar -->
- <jar jarfile="${build.jars}/banktest.jar"
- manifest="${build.etc}/manifest.mf">
+ <!-- build the test application jar -->
+ <jar jarfile="${test.application.jar}">
<fileset dir="${build.classes}">
- <include name="org/jboss/test/util/**"/>
- <include name="org/jboss/test/bank/interfaces/**"/>
- <include name="org/jboss/test/bank/test/**"/>
- <include name="*.*"/>
+ <patternset refid="test.application.classes"/>
</fileset>
- <fileset dir="${build.resources}/bank">
- <include name="**"/>
+ <fileset dir="${build.resources}/${test.name}">
+ <patternset refid="test.application.resources"/>
</fileset>
</jar>
- <!-- build bank.jar -->
- <jar jarfile="${build.jars}/bank.jar">
+ <!-- build the test client jar -->
+ <jar jarfile="${test.client.jar}"
+ manifest="${build.etc}/manifest.mf">
<fileset dir="${build.classes}">
- <include name="org/jboss/test/util/ejb/**"/>
- <include name="org/jboss/test/bank/interfaces/**"/>
- <include name="org/jboss/test/bank/ejb/**"/>
+ <patternset refid="test.client.classes"/>
</fileset>
- <fileset dir="${build.resources}/bank">
- <include name="**/*.xml"/>
+ <fileset dir="${build.resources}/${test.name}">
+ <patternset refid="test.client.resources"/>
</fileset>
</jar>
</target>
@@ -114,13 +144,7 @@
<!-- junit.jvm.options must have a valid value -->
<jvmarg value="${junit.jvm.options}"/>
<sysproperty key="jbosstest.deploy.dir" file="${build.jars}"/>
-
- <classpath>
- <pathelement location="${build.classes}"/>
- <path refid="javac.classpath"/>
- <path refid="apache.ant.classpath"/>
- <path refid="apache.ant.ext.classpath"/>
- </classpath>
+ <classpath refid="test.classpath"/>
<formatter type="${junit.formatter.type}"
usefile="${junit.formatter.usefile}"/>
@@ -131,12 +155,31 @@
fork="${junit.batchtest.fork}">
<fileset dir="${build.classes}">
- <include name="org/jboss/test/bank/**/Test*.class"/>
- <include name="org/jboss/test/bank/**/AllJUnitTests.class"/>
- <include name="org/jboss/test/bank/**/Main.class"/>
+ <include name="${test.path}/**/Test*.class"/>
+ <include name="${test.path}/**/AllJUnitTests.class"/>
+ <include name="${test.path}/**/Main.class"/>
</fileset>
</batchtest>
</junit>
+ </target>
+
+
+ <!-- ================================================================== -->
+ <!-- Cleans up generated stuff -->
+ <!-- ================================================================== -->
+
+ <!-- Clean up all build output -->
+ <target name="clean"
+ description="Cleans up most generated files.">
+ <delete dir="${build.classes}/${test.path}"/>
+ <delete dir="${build.resources}/${test.name}"/>
+ <delete dir="${test.application.jar}"/>
+ <delete dir="${test.client.jar}"/>
+ </target>
+
+ <!-- Clean up all generated files -->
+ <target name="clobber" depends="clean"
+ description="Cleans up all generated files.">
</target>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development