lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoss...@apache.org
Subject svn commit: r546226 - in /lucene/java/trunk: ./ contrib/ contrib/benchmark/ contrib/db/ contrib/db/bdb-je/ contrib/db/bdb/ contrib/gdata-server/ contrib/spellchecker/
Date Mon, 11 Jun 2007 19:29:42 GMT
Author: hossman
Date: Mon Jun 11 12:29:41 2007
New Revision: 546226

URL: http://svn.apache.org/viewvc?view=rev&rev=546226
Log:
LUCENE-930: Various contrib building improvements to ensure contrib dependencies are met,
and test compilation errors fail the build.

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/build.xml
    lucene/java/trunk/contrib/benchmark/build.xml
    lucene/java/trunk/contrib/contrib-build.xml
    lucene/java/trunk/contrib/db/bdb-je/build.xml
    lucene/java/trunk/contrib/db/bdb/build.xml
    lucene/java/trunk/contrib/db/build.xml
    lucene/java/trunk/contrib/gdata-server/build.xml
    lucene/java/trunk/contrib/spellchecker/build.xml

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?view=diff&rev=546226&r1=546225&r2=546226
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Mon Jun 11 12:29:41 2007
@@ -305,6 +305,10 @@
     jar and makes sure that the lucli jar contains LICENSE.txt and NOTICE.txt.
     (Chris Hostetter, Michael Busch)
 
+ 9. LUCENE-930: Various contrib building improvements to ensure contrib
+    dependencies are met, and test compilation errors fail the build.
+    (Steven Parkes, Chris Hostetter)
+
 ======================= Release 2.1.0 2007-02-14 =======================
 
 Changes in runtime behavior

Modified: lucene/java/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/build.xml?view=diff&rev=546226&r1=546225&r2=546226
==============================================================================
--- lucene/java/trunk/build.xml (original)
+++ lucene/java/trunk/build.xml Mon Jun 11 12:29:41 2007
@@ -96,7 +96,7 @@
           description="Runs unit tests for the core Lucene code"
   />
   <target name="test" depends="test-core, test-contrib"
-          description="Runs all unit tests"
+          description="Runs all unit tests (including contribs)"
   />
   
   <!-- ================================================================== -->
@@ -435,14 +435,20 @@
     </sequential>
   </macrodef>
 
-  <target name="build-contrib" depends="compile-test">
-    <contrib-crawl/>
+  <target name="build-contrib"
+          description="Builds all contrib modules and their tests">
+    <contrib-crawl target="build-artifacts-and-tests"/>
   </target>
 
-  <target name="test-contrib" depends="compile-test">
-    <!-- don't fail on error, instead check for flag file so we run
+  <target name="test-contrib" depends="build-contrib">
+    <!-- Don't fail on error, instead check for flag file so we run
          all the tests possible and can "ant generate-test-reports"
-         for all of them
+         for all of them.
+
+         Because of this, we depend on "build-contrib" even though the
+         Individual contrib "test" targets probably have the
+         neccessary dependencies.  If they fail to compile, we won't
+         know about it.
      -->
     <contrib-crawl target="test" failonerror="false"/>
     <available property="contribs.failed" file="junitfailed.flag">

Modified: lucene/java/trunk/contrib/benchmark/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/build.xml?view=diff&rev=546226&r1=546225&r2=546226
==============================================================================
--- lucene/java/trunk/contrib/benchmark/build.xml (original)
+++ lucene/java/trunk/contrib/benchmark/build.xml Mon Jun 11 12:29:41 2007
@@ -150,6 +150,6 @@
       </subant>
     </target> 
 
-    <target name="init" depends="common.init,compile-demo,check-files"/>
+    <target name="init" depends="contrib-build.init,compile-demo,check-files"/>
 
 </project>

Modified: lucene/java/trunk/contrib/contrib-build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/contrib-build.xml?view=diff&rev=546226&r1=546225&r2=546226
==============================================================================
--- lucene/java/trunk/contrib/contrib-build.xml (original)
+++ lucene/java/trunk/contrib/contrib-build.xml Mon Jun 11 12:29:41 2007
@@ -28,7 +28,10 @@
 
   <property name="lucene.jar" location="${common.dir}/build/lucene-core-${version}.jar"/>
   <available property="lucene.jar.present" type="file" file="${lucene.jar}"/>
-
+  <available property="lucene.tests.present" type="dir"
+             file="${common.dir}/build/classes/test" />
+  <available property="contrib.has.tests" type="dir" file="src/test" />
+  
   <path id="classpath">
    <pathelement path="${lucene.jar}"/>
    <pathelement path="${project.classpath}"/>
@@ -48,9 +51,20 @@
   </path>
 
   <target name="build-lucene" unless="lucene.jar.present">
