lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r951767 - in /lucene/java/branches/lucene_2_9: ./ contrib/ contrib/ant/ contrib/benchmark/ contrib/collation/ contrib/db/bdb-je/ contrib/db/bdb/ contrib/fast-vector-highlighter/ contrib/remote/ contrib/spatial/ contrib/xml-query-parser/
Date Sat, 05 Jun 2010 21:01:07 GMT
Author: uschindler
Date: Sat Jun  5 21:01:06 2010
New Revision: 951767

URL: http://svn.apache.org/viewvc?rev=951767&view=rev
Log:
LUCENE-2488: Support build with JDK 1.4 and exclude Java 1.5 contrib modules on request (pass
'-Dforce.jdk14.build=true') when compiling/testing/packaging. This marks the benchmark contrib
also as Java 1.5, as it depends on fast-vector-highlighter.

Modified:
    lucene/java/branches/lucene_2_9/CHANGES.txt
    lucene/java/branches/lucene_2_9/common-build.xml
    lucene/java/branches/lucene_2_9/contrib/ant/build.xml
    lucene/java/branches/lucene_2_9/contrib/benchmark/build.xml
    lucene/java/branches/lucene_2_9/contrib/collation/build.xml
    lucene/java/branches/lucene_2_9/contrib/contrib-build.xml
    lucene/java/branches/lucene_2_9/contrib/db/bdb-je/build.xml
    lucene/java/branches/lucene_2_9/contrib/db/bdb/build.xml
    lucene/java/branches/lucene_2_9/contrib/fast-vector-highlighter/build.xml
    lucene/java/branches/lucene_2_9/contrib/remote/build.xml
    lucene/java/branches/lucene_2_9/contrib/spatial/build.xml
    lucene/java/branches/lucene_2_9/contrib/xml-query-parser/build.xml

Modified: lucene/java/branches/lucene_2_9/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/CHANGES.txt?rev=951767&r1=951766&r2=951767&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/CHANGES.txt (original)
+++ lucene/java/branches/lucene_2_9/CHANGES.txt Sat Jun  5 21:01:06 2010
@@ -129,6 +129,13 @@ Optimizations
 * LUCENE-2360: Small speedup to recycling of reused per-doc RAM in
   IndexWriter (Robert Muir, Mike McCandless)
 
+Build
+
+* LUCENE-2488: Support build with JDK 1.4 and exclude Java 1.5 contrib
+  modules on request (pass '-Dforce.jdk14.build=true') when
+  compiling/testing/packaging. This marks the benchmark contrib also
+  as Java 1.5, as it depends on fast-vector-highlighter. (Uwe Schindler)
+
 ======================= Release 2.9.2 2010-02-26 =======================
 
 Bug fixes

Modified: lucene/java/branches/lucene_2_9/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/common-build.xml?rev=951767&r1=951766&r2=951767&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/common-build.xml (original)
+++ lucene/java/branches/lucene_2_9/common-build.xml Sat Jun  5 21:01:06 2010
@@ -107,9 +107,7 @@
   <property name="svnversion.exe" value="svnversion" />
   <property name="svn.exe" value="svn" />
   
-  <condition property="build-1-5-contrib">
-     <equals arg1="1.5" arg2="${ant.java.version}" />
-  </condition>
+  <available property="build-1-5-contrib" classname="java.lang.StringBuilder" />
   
   <property name="clover.db.dir" location="${common.dir}/build/test/clover/db"/>
   <property name="clover.report.dir" location="${common.dir}/build/test/clover/reports"/>

Modified: lucene/java/branches/lucene_2_9/contrib/ant/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/contrib/ant/build.xml?rev=951767&r1=951766&r2=951767&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/contrib/ant/build.xml (original)
+++ lucene/java/branches/lucene_2_9/contrib/ant/build.xml Sat Jun  5 21:01:06 2010
@@ -33,7 +33,7 @@
                refid="additional.dependencies"
   />
 
-  <target name="compile-core" depends="common.compile-core">
+  <target name="compile-core" depends="contrib-build.compile-core">
     <copy todir="${build.dir}/classes/java">
       <fileset dir="src/java" includes="**/*.xml"/>
     </copy>

Modified: lucene/java/branches/lucene_2_9/contrib/benchmark/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/contrib/benchmark/build.xml?rev=951767&r1=951766&r2=951767&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/contrib/benchmark/build.xml (original)
+++ lucene/java/branches/lucene_2_9/contrib/benchmark/build.xml Sat Jun  5 21:01:06 2010
@@ -5,6 +5,9 @@
         Lucene Benchmarking Contributions
     </description>
 
