You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by us...@apache.org on 2009/09/30 19:37:50 UTC

svn commit: r820362 - in /lucene/java/trunk: build.xml common-build.xml

Author: uschindler
Date: Wed Sep 30 17:37:49 2009
New Revision: 820362

URL: http://svn.apache.org/viewvc?rev=820362&view=rev
Log:
Move to 2.9 branch for backwards tests and enable compilation with source/target=1.4

Modified:
    lucene/java/trunk/build.xml
    lucene/java/trunk/common-build.xml

Modified: lucene/java/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/build.xml?rev=820362&r1=820361&r2=820362&view=diff
==============================================================================
--- lucene/java/trunk/build.xml (original)
+++ lucene/java/trunk/build.xml Wed Sep 30 17:37:49 2009
@@ -112,7 +112,7 @@
   </target>
 	
   <target name="test-tag" depends="download-tag, compile-core, compile-demo, jar-core"
-  	description="Runs tests of a previous Lucene version. Specify tag version like this: -Dtag=branches/lucene_2_4_back_compat_tests">
+  	description="Runs tests of a previous Lucene version. Specify tag version like this: -Dtag=branches/lucene_2_9_back_compat_tests">
 	<sequential>
       <available property="tag.available" file="${tags.dir}/${tag}/src/test" />
 
@@ -120,11 +120,12 @@
 	  	Specified tag '${tag}' could not be found in directory '${tags.dir}/${tag}'.
 	  </fail>
 	  <mkdir dir="${build.dir}/${tag}"/>	  
-		
+
 	  <!-- first compile tag classes -->
 	  <compile
 	    srcdir="${tags.dir}/${tag}/src/java"
-	    destdir="${build.dir}/${tag}/classes/java">
+	    destdir="${build.dir}/${tag}/classes/java"
+      javac.source="${javac.source.tag}" javac.target="${javac.target.tag}">
 	  <classpath refid="tag.classpath"/>
 	  </compile>
 
@@ -134,7 +135,7 @@
 		  	
 	  <!-- compile tag tests against tag jar -->	
 	  <compile-test-macro srcdir="${tags.dir}/${tag}/src/test" destdir="${build.dir}/${tag}/classes/test"
-			  			  test.classpath="tag.test.classpath"/>
+			  			  test.classpath="tag.test.classpath" javac.source="${javac.source.tag}" javac.target="${javac.target.tag}"/>
 		
 	  <!-- run tag tests against trunk jar -->
       <test-macro dataDir="${tags.dir}/${tag}/src/test" 

Modified: lucene/java/trunk/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/common-build.xml?rev=820362&r1=820361&r2=820362&view=diff
==============================================================================
--- lucene/java/trunk/common-build.xml (original)
+++ lucene/java/trunk/common-build.xml Wed Sep 30 17:37:49 2009
@@ -40,9 +40,9 @@
 
   <property name="name" value="${ant.project.name}"/>
   <property name="Name" value="Lucene"/>
-  <property name="dev.version" value="2.9"/>
+  <property name="dev.version" value="3.0-dev"/>
   <property name="version" value="${dev.version}"/>
-  <property name="compatibility.tag" value="lucene_2_4_back_compat_tests_20090911"/>
+  <property name="compatibility.tag" value="lucene_2_9_back_compat_tests_20090930a"/>
   <property name="spec.version" value="${version}"/>	
   <property name="year" value="2000-${current.year}"/>
   <property name="final.name" value="lucene-${name}-${version}"/>
@@ -60,6 +60,8 @@
   <property name="javac.debug" value="on"/>
   <property name="javac.source" value="1.5"/>
   <property name="javac.target" value="1.5"/>
+  <property name="javac.source.tag" value="1.4"/>
+  <property name="javac.target.tag" value="1.4"/>
 
   <property name="javadoc.link" value="http://java.sun.com/j2se/1.5/docs/api/"/>
   <property name="javadoc.access" value="protected"/>
@@ -358,10 +360,14 @@
   	<attribute name="srcdir"/>
   	<attribute name="destdir"/>
   	<attribute name="test.classpath"/>
+    <attribute name="javac.source" default="${javac.source}"/>
+    <attribute name="javac.target" default="${javac.target}"/>
    	<sequential>
       <compile
         srcdir="@{srcdir}" 
-        destdir="@{destdir}">
+        destdir="@{destdir}"
+        javac.source="@{javac.source}"
+        javac.target="@{javac.source}">
         <classpath refid="@{test.classpath}"/>
       </compile>
 
@@ -534,6 +540,8 @@
   <macrodef name="compile">
     <attribute name="srcdir"/>
     <attribute name="destdir"/>
+    <attribute name="javac.source" default="${javac.source}"/>
+    <attribute name="javac.target" default="${javac.target}"/>
     <element name="nested" implicit="yes" optional="yes"/>
 
     <sequential>
@@ -544,11 +552,13 @@
         destdir="@{destdir}"
         deprecation="${javac.deprecation}"
         debug="${javac.debug}"
-        source="${javac.source}"
-        target="${javac.target}">
+        source="@{javac.source}"
+        target="@{javac.target}">
         <nested/>
         <compilerarg line="-Xmaxwarns 10000000"/>
         <compilerarg line="-Xmaxerrs 10000000"/>
+        <!-- for generics in Java 1.5: -->
+        <!--<compilerarg line="-Xlint:unchecked"/>-->
       </javac>
     </sequential>
   </macrodef>