-    <!-- TODO: some tests need some of Lucene's own test classes too -->
-    <ant antfile="${common.dir}/build.xml" target="jar-core" inheritall="false"/>
+    <ant dir="${common.dir}" target="jar-core" inheritAll="false"/>
+  </target>
+
+  <target name="build-lucene-tests" unless="lucene.tests.present">
+    <ant dir="${common.dir}" target="compile-test" inheritAll="false"/>
   </target>
 
+  
   <target name="init" depends="common.init,build-lucene"/>
+  <target name="compile-test" depends="init" if="contrib.has.tests">
+    <antcall target="common.compile-test" inheritRefs="true" />
+  </target>
+  <target name="test" depends="init" if="contrib.has.tests">
+    <antcall target="common.test" inheritRefs="true" />
+  </target>
+  <target name="build-artifacts-and-tests" depends="jar, compile-test" />
 </project>

Modified: lucene/java/trunk/contrib/db/bdb-je/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/db/bdb-je/build.xml?view=diff&rev=546226&r1=546225&r2=546226
==============================================================================
--- lucene/java/trunk/contrib/db/bdb-je/build.xml (original)
+++ lucene/java/trunk/contrib/db/bdb-je/build.xml Mon Jun 11 12:29:41 2007
@@ -34,5 +34,5 @@
   </target>
 
   <target name="check-and-get-je-jar" depends="get-je-jar" />
-  <target name="init" depends="common.init,check-and-get-je-jar" />
+  <target name="init" depends="contrib-build.init,check-and-get-je-jar" />
 </project>

Modified: lucene/java/trunk/contrib/db/bdb/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/db/bdb/build.xml?view=diff&rev=546226&r1=546225&r2=546226
==============================================================================
--- lucene/java/trunk/contrib/db/bdb/build.xml (original)
+++ lucene/java/trunk/contrib/db/bdb/build.xml Mon Jun 11 12:29:41 2007
@@ -55,6 +55,6 @@
   </target>
 
   <target name="check-and-get-db-jar" depends="get-db-jar" />
-  <target name="init" depends="common.init,check-and-get-db-jar" />
+  <target name="init" depends="contrib-build.init,check-and-get-db-jar" />
 
 </project>

Modified: lucene/java/trunk/contrib/db/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/db/build.xml?view=diff&rev=546226&r1=546225&r2=546226
==============================================================================
--- lucene/java/trunk/contrib/db/build.xml (original)
+++ lucene/java/trunk/contrib/db/build.xml Mon Jun 11 12:29:41 2007
@@ -39,10 +39,19 @@
     <ant dir="bdb" target="clean" />
     <ant dir="bdb-je" target="clean" />
   </target>
-
+  <target name="compile-core">
+    <ant dir="bdb" target="compile-core" />
+    <ant dir="bdb-je" target="compile-core" />
+  </target>
+  <target name="compile-test">
+    <ant dir="bdb" target="compile-test" />
+    <ant dir="bdb-je" target="compile-test" />
+  </target>
   <target name="test">
     <ant dir="bdb" target="test" />
     <ant dir="bdb-je" target="test" />
   </target>
+
+  <target name="build-artifacts-and-tests" depends="default,compile-test" />
 
 </project>

Modified: lucene/java/trunk/contrib/gdata-server/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/gdata-server/build.xml?view=diff&rev=546226&r1=546225&r2=546226
==============================================================================
--- lucene/java/trunk/contrib/gdata-server/build.xml (original)
+++ lucene/java/trunk/contrib/gdata-server/build.xml Mon Jun 11 12:29:41 2007
@@ -90,8 +90,7 @@
 		<ant dir="src/gom" target="jar-core" inheritRefs="true" />
 	</target>
 
-
-	<target name="test" depends="init" if="build-1-5-contrib">
+	<target name="test" depends="compile-test" if="build-1-5-contrib">
 		<ant dir="src/core" target="test" inheritRefs="true" />
 		<ant dir="src/gom" target="test" inheritRefs="true" />
 		<ant dir="src/hivemind" target="test" inheritRefs="true" />
@@ -129,5 +128,6 @@
   <target name="check-1-5" unless="build-1-5-contrib" >
      <echo>Java 1.5 support not availabble (or prohibited by explicitly set property)
... skipping task</echo>
   </target>
-         
+
+  <target name="build-artifacts-and-tests" depends="default,compile-test" />      
 
 </project>

Modified: lucene/java/trunk/contrib/spellchecker/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/spellchecker/build.xml?view=diff&rev=546226&r1=546225&r2=546226
==============================================================================
--- lucene/java/trunk/contrib/spellchecker/build.xml (original)
+++ lucene/java/trunk/contrib/spellchecker/build.xml Mon Jun 11 12:29:41 2007
@@ -24,4 +24,6 @@
   </description>
 
   <import file="../contrib-build.xml"/>
+  <target name="compile-test"
+          depends="build-lucene-tests,contrib-build.compile-test" />
 </project>



Mime
View raw message