[hibernate-commits] Hibernate SVN: r14844 - in search/trunk: ivy and 1 other directories.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Wed Jul 2 11:24:00 EDT 2008


Author: hardy.ferentschik
Date: 2008-07-02 11:24:00 -0400 (Wed, 02 Jul 2008)
New Revision: 14844

Modified:
   search/trunk/
   search/trunk/build.xml
   search/trunk/common-build.xml
   search/trunk/ivy/ivyconf.xml
   search/trunk/src/test/org/hibernate/search/test/bridge/Gangster.java
   search/trunk/src/test/org/hibernate/search/test/bridge/UnresolvedBridgeTest.java
Log:
Some cleanup before working on some jira issues.
* synced common-build.xml and ivyconf.xml with annotations, entitymanager and commons-annotations
* cleanup of build.xml 
* moved JMSSlaveTest into it's own batch within junit target
* investigated UnresolvedBrdigeTest - will pass again once we a new core version will be released.


Property changes on: search/trunk
___________________________________________________________________
Name: svn:ignore
   - build
indextemp
lucenedirs
target
test_output

   + build
indextemp
lucenedirs
target
test_output
bin
build.properties
.*


Modified: search/trunk/build.xml
===================================================================
--- search/trunk/build.xml	2008-07-01 21:52:05 UTC (rev 14843)
+++ search/trunk/build.xml	2008-07-02 15:24:00 UTC (rev 14844)
@@ -1,3 +1,4 @@
+<!-- $Id:$ -->
 <!--
 
   Hibernate Search ANT build script.
@@ -25,13 +26,6 @@
     <property name="jdbc.dir" value="jdbc"/>
     <property name="common.dir" value="${basedir}"/>
 
-    <!-- property name="jpa-api.jar" value="${basedir}/../jpa-api/build/ejb3-persistence.jar"/>
-	<property name="annotations.jar"
-			  value="${basedir}/../annotations/target/hibernate-annotations/hibernate-annotations.jar"/>
-	<property name="commons-annotations.jar"
-			  value="${basedir}/../commons-annotations/target/hibernate-commons-annotations/hibernate-commons-annotations.jar"/>
-    <property name="entitymanager.jar"
-			  value="${basedir}/../entitymanager/target/hibernate-entitymanager/hibernate-entitymanager.jar"/ -->
     <property name="ivy.dep.dir" value="${basedir}/build/lib" />
 
     <!-- ivy load -->
@@ -60,6 +54,7 @@
            <path refid="lib.class.path"/>
            <path location="${clover.jar}"/>
     </path>
+	
     <!-- override order for JBossXB to bootstrap properly -->
     <path id="lib.class.path">
         <fileset dir="${ivy.dep.dir}/core">
@@ -74,7 +69,6 @@
 		<pathelement path="${clover.jar}"/>
     </path>
 
-
     <path id="lib.moduleclass.path">
 		<!-- pathelement location="${jpa-api.jar}"/>
 		<pathelement location="${commons-annotations.jar}"/ -->
@@ -82,6 +76,7 @@
 			<include name="*.jar"/>
 		</fileset -->
     </path>
+	
 	<path id="junit.moduleclasspath">
         <!-- order matters for JBoss XB proper bootstrap -->
         <fileset dir="${lib.dir}/test">
@@ -106,12 +101,6 @@
         <tstamp>
             <format property="now" pattern="yyyyMMddhhmmss"/>
         </tstamp>
-        <!-- check for dependency artefacts -->
-
-        <!-- available file="${jpa-api.jar}" type="file" property="jpa-api.jar.available"/>
-		<available file="${commons-annotations.jar}" type="file" property="commons-annotations.jar.available"/>
-		<available file="${annotations.jar}" type="file" property="annotations.jar.available"/>
-        <available file="${entitymanager.jar}" type="file" property="entitymanager.jar.available"/ -->
         <mkdir dir="${ivy.dep.dir}/core"/>
         <mkdir dir="${ivy.dep.dir}/test"/>
         <ivy:configure file="${ivy.jar.dir}/ivyconf.xml" />
@@ -119,26 +108,6 @@
         <mkdir dir="${build.testresources.dir}"/>
     </target>
 