+    <property name="javac.source" value="1.5" />
+    <property name="javac.target" value="1.5" />
+
     <import file="../contrib-build.xml"/>
     <property name="working.dir" location="work"/>
 
@@ -161,11 +164,11 @@
       </subant>
     </target>
 
-    <target name="init" depends="common.init,compile-demo,compile-memory,compile-highlighter,compile-vector-highlighter,check-files"/>
+    <target name="init" depends="contrib-build.init,compile-demo,compile-memory,compile-highlighter,compile-vector-highlighter,check-files"/>
 
     <!-- make sure online collections (reuters) are first downloaded -->
     <target name="test" depends="init,get-files">
-      <antcall target="common.test" inheritRefs="true" />
+      <antcall target="contrib-build.test" inheritRefs="true" />
     </target>
     
 </project>

Modified: lucene/java/branches/lucene_2_9/contrib/collation/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/contrib/collation/build.xml?rev=951767&r1=951766&r2=951767&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/contrib/collation/build.xml (original)
+++ lucene/java/branches/lucene_2_9/contrib/collation/build.xml Sat Jun  5 21:01:06 2010
@@ -43,7 +43,7 @@
     </subant>
   </target>
 
-  <target name="init" depends="common.init,compile-misc"/>
+  <target name="init" depends="contrib-build.init,compile-misc"/>
 
   <target name="compile" depends="init">
     <antcall target="common.compile" inheritRefs="true" />

Modified: lucene/java/branches/lucene_2_9/contrib/contrib-build.xml
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/contrib/contrib-build.xml?rev=951767&r1=951766&r2=951767&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/contrib/contrib-build.xml (original)
+++ lucene/java/branches/lucene_2_9/contrib/contrib-build.xml Sat Jun  5 21:01:06 2010
@@ -31,7 +31,37 @@
   <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" />
+  
+  <condition property="build.this.contrib">
+    <or>
+      <equals arg1="1.4" arg2="${javac.source}" />
+      <equals arg1="1.4" arg2="${javac.target}" />
+      <isset property="build-1-5-contrib" />
+    </or>
+  </condition>
+  
+  <condition property="fail.this.contrib">
+    <not>
+      <or>
+        <isset property="build.this.contrib" />
+        <isset property="force.jdk14.build" />
+      </or>
+    </not>
+  </condition>
+  
+  <condition property="contrib.has.tests">
+    <and>
+      <isset property="build.this.contrib" />
+      <available type="dir" file="src/test" />
+    </and>
+  </condition>
+  
+  <condition property="pom.xml.present">
+    <and>
+      <isset property="build.this.contrib" />
+      <available type="file" file="${pom.xml}" />
+    </and>
+  </condition>
   
   <path id="classpath">
    <pathelement path="${lucene.jar}"/>
@@ -59,22 +89,33 @@
   <target name="build-lucene-tests" unless="lucene.tests.present">
     <ant dir="${common.dir}" target="compile-test" inheritAll="false"/>
   </target>
+  
+  <target name="warn-jdk14-contrib" unless="build.this.contrib">
+    <echo message="Contrib '${name}' needs at least JDK 1.5 to build. BUILD DISABLED!"
level="warning" />
+  </target>
+  
+  <target name="fail-jdk14-contrib" if="fail.this.contrib">
+    <fail message="Contrib '${name}' needs at least JDK 1.5 to build. If you only want
to compile Java 1.4 compatible contribs, add '-Dforce.jdk14.build=true' to command line."/>
+  </target>
 
+  <target name="init" depends="common.init,fail-jdk14-contrib,warn-jdk14-contrib,build-lucene,build-lucene-tests"/>
   
-  <target name="init" depends="common.init,build-lucene,build-lucene-tests"/>
+  <target name="compile-core" if="build.this.contrib">
+    <antcall target="common.compile-core" inheritRefs="true" />
+  </target>
+  <target name="jar-core" if="build.this.contrib">
+    <antcall target="common.jar-core" inheritRefs="true" />
+  </target>
+  <target name="jar-src" if="build.this.contrib">
+    <antcall target="common.jar-src" inheritRefs="true" />
+  </target>
   <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" />
