[hibernate-commits] Hibernate SVN: r11136 - branches/HAN_SPLIT/HibernateExt/common.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Thu Feb 1 17:51:39 EST 2007


Author: epbernard
Date: 2007-02-01 17:51:39 -0500 (Thu, 01 Feb 2007)
New Revision: 11136

Modified:
   branches/HAN_SPLIT/HibernateExt/common/common-build.xml
Log:
improve common build with ability to override source target and lib modules in inherited builds

Modified: branches/HAN_SPLIT/HibernateExt/common/common-build.xml
===================================================================
--- branches/HAN_SPLIT/HibernateExt/common/common-build.xml	2007-02-01 22:44:18 UTC (rev 11135)
+++ branches/HAN_SPLIT/HibernateExt/common/common-build.xml	2007-02-01 22:51:39 UTC (rev 11136)
@@ -36,9 +36,11 @@
     <property name="javadoc" value="http://java.sun.com/j2se/1.4/docs/api"/>
     <property name="javac.debug" value="on"/>
     <property name="javac.optimize" value="off"/>
+	<property name="javac.source" value="1.4"/>
+	<property name="javac.target" value="1.4"/>
 
 
-    <!-- set Hibernate core related properties -->
+	<!-- set Hibernate core related properties -->
     <property name="hibernate-core.home" location="${common-build.basedir}/../../hibernate-3.2"/>
     <property name="hibernate-core.jar" location="${hibernate-core.home}/hibernate3.jar"/>
     <property name="hibernate-core.lib.dir" location="${hibernate-core.home}/lib"/>
@@ -48,7 +50,16 @@
 
 	<!--
 	Explicitly define tasks from ant..
-	Unfortunately, checkstyle-all.jar contains it's own version of ANTLR, so ANTLR cannot be in the classpath.
+	Unfortunately, checkstyle-a<path id="lib.class.path">
+    	<path location="${hibernate-core.jar}"></path>
+        <fileset dir="${hibernate-core.lib.dir}">
+            <include name="*.jar"/>
+        </fileset>
+        <fileset dir="${lib.dir}">
+            <include name="*.jar"/>
+        </fileset>
+        <pathelement path="${clover.jar}"/>
+    </path>ll.jar contains it's own version of ANTLR, so ANTLR cannot be in the classpath.
 	-->
 	<!-- Emmanuel: Removed antlr, shouldn't be useful in Ext package...
     taskdef name="antlr" classname="org.apache.tools.ant.taskdefs.optional.ANTLR">
@@ -84,10 +95,14 @@
         <fileset dir="${lib.dir}">
             <include name="*.jar"/>
         </fileset>
-        <pathelement path="${clover.jar}"/>   
+		<path refid="lib.moduleclass.path"/>
+		<pathelement path="${clover.jar}"/>
     </path>
 
-    <patternset id="support.files">
+	<!-- overridable in modules -->
+	<path id="lib.moduleclass.path"/>
+
+	<patternset id="support.files">
         <include name="**/*.jpg"/>
         <include name="**/*.gif"/>
         <include name="**/*.dtd"/>
@@ -193,8 +208,8 @@
             value="org.eclipse.jdt.core.JDTCompilerAdapter"
             classpath="${java.class.path}"/>
         <javac
-        	target="1.4"
-            source="1.4"   
+        	target="${javac.target}"
+            source="${javac.source}"
             srcdir="${src.dir}"
             destdir="${classes.dir}"
             classpathref="lib.class.path"
@@ -211,8 +226,8 @@
 			value="org.eclipse.jdt.core.JDTCompilerAdapter"
 			classpath="${java.class.path}"/>
 		<javac
-            target="1.4"
-            source="1.4"   
+            target="${javac.target}"
+            source="${javac.source}"
 			destdir="${testclasses.dir}"
 			classpathref="junit.classpath"
 			debug="${javac.debug}"
@@ -386,7 +401,18 @@
         </junit>
     </target>
 
-    <target name="junitinstrument" depends="compiletest,instrument"
+	<!-- Run a single unit test. -->
+	<target name="junitsingle" depends="compiletest" description="Run a single test suite (requires testname and jdbc.driver properties)">
+		<mkdir dir="test_output"/>
+		<junit printsummary="yes" fork="yes" haltonfailure="yes">
+			<classpath refid="junit.classpath"/>
+			<formatter type="plain"/>
+			<formatter type="xml"/>
+			<test fork="yes" todir="test_output" haltonfailure="no" name="${testname}"/>
+		</junit>
+	</target>
+
+	<target name="junitinstrument" depends="compiletest,instrument"
 			description="Run the instrument test suite (requires driver.jar property)">
 		<mkdir dir="${instrumenttest.out.dir}"/>
 		<junit printsummary="yes" haltonfailure="yes" dir="${basedir}"




More information about the hibernate-commits mailing list