[jbosscache-commits] JBoss Cache SVN: r4647 - pojo/trunk/src/main/release.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Thu Oct 18 22:23:39 EDT 2007


Author: jason.greene at jboss.com
Date: 2007-10-18 22:23:39 -0400 (Thu, 18 Oct 2007)
New Revision: 4647

Added:
   pojo/trunk/src/main/release/build.xml
Log:
Add build.xml for distro


Added: pojo/trunk/src/main/release/build.xml
===================================================================
--- pojo/trunk/src/main/release/build.xml	                        (rev 0)
+++ pojo/trunk/src/main/release/build.xml	2007-10-19 02:23:39 UTC (rev 4647)
@@ -0,0 +1,147 @@
+<?xml version="1.0"?>
+
+<project name="POJO Cache Distribution" default="help">
+
+   <property name="build.sysclasspath" value="ignore"/>
+   <!-- 10 mins -->
+   <property name="single.test.timeout" value="600000"/>
+   <!-- 2h -->
+   <property name="all.test.timeout" value="7200000"/>
+
+   <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="${single.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="${all.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.pojo.demo.PojoCacheView" fork="yes">
+         <jvmarg value="-Xmx128M"/>
+         <classpath refid="test.classpath"/>
+         <jvmarg value="${jvm.ipv4}"/>
+         <jvmarg value="${jvm.localhost}"/>
+      </java>
+   </target>
+
+</project>


Property changes on: pojo/trunk/src/main/release/build.xml
___________________________________________________________________
Name: svn:executable
   + *




More information about the jbosscache-commits mailing list