-	
-  <available 
-    type="file" 
-    file="${pom.xml}" 
-    property="pom.xml.present">
-  </available>
+  <target name="build-artifacts-and-tests" depends="jar, compile-test" if="build.this.contrib"
/>
 			
   <target name="dist-maven" if="pom.xml.present" depends="compile-core, jar-src">
     <sequential>
@@ -89,7 +130,7 @@
     </sequential>
   </target>
 
-  <target name="javadocs">
+  <target name="javadocs" if="build.this.contrib">
    	<sequential>
        <mkdir dir="${javadoc.dir}/contrib-${name}"/>
        <invoke-javadoc
@@ -104,7 +145,7 @@
     </sequential>
   </target>	
 
-  <target name="javadocs-index.html" description="Generate line for index.html of JavaDocs">
+  <target name="javadocs-index.html" description="Generate line for index.html of JavaDocs"
if="build.this.contrib">
     <echo file="${javadoc.dir}/index.html" append="true">
 <![CDATA[
   <li><a href="contrib-${name}/index.html">${name}</a></li>

Modified: lucene/java/branches/lucene_2_9/contrib/db/bdb-je/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/contrib/db/bdb-je/build.xml?rev=951767&r1=951766&r2=951767&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/contrib/db/bdb-je/build.xml (original)
+++ lucene/java/branches/lucene_2_9/contrib/db/bdb-je/build.xml Sat Jun  5 21:01:06 2010
@@ -23,14 +23,13 @@
 
   <property name="je.version" value="3.3.69" />
 
+  <property name="javac.source" value="1.5" />
+  <property name="javac.target" value="1.5" />
+
   <path id="je.jar">
     <pathelement location="lib/je-${je.version}/lib/je-${je.version}.jar" />
   </path>
 
-  <available classname="com.sleepycat.je.Database" property="je.jar.exists">
-    <classpath refid="je.jar" />
-  </available>
-
   <pathconvert property="project.classpath" targetos="unix" refid="je.jar" />
 
   <property name="build.dir" location="../../../build/contrib/db/bdb-je" />
@@ -46,7 +45,13 @@
     <pathelement location="${build.dir}/classes/java"/>
   </path>
 
-  <target name="get-je-jar" unless="je.jar.exists">
+  <target name="checkJAR" if="build.this.contrib">
+    <available classname="com.sleepycat.je.Database" property="je.jar.exists">
+      <classpath refid="je.jar" />
+    </available>
+  </target>
+
+  <target name="get-je-jar" unless="je.jar.exists" if="build.this.contrib">
     <mkdir dir="lib" />
     <get src="http://download.oracle.com/berkeley-db/je-${je.version}.zip"
          dest="lib/je-${je.version}.zip" />
@@ -57,6 +62,6 @@
     </unzip>
   </target>
 
-  <target name="check-and-get-je-jar" depends="get-je-jar" />
-  <target name="init" depends="contrib-build.init,check-and-get-je-jar" />
+  <target name="check-and-get-je-jar" depends="get-je-jar" if="build.this.contrib" />
+  <target name="init" depends="contrib-build.init,checkJAR,check-and-get-je-jar" />
 </project>

Modified: lucene/java/branches/lucene_2_9/contrib/db/bdb/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/contrib/db/bdb/build.xml?rev=951767&r1=951766&r2=951767&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/contrib/db/bdb/build.xml (original)
+++ lucene/java/branches/lucene_2_9/contrib/db/bdb/build.xml Sat Jun  5 21:01:06 2010
@@ -23,14 +23,13 @@
 
   <property name="db.version" value="4.7.25" />
 
+  <property name="javac.source" value="1.5" />
+  <property name="javac.target" value="1.5" />
+
   <path id="db.jar">
     <pathelement location="lib/db-${db.version}.jar" />
   </path>
-
-  <available classname="com.sleepycat.db.internal.Db" property="db.jar.exists">
-    <classpath refid="db.jar" />
-  </available>
-
+  
   <pathconvert property="project.classpath" targetos="unix" refid="db.jar" />
 
   <property name="build.dir" location="../../../build/contrib/db/bdb" />
@@ -46,13 +45,19 @@
     <pathelement location="${build.dir}/classes/java"/>
   </path>
 
-  <target name="get-db-jar" unless="db.jar.exists">
+  <target name="checkJAR" if="build.this.contrib">
+    <available classname="com.sleepycat.db.internal.Db" property="db.jar.exists">
+      <classpath refid="db.jar" />
+    </available>
+  </target>
+
+  <target name="get-db-jar" unless="db.jar.exists" if="build.this.contrib">
     <mkdir dir="lib" />
     <get src="http://downloads.osafoundation.org/db/db-${db.version}.jar"
          dest="lib/db-${db.version}.jar" />
   </target>
 
-  <target name="sanity-load-lib" depends="compile-test">
+  <target name="sanity-load-lib" depends="compile-test" if="build.this.contrib">
     <java classname="org.apache.lucene.store.db.SanityLoadLibrary"
           classpathref="junit.classpath"
           fork="true"
@@ -75,10 +80,10 @@
   </target>
   <target name="test" depends="sanity-load-lib,warn-no-lib"
                       unless="no-bdb-lib">
-    <antcall target="common.test" inheritAll="true" inheritRefs="true" />
+    <antcall target="contrib-build.test" inheritAll="true" inheritRefs="true" />
   </target>
 
   <target name="check-and-get-db-jar" depends="get-db-jar" />
-  <target name="init" depends="contrib-build.init,check-and-get-db-jar" />
+  <target name="init" depends="contrib-build.init,checkJAR,check-and-get-db-jar" />
 
 </project>

Modified: lucene/java/branches/lucene_2_9/contrib/fast-vector-highlighter/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/contrib/fast-vector-highlighter/build.xml?rev=951767&r1=951766&r2=951767&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/contrib/fast-vector-highlighter/build.xml (original)
+++ lucene/java/branches/lucene_2_9/contrib/fast-vector-highlighter/build.xml Sat Jun  5 21:01:06
2010
@@ -37,7 +37,7 @@
     <pathelement path="${project.classpath}"/>
   </path>
 
-  <target name="compile-core" depends="build-analyzers, common.compile-core" />
+  <target name="compile-core" depends="build-analyzers, contrib-build.compile-core" />
 
   <target name="build-analyzers" unless="analyzers.jar.present">
     <echo>Fast Vector Highlighter building dependency ${analyzers.jar}</echo>

Modified: lucene/java/branches/lucene_2_9/contrib/remote/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/contrib/remote/build.xml?rev=951767&r1=951766&r2=951767&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/contrib/remote/build.xml (original)
+++ lucene/java/branches/lucene_2_9/contrib/remote/build.xml Sat Jun  5 21:01:06 2010
@@ -26,7 +26,7 @@
 	<import file="../contrib-build.xml"/>
 	
 	<!-- Overrides common.compile-core to add rmic -->
-	<target name="compile-core" depends="common.compile-core" description="Compiles core
classes, including rmic">
+	<target name="compile-core" depends="contrib-build.compile-core" description="Compiles
core classes, including rmic">
 		<rmic classname="org.apache.lucene.search.RemoteSearchable" base="${build.dir}/classes/java"
stubversion="1.2">
 			<classpath refid="classpath" />
 		</rmic>

Modified: lucene/java/branches/lucene_2_9/contrib/spatial/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/contrib/spatial/build.xml?rev=951767&r1=951766&r2=951767&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/contrib/spatial/build.xml (original)
+++ lucene/java/branches/lucene_2_9/contrib/spatial/build.xml Sat Jun  5 21:01:06 2010
@@ -37,7 +37,7 @@
     <pathelement path="${project.classpath}"/>
   </path>
 
-  <target name="compile-core" depends="build-misc, common.compile-core" />
+  <target name="compile-core" depends="build-misc, contrib-build.compile-core" />
 
   <target name="build-misc" unless="memory.jar.present">
     <echo>Misc building dependency ${misc.jar}</echo>

Modified: lucene/java/branches/lucene_2_9/contrib/xml-query-parser/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9/contrib/xml-query-parser/build.xml?rev=951767&r1=951766&r2=951767&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9/contrib/xml-query-parser/build.xml (original)
+++ lucene/java/branches/lucene_2_9/contrib/xml-query-parser/build.xml Sat Jun  5 21:01:06
2010
@@ -44,7 +44,7 @@
     <pathelement path="${build.dir}/${final.name}.jar"/>
   </path>
 
-  <target name="compile-core" depends="build-queries, common.compile-core" />
+  <target name="compile-core" depends="build-queries, contrib-build.compile-core" />
 
   <target name="build-queries" unless="queries.jar.present">
     <echo>XML Parser building dependency ${queries.jar}</echo>



Mime
View raw message