[hibernate-commits] Hibernate SVN: r10983 - branches/Branch_3_2/Hibernate3

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Wed Dec 13 09:52:35 EST 2006


Author: steve.ebersole at jboss.com
Date: 2006-12-13 09:52:34 -0500 (Wed, 13 Dec 2006)
New Revision: 10983

Modified:
   branches/Branch_3_2/Hibernate3/build.xml
Log:
allow externalized definition of where to find JDBC drivers

Modified: branches/Branch_3_2/Hibernate3/build.xml
===================================================================
--- branches/Branch_3_2/Hibernate3/build.xml	2006-12-13 14:51:54 UTC (rev 10982)
+++ branches/Branch_3_2/Hibernate3/build.xml	2006-12-13 14:52:34 UTC (rev 10983)
@@ -79,11 +79,19 @@
         <fileset refid="fs.lib" />
 	</path>
 
-    <!-- fileset definition for the jdbc directory -->
-    <fileset id="fs.jdbc" dir="${dir.jdbc}">
-        <include name="**/*.jar" />
-        <include name="**/*.zip" />
-    </fileset>
+    <!-- path definition for the JDBC driver(s) -->
+    <path id="path.jdbc">
+        <!-- By default include everything in the ${dir.jdbc} directory -->
+        <fileset dir="${dir.jdbc}">
+            <include name="**/*.jar" />
+            <include name="**/*.zip" />
+        </fileset>
+        <!-- And the explicitly defined jar.driver property (used by the CC scripts) -->
+        <pathelement path="${jar.driver}"/>
+    </path>
+    <!-- allows external definition of the JDBC classpath fragment -->
+    <property name="hibernate.test.jdbc.fs.importFile" value="doNotImport" />
+    <import file="${hibernate.test.jdbc.fs.importFile}" optional="true" />
 
     <!-- patternset for insturmentation-eligible resources -->
 	<patternset id="ps.instrument.domain">
@@ -269,7 +277,7 @@
                 from AllTests and then performs the filtering based on that
             -->
             <fileset refid="fs.lib" />
-            <fileset refid="fs.jdbc" />
+            <path refid="path.jdbc" />
             <pathelement path="${dir.out.classes}"/>
             <pathelement path="${dir.out.test-classes}"/>
             <pathelement path="${dir.props}"/>
@@ -279,11 +287,10 @@
 			<jvmarg value="-Dhibernate.test.validatefailureexpected=${hibernate.test.validatefailureexpected}"/>
 			<classpath>
                 <fileset refid="fs.lib" />
-                <fileset refid="fs.jdbc" />
+            <path refid="path.jdbc" />
                 <pathelement path="${dir.out.classes}"/>
                 <pathelement path="${dir.out.test-classes}"/>
                 <pathelement path="${dir.props}"/>
-				<pathelement path="${jar.driver}"/>
 				<pathelement path="${jar.clover}"/>
 			</classpath>
 			<formatter type="plain"/>
@@ -308,11 +315,10 @@
 			<jvmarg value="-Dhibernate.test.validatefailureexpected=${hibernate.test.validatefailureexpected}"/>
 			<classpath>
                 <fileset refid="fs.lib" />
-                <fileset refid="fs.jdbc" />
+                <path refid="path.jdbc" />
                 <pathelement path="${dir.out.classes}"/>
                 <pathelement path="${dir.out.test-classes}"/>
                 <pathelement path="${dir.props}"/>
-				<pathelement path="${jar.driver}"/>
 				<pathelement path="${jar.clover}"/>
 			</classpath>
 			<formatter type="plain"/>
@@ -331,11 +337,10 @@
 			<jvmarg value="-Dhibernate.test.validatefailureexpected=${hibernate.test.validatefailureexpected}"/>
 			<classpath>
                 <fileset refid="fs.lib" />
-                <fileset refid="fs.jdbc" />
+                <path refid="path.jdbc" />
                 <pathelement path="${dir.out.classes}"/>
                 <pathelement path="${dir.out.test-classes}"/>
                 <pathelement path="${dir.props}"/>
-				<pathelement path="${jar.driver}"/>
 				<pathelement path="${jar.clover}"/>
 			</classpath>
 			<formatter type="plain"/>
@@ -355,11 +360,10 @@
         <junit printsummary="yes" fork="yes" haltonfailure="yes" dir="${basedir}">
 			<classpath>
                 <fileset refid="fs.lib" />
-                <fileset refid="fs.jdbc" />
+                <path refid="path.jdbc" />
                 <pathelement path="${dir.out.classes}"/>
                 <pathelement path="${dir.out.test-classes}"/>
                 <pathelement path="${dir.props}"/>
-				<pathelement path="${jar.driver}"/>
 				<pathelement path="${jar.clover}"/>
 			</classpath>
 			<formatter type="plain"/>
@@ -375,11 +379,10 @@
 			<jvmarg value="-Dhibernate.test.validatefailureexpected=${hibernate.test.validatefailureexpected}"/>
 			<classpath>
                 <fileset refid="fs.lib" />
-                <fileset refid="fs.jdbc" />
+                <path refid="path.jdbc" />
                 <pathelement path="${dir.out.classes}"/>
                 <pathelement path="${dir.out.test-classes}"/>
                 <pathelement path="${dir.props}"/>
-				<pathelement path="${jar.driver}"/>
 				<pathelement path="${jar.clover}"/>
 			</classpath>
 			<formatter type="plain"/>
@@ -458,7 +461,7 @@
 		<java classname="org.hibernate.auction.Main" fork="true" failonerror="true">
 			<classpath>
                 <fileset refid="fs.lib" />
-                <fileset refid="fs.jdbc" />
+                <path refid="path.jdbc" />
 				<pathelement path="${dir.out.eg}" />
 				<pathelement path="${dir.build}/${jar.name}.jar"/>
 				<pathelement path="${dir.props}" />




More information about the hibernate-commits mailing list