<?xml version="1.0" encoding="UTF-8"?> <!-- ====================================================================== --> <!-- --> <!-- JBoss, the OpenSource J2EE webOS --> <!-- --> <!-- Distributable under LGPL license. --> <!-- See terms of license at http://www.gnu.org. --> <!-- --> <!-- ====================================================================== --> <!-- $Id: build.xml,v 1.8 2004/12/28 00:27:19 ovidiuf Exp $ --> <project default="tests" name="JBoss/Messaging"> <!-- overridden to resolve thirdparty & module deps --> <dirname property="remote.root" file="${basedir}"></dirname> <dirname property="project.root" file="${remote.root}"></dirname> <import file="../../tools/etc/buildmagic/build-common.xml"></import> <import file="../../tools/etc/buildmagic/libraries.xml"></import> <import file="../../tools/etc/buildmagic/modules.xml"></import> <!-- ================================================================== --> <!-- Configuration --> <!-- ================================================================== --> <!-- Module name(s) & version --> <property name="module.name" value="jms"></property> <property name="module.Name" value="JBoss Messaging"></property> <property name="module.version" value="5.0.0"></property> <!-- ========= --> <!-- Libraries --> <!-- ========= --> <!-- The combined library classpath --> <path id="library.classpath"> <path refid="apache.log4j.classpath"></path> <path refid="oswego.concurrent.classpath"></path> <path refid="junit.junit.classpath"></path> <path refid="jgroups.jgroups.classpath"></path> <path refid="apache.commons.classpath"></path> </path> <!-- ======= --> <!-- Modules --> <!-- ======= --> <!-- The combined dependent module classpath --> <path id="dependentmodule.classpath"> <path refid="jboss.common.classpath"></path> <path refid="jboss.jms.classpath"></path> </path> <!-- ===== --> <!-- Tasks --> <!-- ===== --> <property name="source.tests.java" value="${module.source}"></property> <property name="build.tests.classes" value="${module.output}/classes"></property> <property name="build.tests.lib" value="${module.output}/lib"></property> <property name="build.tests.output" value="${module.output}/reports"></property> <property name="build.performance.tests.output" value="${module.output}/reports/performance"></property> <property name="build.tests.archive" value="jboss-messaging-tests.jar"></property> <path id="test.classpath"> <path refid="library.classpath"></path> <path refid="dependentmodule.classpath"></path> </path> <!-- Compile all test files --> <target name="compile-test-classes"> <mkdir dir="${build.tests.classes}"></mkdir> <javac destdir="${build.tests.classes}" optimize="${javac.optimize}" target="1.4" source="1.4" debug="${javac.debug}" depend="${javac.depend}" verbose="${javac.verbose}" deprecation="${javac.deprecation}" includeAntRuntime="${javac.include.ant.runtime}" includeJavaRuntime="${javac.include.java.runtime}" failonerror="${javac.fail.onerror}"> <src path="${source.tests.java}"></src> <classpath refid="test.classpath"></classpath> <include name="**/*.java"></include> </javac> </target> <target name="tests-jar" depends="compile-test-classes" description="Creates the jar file with all the tests"> <mkdir dir="${build.tests.lib}"></mkdir> <!-- Build the tests jar --> <jar jarfile="${build.tests.lib}/${build.tests.archive}"> <fileset dir="${build.tests.classes}"> <include name="org/jboss/test/messaging/**"></include> </fileset> </jar> </target> <!-- The values from imported files or set by the calling ant tasks will take precedence over the values specified below. --> <property name="junit.printsummary" value="true"></property> <property name="junit.haltonerror" value="true"></property> <property name="junit.haltonfailure" value="true"></property> <property name="junit.fork" value="true"></property> <property name="junit.includeantruntime" value="true"></property> <property name="junit.timeout" value=""></property> <property name="junit.showoutput" value="true"></property> <property name="junit.jvm" value=""></property> <property name="junit.jvm.options" value=""></property> <property name="junit.formatter.usefile" value="false"></property> <property name="junit.batchtest.todir" value="${build.tests.output}"></property> <property name="junit.batchtest.haltonerror" value="true"></property> <property name="junit.batchtest.haltonfailure" value="true"></property> <property name="junit.batchtest.fork" value="true"></property> <property name="junit.test.haltonfailure" value="true"></property> <property name="junit.test.haltonerror" value="true"></property> <target name="prepare-testdirs" description="Prepares the directory structure required by a test run"> <mkdir dir="${build.tests.output}"></mkdir> </target> <target name="tests" depends="tests-jar, prepare-testdirs" description="Runs all available tests"> <junit printsummary="${junit.printsummary}" fork="${junit.fork}" includeantruntime="${junit.includeantruntime}" haltonerror="${junit.haltonerror}" haltonfailure="${junit.haltonfailure}" showoutput="${junit.showoutput}"> <classpath> <path refid="test.classpath"></path> <pathelement location="${build.tests.lib}/${build.tests.archive}"></pathelement> <pathelement location="${module.root}/etc"></pathelement> </classpath> <formatter type="plain" usefile="${junit.formatter.usefile}"></formatter> <batchtest fork="${junit.batchtest.fork}" todir="${junit.batchtest.todir}" haltonfailure="${junit.batchtest.haltonfailure}" haltonerror="${junit.batchtest.haltonerror}"> <formatter type="plain" usefile="${junit.formatter.usefile}"></formatter> <fileset dir="${build.tests.classes}"> <include name="**/messaging/**/*Test.class"></include> <exclude name="**/messaging/**/performance/**"></exclude> </fileset> </batchtest> </junit> </target> <target name="test" depends="tests-jar, prepare-testdirs" description="Runs a single test, specified by its FQ class name via 'test.classname'"> <fail unless="test.classname" message="To run a single test, use: ./build.sh test -Dtest.clasname=org.package.MyTest"></fail> <junit printsummary="${junit.printsummary}" fork="${junit.fork}" includeantruntime="${junit.includeantruntime}" haltonerror="${junit.haltonerror}" haltonfailure="${junit.haltonfailure}" showoutput="${junit.showoutput}"> <classpath> <path refid="test.classpath"></path> <pathelement location="${build.tests.lib}/${build.tests.archive}"></pathelement> <pathelement location="${module.root}/etc"></pathelement> </classpath> <formatter type="plain" usefile="${junit.formatter.usefile}"></formatter> <test name="${test.classname}" fork="${junit.batchtest.fork}" todir="${junit.batchtest.todir}" haltonfailure="${junit.test.haltonfailure}" haltonerror="${junit.test.haltonerror}"> </test> </junit> </target> <target name="performance-tests"></target> <target name="functional-tests" depends="tests"></target> <!-- Clean up all build output --> <target name="clean" description="Cleans up most generated files."> <delete dir="${module.output}"></delete> </target> <target name="clobber" depends="clean"></target> </project>
Comments