-	<!-- target name="get.jpa-api" depends="init" unless="jpa-api.jar.available">
-		<ant inheritall="false" dir="${basedir}/../jpa-api" target="clean"/>
-		<ant inheritall="false" dir="${basedir}/../jpa-api" target="jar"/>
-	</target>
-
-	<target name="get.commons-annotations" depends="init" unless="commons-annotations.jar.available">
-		<ant inheritall="false" dir="${basedir}/../commons-annotations" target="clean"/>
-		<ant inheritall="false" dir="${basedir}/../commons-annotations" target="jar"/>
-	</target>
-
-	<target name="get.annotations" depends="init" unless="annotations.jar.available">
-		<ant inheritall="false" dir="${basedir}/../annotations" target="clean"/>
-		<ant inheritall="false" dir="${basedir}/../annotations" target="jar"/>
-	</target>
-
-    <target name="get.entitymanager" depends="init" unless="entitymanager.jar.available">
-		<ant inheritall="false" dir="${basedir}/../entitymanager" target="clean"/>
-		<ant inheritall="false" dir="${basedir}/../entitymanager" target="jar"/>
-	</target -->
-
     <target name="get.deps.core" depends="init" description="retrieve the core dependencies">
         <ivy:resolve conf="default" />
         <ivy:retrieve pattern="${ivy.dep.dir}/core/[artifact].[ext]" conf="default" />
@@ -212,16 +181,11 @@
     </target>
 
     <target name="junit" depends="compiletest, prepare-test-resources">
-        <mkdir dir="test_output"/>
-        <junit forkmode="once" printsummary="yes" haltonfailure="yes">
+        <mkdir dir="${testreports.dir}"/>
+        <junit forkmode="perBatch" printsummary="yes" haltonfailure="yes">
             <classpath>
                 <path path="${build.testresources.dir}"/>
-                <!-- dirset dir="${build.testresources.dir}">
-                    <include name="**/*.jar"/>
-                    <include name="**/*.par"/>
-                </dirset -->
-                <path refid="junit.classpath"/>
-                
+                <path refid="junit.classpath"/>             
                 <fileset dir="${jdbc.dir}">
                     <include name="**/*.jar"/>
                     <include name="**/*.zip"/>
@@ -229,36 +193,26 @@
             </classpath>
             <formatter type="plain"/>
             <formatter type="xml"/>
-            <batchtest fork="yes" todir="test_output" haltonfailure="no">
-            	<fileset refid="junit.batchtestset"/>
+            <batchtest fork="yes" todir="${testreports.dir}" haltonfailure="no">
+				<fileset dir="${testclasses.dir}">
+					<include name="**/*Test.class"/>
+					<exclude name="**/JMSSlaveTest.class"/>
+					<!-- Only temporary excluded here until the next release of core. Test should then pass again -->
+					<exclude name="**/UnresolvedBridgeTest.class"/>
+				</fileset>
             </batchtest>
+			<test fork="yes" todir="${testreports.dir}" haltonfailure="no" name="org.hibernate.search.test.jms.slave.JMSSlaveTest"/>	
         </junit>
     </target>
 
 	<!-- 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"/>
+		<mkdir dir="${testreports.dir}"/>
 		<junit printsummary="yes" fork="yes" haltonfailure="yes">
 			<classpath>
-				<!-- fileset dir="${jdbc.dir}">
-					<include name="**/*.jar"/>
-					<include name="**/*.zip"/>
-				</fileset>
-				<path refid="lib.class.path"/>
-				<pathelement path="${classes.dir}"/>
-				<pathelement path="${src.dir}"/>
-				< ! - - pick up properties from here - - >
-				<pathelement path="${test.dir}"/>
-				< ! - - pick up mappings from here - - >
-			-->
                 <path path="${build.testresources.dir}"/>
-                <!-- dirset dir="${build.testresources.dir}">
-                    <include name="**/*.jar"/>
-                    <include name="**/*.par"/>
-                </dirset -->
                 <path refid="junit.classpath"/>
-
                 <fileset dir="${jdbc.dir}">
                     <include name="**/*.jar"/>
                     <include name="**/*.zip"/>
@@ -266,20 +220,10 @@
             </classpath>
             <formatter type="plain"/>
 			<formatter type="xml"/>
-			<test fork="yes" todir="test_output" haltonfailure="no" name="${testname}"/>
+			<test fork="yes" todir="${testreports.dir}" haltonfailure="no" name="${testname}"/>
 		</junit>
 	</target>
 
-	<!-- target name="report">
-			<mkdir dir="test_output"/>
-			<junitreport todir="test_output">
-			  <fileset dir="test_output">
-				<include name="TEST-*.xml"/>
-			  </fileset>
-			  <report format="frames" todir="test_output/report"/>
-			</junitreport>
-		</target -->
-
 	<target name="jar" depends="compile" description="Build the distribution .jar file">
 		<mkdir dir="${classes.dir}/META-INF"/>
 		<manifest file="${classes.dir}/META-INF/MANIFEST.MF">

Modified: search/trunk/common-build.xml
===================================================================
--- search/trunk/common-build.xml	2008-07-01 21:52:05 UTC (rev 14843)
+++ search/trunk/common-build.xml	2008-07-02 15:24:00 UTC (rev 14844)
@@ -13,10 +13,11 @@
 
     <property name="src.dir" location="src/java"/>
     <property name="test.dir" location="src/test"/>
