Move to 2.9 branch for backwards tests and enable compilation with source/target=1.4

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@820362 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2009-09-30 17:37:49 +00:00
parent 1577ea694a
commit 5b71d96818
2 changed files with 20 additions and 9 deletions

View File

@ -112,7 +112,7 @@
</target> </target>
<target name="test-tag" depends="download-tag, compile-core, compile-demo, jar-core" <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> <sequential>
<available property="tag.available" file="${tags.dir}/${tag}/src/test" /> <available property="tag.available" file="${tags.dir}/${tag}/src/test" />
@ -124,7 +124,8 @@
<!-- first compile tag classes --> <!-- first compile tag classes -->
<compile <compile
srcdir="${tags.dir}/${tag}/src/java" 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"/> <classpath refid="tag.classpath"/>
</compile> </compile>
@ -134,7 +135,7 @@
<!-- compile tag tests against tag jar --> <!-- compile tag tests against tag jar -->
<compile-test-macro srcdir="${tags.dir}/${tag}/src/test" destdir="${build.dir}/${tag}/classes/test" <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 --> <!-- run tag tests against trunk jar -->
<test-macro dataDir="${tags.dir}/${tag}/src/test" <test-macro dataDir="${tags.dir}/${tag}/src/test"

View File

@ -40,9 +40,9 @@
<property name="name" value="${ant.project.name}"/> <property name="name" value="${ant.project.name}"/>
<property name="Name" value="Lucene"/> <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="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="spec.version" value="${version}"/>
<property name="year" value="2000-${current.year}"/> <property name="year" value="2000-${current.year}"/>
<property name="final.name" value="lucene-${name}-${version}"/> <property name="final.name" value="lucene-${name}-${version}"/>
@ -60,6 +60,8 @@
<property name="javac.debug" value="on"/> <property name="javac.debug" value="on"/>
<property name="javac.source" value="1.5"/> <property name="javac.source" value="1.5"/>
<property name="javac.target" 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.link" value="http://java.sun.com/j2se/1.5/docs/api/"/>
<property name="javadoc.access" value="protected"/> <property name="javadoc.access" value="protected"/>
@ -358,10 +360,14 @@
<attribute name="srcdir"/> <attribute name="srcdir"/>
<attribute name="destdir"/> <attribute name="destdir"/>
<attribute name="test.classpath"/> <attribute name="test.classpath"/>
<attribute name="javac.source" default="${javac.source}"/>
<attribute name="javac.target" default="${javac.target}"/>
<sequential> <sequential>
<compile <compile
srcdir="@{srcdir}" srcdir="@{srcdir}"
destdir="@{destdir}"> destdir="@{destdir}"
javac.source="@{javac.source}"
javac.target="@{javac.source}">
<classpath refid="@{test.classpath}"/> <classpath refid="@{test.classpath}"/>
</compile> </compile>
@ -534,6 +540,8 @@
<macrodef name="compile"> <macrodef name="compile">
<attribute name="srcdir"/> <attribute name="srcdir"/>
<attribute name="destdir"/> <attribute name="destdir"/>
<attribute name="javac.source" default="${javac.source}"/>
<attribute name="javac.target" default="${javac.target}"/>
<element name="nested" implicit="yes" optional="yes"/> <element name="nested" implicit="yes" optional="yes"/>
<sequential> <sequential>
@ -544,11 +552,13 @@
destdir="@{destdir}" destdir="@{destdir}"
deprecation="${javac.deprecation}" deprecation="${javac.deprecation}"
debug="${javac.debug}" debug="${javac.debug}"
source="${javac.source}" source="@{javac.source}"
target="${javac.target}"> target="@{javac.target}">
<nested/> <nested/>
<compilerarg line="-Xmaxwarns 10000000"/> <compilerarg line="-Xmaxwarns 10000000"/>
<compilerarg line="-Xmaxerrs 10000000"/> <compilerarg line="-Xmaxerrs 10000000"/>
<!-- for generics in Java 1.5: -->
<!--<compilerarg line="-Xlint:unchecked"/>-->
</javac> </javac>
</sequential> </sequential>
</macrodef> </macrodef>