[jbosscache-commits] JBoss Cache SVN: r4589 - core/trunk/src/main/release.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Wed Oct 10 11:27:39 EDT 2007
Author: manik.surtani at jboss.com
Date: 2007-10-10 11:27:39 -0400 (Wed, 10 Oct 2007)
New Revision: 4589
Added:
core/trunk/src/main/release/build.xml
Log:
ant script
Added: core/trunk/src/main/release/build.xml
===================================================================
--- core/trunk/src/main/release/build.xml (rev 0)
+++ core/trunk/src/main/release/build.xml 2007-10-10 15:27:39 UTC (rev 4589)
@@ -0,0 +1,144 @@
+<?xml version="1.0"?>
+
+<project name="JBoss Cache Core Distribution" default="help">
+
+ <property name="build.sysclasspath" value="ignore"/>
+ <property name="test.timeout" value="180000"/>
+ <!-- 3 minutes -->
+ <property name="source" value="${basedir}/test"/>
+ <property name="output" value="${basedir}/output"/>
+ <property name="build" value="${output}/classes"/>
+ <property name="lib" value="${basedir}/lib"/>
+ <property name="etc" value="${basedir}/etc"/>
+ <property name="reports" value="${output}/reports"/>
+
+ <!-- JVM args for when running tests -->
+ <property name="jvm.ipv4" value="-Djava.net.preferIPv4Stack=true"/>
+ <property name="jvm.localhost" value="-Dbind.address=127.0.0.1"/>
+
+ <!-- Test if JDK5 is available -->
+ <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
+
+ <taskdef name="testng" classpath="lib/test/testng.jar" classname="org.testng.TestNGAntTask"/>
+
+ <!-- set local properties for this build -->
+ <path id="lib.classpath">
+ <fileset dir="${lib}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+ <path id="cache.classpath">
+ <fileset dir="${basedir}">
+ <include name="jbosscache-core.jar"/>
+ </fileset>
+ </path>
+
+ <path id="build.classpath">
+ <pathelement path="${build}"/>
+ </path>
+
+ <path id="test.classpath">
+ <path refid="build.classpath"/>
+ <path refid="cache.classpath"/>
+ <path refid="lib.classpath"/>
+ <pathelement path="${etc}"/>
+ <!-- this needs to be in the test classpath as well since it contains test configuration XML files -->
+ <pathelement path="${source}"/>
+ </path>
+
+ <target name="help" description="help page">
+ <echo><![CDATA[
+build.sh <command> where command is:
+ compile -- compile the test code
+ clean -- clean up the whole directory
+ run.tests -- run batch examples
+ one.test -- run one single test case. Need -Dtest=org/jboss/cache/??Test
+ run.demo -- run demo GUI
+
+ ]]></echo>
+ </target>
+
+ <target name="chkJdk" unless="HAVE_JDK_1.5">
+ <echo>
+ **** FATAL
+ **** REQUIRES JDK 1.5.0 or greater.
+ **** Compilation won't proceed!
+ </echo>
+ </target>
+
+ <!-- set up directory -->
+ <target name="init" depends="chkJdk" description="Prepare to build.">
+ <!-- Create the time stamp -->
+ <tstamp/>
+ <!-- Create the build directory structure used by compile
+and copy the deployment descriptors into it-->
+ <mkdir dir="${build}"/>
+ <mkdir dir="${reports}"/>
+ </target>
+
+ <target name="clean" description="Clean up compiled classes">
+ <delete dir="${output}"/>
+ </target>
+
+ <target name="compile" depends="init" description="Build unit test classes" if="HAVE_JDK_1.5">
+ <javac srcdir="${source}"
+ destdir="${build}"
+ includes="org/jboss/**"
+ target="1.5"
+ source="1.5"
+ debug="true"
+ deprecation="false">
+ <classpath>
+ <path refid="lib.classpath"/>
+ <path refid="cache.classpath"/>
+ </classpath>
+ </javac>
+
+ <copy todir="${output}/etc">
+ <fileset dir="${etc}">
+ <include name="**/*"/>
+ </fileset>
+ </copy>
+ </target>
+
+
+ <!-- eg. ant run.examples -Dtest=org/jboss/test/cache/api/CacheAPITest -->
+ <target name="one.test" depends="compile" description="run one TestNG test case.">
+ <testng
+ outputDir="${reports}"
+ haltOnFailure="true"
+ timeOut="${test.timeout}"
+ verbose="2">
+ <classpath refid="test.classpath"/>
+ <classfileset dir="${build}" includes="${test}.class"/>
+ <jvmarg value="${jvm.ipv4}"/>
+ <jvmarg value="${jvm.localhost}"/>
+ </testng>
+ </target>
+
+ <target name="run.tests" depends="compile" description="run TestNG test cases.">
+ <testng
+ outputDir="${reports}"
+ haltOnFailure="true"
+ timeOut="${test.timeout}"
+ verbose="2">
+ <classpath>
+ <path refid="test.classpath"/>
+ </classpath>
+ <classfileset dir="${build}" includes="**/*Test.class"/>
+ <jvmarg value="${jvm.ipv4}"/>
+ <jvmarg value="${jvm.localhost}"/>
+ </testng>
+ </target>
+
+ <target name="run.demo" depends="compile" description="Run JBoss Cache demo.">
+ <java classname="org.jboss.cache.demo.JBossCacheView" fork="yes">
+ <jvmarg value="-Xmx128M"/>
+ <classpath refid="test.classpath"/>
+ <jvmarg value="${jvm.ipv4}"/>
+ <jvmarg value="${jvm.localhost}"/>
+ </java>
+ </target>
+
+</project>
Property changes on: core/trunk/src/main/release/build.xml
___________________________________________________________________
Name: svn:executable
+ *
More information about the jbosscache-commits
mailing list