-    <property name="lib.dir" location="lib"/>
+	<property name="lib.dir" location="lib"/>
     <property name="build.dir" location="build"/>
     <property name="classes.dir" location="${build.dir}/classes"/>
-    <property name="testclasses.dir" location="${build.dir}/testclasses"/>   
+    <property name="testclasses.dir" location="${build.dir}/testclasses"/> 
+	<property name="testreports.dir" location="${build.dir}/test-reports"/>  
 	<property name="dist.target.dir" location="target"/>
     <property name="dist.dir" location="${dist.target.dir}/${name}"/>
     <property name="instrumenttest.out.dir" value="instrumenttestout"/>
@@ -43,25 +44,23 @@
     <property name="pom.file" value="pom.xml"/>
     <property name="src.jar" value="${build.dir}/src.jar"/>
 
-    <!-- build related properties -->
-    <property name="build.lib.dir" value="${lib.dir}/build"/>
-
-	<taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
-		<classpath>
-			<fileset dir="${common-build.basedir}/lib/build"> <!-- ${build.lib.dir} fails in reference doc build -->
-			    <include name="junit-*.jar"/>
-                <include name="ant-junit-*.jar"/>
-			</fileset>
-		</classpath>
+	<taskdef name="junit"
+		classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
+		<classpath>
+			<fileset dir="${common-build.basedir}/lib/build"><!-- ${build.lib.dir} fails in reference doc build -->
+				<include name="junit-*.jar"/>
+				<include name="ant-junit-*.jar"/>
+			</fileset>
+		</classpath>
 	</taskdef>
 
 	<taskdef name="junitreport" classname="org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator">
-        <classpath>
-            <fileset dir="${common-build.basedir}/lib/build"> <!-- ${build.lib.dir} fails in reference doc build -->                 
-                <include name="junit-*.jar"/>
-                <include name="ant-junit-*.jar"/>
-            </fileset>
-        </classpath>
+		<classpath>
+			<fileset dir="${common-build.basedir}/lib/build"><!-- ${build.lib.dir} fails in reference doc build -->
+				<include name="junit-*.jar"/>
+				<include name="ant-junit-*.jar"/>
+			</fileset>
+		</classpath>
 	</taskdef>
 
     <!-- ivy load -->
@@ -82,9 +81,6 @@
     <artifact:remoteRepository id="offline.repository.jboss.org" url="file://${offline.repository.jboss.org}" />
 
     <path id="lib.class.path">
-        <fileset dir="${lib.dir}">
-            <include name="*.jar"/>
-        </fileset>
 		<path refid="lib.moduleclass.path"/>
 		<pathelement path="${clover.jar}"/>
     </path>
@@ -131,9 +127,6 @@
     <taskdef resource="clovertasks"/>   
    
     <path id="junit.classpath">
-           <fileset dir="${lib.dir}">
-                 <include name="*.jar"/>
-           </fileset>
            <pathelement path="${classes.dir}"/>
            <pathelement path="${testclasses.dir}"/>        
            <path refid="lib.class.path"/>
@@ -278,19 +271,19 @@
             </fileset>
         </copy>
     </target>
-
-    <target name="copylib" description="Copy jars to lib dir">
-        <mkdir dir="${dist.lib.dir}"/>
-        <copy todir="${dist.lib.dir}">
-            <fileset dir="${lib.dir}">
-                <include name="*.jar"/>
-                <exclude name="log4j.jar"/>
-                <exclude name="checkstyle*.jar"/>
-                <include name="*.txt"/>
-            </fileset>
-        </copy>
-    </target>
-
+	
+	<target name="copylib" description="Copy jars to lib dir">
+		<mkdir dir="${dist.lib.dir}"/>
+		<copy todir="${dist.lib.dir}" verbose="true">
+			<fileset dir="${lib.dir}">
+				<include name="**/*.jar"/>
+				<exclude name="log4j.jar"/>
+				<exclude name="checkstyle*.jar"/>
+				<include name="*.txt"/>
+			</fileset>
+		</copy>
+	</target>
+		
 	<target name="copydoc" description="Copy doc to dist dir" if="copy.doc">
         <mkdir dir="${dist.doc.dir}"/>
         <copy todir="${dist.doc.dir}">
@@ -351,7 +344,7 @@
 		</replace>
 	</target>
 
-	<target name="dist" depends="jar,javadoc,copysource,copylib,copydoc,extras" description="Build everything">
+	<target name="dist" depends="jar,javadoc,copysource,copydoc,extras" description="Build everything">
 		<zip zipfile = "${dist.dir}-${version}.zip">
 			<zipfileset prefix="${name}-${version}" dir="${dist.dir}"/>
 		</zip>
@@ -377,12 +370,12 @@
     </target>
 
     <target name="junit" depends="compiletest">
-        <mkdir dir="test_output"/>
+        <mkdir dir="${testreports.dir}"/>
         <junit printsummary="yes" haltonfailure="yes" forkmode="once">
             <classpath refid="junit.classpath"/>
             <formatter type="plain"/>
             <formatter type="xml"/>
-            <batchtest fork="yes" todir="test_output" haltonfailure="no">
+            <batchtest fork="yes" todir="${testreports.dir}" haltonfailure="no">
             	<fileset refid="junit.batchtestset"/>
             </batchtest>
         </junit>
@@ -390,12 +383,12 @@
 
 	<!-- 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"/>
+		<mkdir dir="${testreports.dir}"/>
 		<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}"/>
+			<test fork="yes" todir="${testreports.dir}" haltonfailure="no" name="${testname}"/>
 		</junit>
 	</target>
 
@@ -416,11 +409,11 @@
 	</target>
 
     <target name="junitreport" depends="">
-        <junitreport todir="./test_output">
-            <fileset dir="test_output">
+        <junitreport todir="${testreports.dir}">
+            <fileset dir="${testreports.dir}">
                 <include name="TEST-*.xml"/>
             </fileset>
-            <report format="frames" todir="./test_output"/>
+            <report format="frames" todir="${testreports.dir}"/>
         </junitreport>
     </target>
 

Modified: search/trunk/ivy/ivyconf.xml
===================================================================
--- search/trunk/ivy/ivyconf.xml	2008-07-01 21:52:05 UTC (rev 14843)
+++ search/trunk/ivy/ivyconf.xml	2008-07-02 15:24:00 UTC (rev 14844)
@@ -9,9 +9,13 @@
         </chain>
         <chain name="rep-hibernate" returnFirst="true" latest="latest-revision">
             <filesystem name="local">
-                <ivy pattern="../[module]/target/[revision]/ivy.xml"/>
-                <artifact pattern="../[module]/target/[revision]/[artifact].[ext]"/>
+                <ivy pattern="../[module]/target/hibernate-[module]/ivy.xml"/>
+                <artifact pattern="../[module]/target/hibernate-[module]/[artifact].[ext]"/>
             </filesystem>
+            <filesystem name="hudson-local">
+                <ivy pattern="../../[module]/trunk/target/hibernate-[module]/ivy.xml"/>
+                <artifact pattern="../../[module]/trunk/target/hibernate-[module]/[artifact].[ext]"/>
+            </filesystem>            
             <filesystem name="maven-local" m2compatible="true">
                 <artifact pattern="${offline.repository.jboss.org}/[organization]/hibernate-[module]/[revision]/hibernate-[artifact]-[revision].[ext]"/>
             </filesystem>

Modified: search/trunk/src/test/org/hibernate/search/test/bridge/Gangster.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/bridge/Gangster.java	2008-07-01 21:52:05 UTC (rev 14843)
+++ search/trunk/src/test/org/hibernate/search/test/bridge/Gangster.java	2008-07-02 15:24:00 UTC (rev 14844)
@@ -2,12 +2,12 @@
 package org.hibernate.search.test.bridge;
 
 import java.io.Serializable;
+
 import javax.persistence.Entity;
 import javax.persistence.Id;
-import javax.persistence.GeneratedValue;
 
+import org.hibernate.search.annotations.DocumentId;
 import org.hibernate.search.annotations.Indexed;
-import org.hibernate.search.annotations.DocumentId;
 
 /**
  * @author Emmanuel Bernard

Modified: search/trunk/src/test/org/hibernate/search/test/bridge/UnresolvedBridgeTest.java
===================================================================
--- search/trunk/src/test/org/hibernate/search/test/bridge/UnresolvedBridgeTest.java	2008-07-01 21:52:05 UTC (rev 14843)
+++ search/trunk/src/test/org/hibernate/search/test/bridge/UnresolvedBridgeTest.java	2008-07-02 15:24:00 UTC (rev 14844)
@@ -18,7 +18,7 @@
 		}
 		cfg.setProperty( "hibernate.search.default.directory_provider", RAMDirectoryProvider.class.getName() );
 		try {
-			cfg.buildSessionFactory( /*new TestInterceptor()*/ );
+			cfg.buildSessionFactory();
 			fail("Undefined bridge went through");
 		}
 		catch( Exception e ) {
@@ -38,6 +38,7 @@
 		}
 	}
 
+	@SuppressWarnings("unchecked")
 	protected Class[] getMappings() {
 		return new Class[] {
 				Gangster.class




More information about the hibernate-commits mailing list