Apache Lucene open-source search software
LUCENE-4747: Move to Java 7 in trunk
Uwe Schindler62315979747f
diff --git a/build.xml b/build.xmlindex 03391873d43..464dd363b6d 100644--- a/build.xml+++ b/build.xml@@ -210,7 +210,7 @@<echo>SUCCESS: You must right-click your project and choose Refresh.- Your project must use a Java 6 JRE.+ Your project must use a Java 7 JRE.</echo></target>@@ -274,16 +274,11 @@<property environment="env"/></target>- <target name="-env-JAVA6_HOME" depends="-load-env" if="env.JAVA6_HOME">- <property name="JAVA6_HOME" value="${env.JAVA6_HOME}"/>- </target>-<target name="-env-JAVA7_HOME" depends="-load-env" if="env.JAVA7_HOME"><property name="JAVA7_HOME" value="${env.JAVA7_HOME}"/></target>- <target name="nightly-smoke" description="Builds an unsigned release and smoke tests it" depends="clean,-env-JAVA6_HOME,-env-JAVA7_HOME">- <fail unless="JAVA6_HOME">JAVA6_HOME property or environment variable is not defined.</fail>+ <target name="nightly-smoke" description="Builds an unsigned release and smoke tests it" depends="clean,-env-JAVA7_HOME"><fail unless="JAVA7_HOME">JAVA7_HOME property or environment variable is not defined.</fail><subant target="prepare-release-no-sign" inheritall="false" failonerror="true"><fileset dir="lucene" includes="build.xml" />@@ -309,7 +304,6 @@<arg value="${fakeReleaseVersion}"/><arg file="${fakeReleaseTmp}"/><arg value="false"/>- <env key="JAVA6_HOME" file="${JAVA6_HOME}"/><env key="JAVA7_HOME" file="${JAVA7_HOME}"/></exec><delete dir="${fakeRelease}"/>diff --git a/dev-tools/eclipse/dot.settings/org.eclipse.jdt.core.prefs b/dev-tools/eclipse/dot.settings/org.eclipse.jdt.core.prefsindex 4334d56c90c..c8527279444 100644--- a/dev-tools/eclipse/dot.settings/org.eclipse.jdt.core.prefs+++ b/dev-tools/eclipse/dot.settings/org.eclipse.jdt.core.prefs@@ -1,7 +1,7 @@#Sun Sep 23 13:02:27 EDT 2012eclipse.preferences.version=1-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6-org.eclipse.jdt.core.compiler.compliance=1.6+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7+org.eclipse.jdt.core.compiler.compliance=1.7org.eclipse.jdt.core.compiler.doc.comment.support=enabledorg.eclipse.jdt.core.compiler.problem.assertIdentifier=errororg.eclipse.jdt.core.compiler.problem.enumIdentifier=error@@ -18,7 +18,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignoreorg.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabledorg.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabledorg.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public-org.eclipse.jdt.core.compiler.source=1.6+org.eclipse.jdt.core.compiler.source=1.7org.eclipse.jdt.core.formatter.align_type_members_on_columns=falseorg.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0diff --git a/dev-tools/maven/README.maven b/dev-tools/maven/README.mavenindex 9f728ed1a5f..ca8a7ca4841 100644--- a/dev-tools/maven/README.maven+++ b/dev-tools/maven/README.maven@@ -36,7 +36,7 @@ A. How to use nightly Jenkins-built Lucene/Solr Maven artifactsB. How to generate Lucene/Solr Maven artifacts- Prerequisites: JDK 1.6+ and Ant 1.8.2++ Prerequisites: JDK 1.7+ and Ant 1.8.2+Run 'ant generate-maven-artifacts' to create an internal Mavenrepository, including POMs, binary .jars, source .jars, and javadoc@@ -50,7 +50,7 @@ B. How to generate Lucene/Solr Maven artifactsC. How to deploy Maven artifacts to a repository- Prerequisites: JDK 1.6+ and Ant 1.8.2++ Prerequisites: JDK 1.7+ and Ant 1.8.2+You can deploy targets for all of Lucene/Solr, only Lucene, or only Solr,as in B. above. To deploy to a Maven repository, the command is the same@@ -77,7 +77,7 @@ D. How to use Maven to build Lucene/SolrThe details, followed by some example Maven commands:- 1. Prerequisites: JDK 1.6+ and Maven 2.2.1 or 3.0.X+ 1. Prerequisites: JDK 1.7+ and Maven 2.2.1 or 3.0.X2. Make sure your sources are up to date. If you checked your sources outfrom the Apache Subversion repository, run "svn update" from the topdiff --git a/dev-tools/maven/pom.xml.template b/dev-tools/maven/pom.xml.templateindex 57a7e8f2ba7..bce51c7c299 100644--- a/dev-tools/maven/pom.xml.template+++ b/dev-tools/maven/pom.xml.template@@ -43,7 +43,7 @@<vc-browse-base-url>http://svn.apache.org/viewvc/lucene/dev/trunk</vc-browse-base-url><base.specification.version>5.0.0</base.specification.version><maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>- <java.compat.version>1.6</java.compat.version>+ <java.compat.version>1.7</java.compat.version><jetty.version>8.1.8.v20121106</jetty.version><slf4j.version>1.6.4</slf4j.version><tika.version>1.3</tika.version>diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.pyindex 9b6aa9a7825..631421a4ff5 100644--- a/dev-tools/scripts/smokeTestRelease.py+++ b/dev-tools/scripts/smokeTestRelease.py@@ -56,9 +56,7 @@ def unshortenURL(url):return urldef javaExe(version):- if version == '1.6':- path = JAVA6_HOME- elif version == '1.7':+ if version == '1.7':path = JAVA7_HOMEelse:raise RuntimeError("unknown Java version '%s'" % version)@@ -73,11 +71,6 @@ def verifyJavaVersion(version):# http://s.apache.org/lusolr32rc2env = os.environ-try:- JAVA6_HOME = env['JAVA6_HOME']-except KeyError:- JAVA6_HOME = '/usr/local/jdk1.6.0_27'-print('JAVA6_HOME is %s' % JAVA6_HOME)try:JAVA7_HOME = env['JAVA7_HOME']@@ -85,7 +78,6 @@ except KeyError:JAVA7_HOME = '/usr/local/jdk1.7.0_01'print('JAVA7_HOME is %s' % JAVA7_HOME)-verifyJavaVersion('1.6')verifyJavaVersion('1.7')# TODO@@ -191,10 +183,10 @@ def checkJARMetaData(desc, jarFile, version):for verify in ('Implementation-Vendor: The Apache Software Foundation',- # Make sure 1.6 compiler was used to build release bits:- 'X-Compile-Source-JDK: 1.6',- # Make sure .class files are 1.6 format:- 'X-Compile-Target-JDK: 1.6',+ # Make sure 1.7 compiler was used to build release bits:+ 'X-Compile-Source-JDK: 1.7',+ # Make sure .class files are 1.7 format:+ 'X-Compile-Target-JDK: 1.7',# Make sure this matches the version we think we are releasing:'Specification-Version: %s' % version):if s.find(verify) == -1:@@ -655,15 +647,6 @@ def verifyUnpacked(project, artifact, unpackPath, version, tmpDir):run('%s; ant validate' % javaExe('1.7'), '%s/validate.log' % unpackPath)if project == 'lucene':- print(' run tests w/ Java 6...')- run('%s; ant test' % javaExe('1.6'), '%s/test.log' % unpackPath)- run('%s; ant jar' % javaExe('1.6'), '%s/compile.log' % unpackPath)- testDemo(isSrc, version, '1.6')- # test javadocs- print(' generate javadocs w/ Java 6...')- run('%s; ant javadocs' % javaExe('1.6'), '%s/javadocs.log' % unpackPath)- checkJavadocpath('%s/build/docs' % unpackPath)-print(' run tests w/ Java 7...')run('%s; ant clean test' % javaExe('1.7'), '%s/test.log' % unpackPath)run('%s; ant jar' % javaExe('1.7'), '%s/compile.log' % unpackPath)@@ -675,14 +658,6 @@ def verifyUnpacked(project, artifact, unpackPath, version, tmpDir):else:os.chdir('solr')- # DISABLED until solr tests consistently pass- #print(' run tests w/ Java 6...')- #run('%s; ant test' % javaExe('1.6'), '%s/test.log' % unpackPath)-- # test javadocs- print(' generate javadocs w/ Java 6...')- run('%s; ant javadocs' % javaExe('1.6'), '%s/javadocs.log' % unpackPath)- checkJavadocpath('%s/solr/build/docs' % unpackPath, False)# DISABLED until solr tests consistently pass#print(' run tests w/ Java 7...')@@ -693,10 +668,6 @@ def verifyUnpacked(project, artifact, unpackPath, version, tmpDir):run('%s; ant clean javadocs' % javaExe('1.7'), '%s/javadocs.log' % unpackPath)checkJavadocpathFull('%s/solr/build/docs' % unpackPath, False)- print(' test solr example w/ Java 6...')- run('%s; ant clean example' % javaExe('1.6'), '%s/antexample.log' % unpackPath)- testSolrExample(unpackPath, JAVA6_HOME, True)-print(' test solr example w/ Java 7...')run('%s; ant clean example' % javaExe('1.7'), '%s/antexample.log' % unpackPath)testSolrExample(unpackPath, JAVA7_HOME, True)@@ -710,21 +681,11 @@ def verifyUnpacked(project, artifact, unpackPath, version, tmpDir):checkAllJARs(os.getcwd(), project, version)if project == 'lucene':- testDemo(isSrc, version, '1.6')testDemo(isSrc, version, '1.7')else:checkSolrWAR('%s/example/webapps/solr.war' % unpackPath, version)- print(' copying unpacked distribution for Java 6 ...')- java6UnpackPath = '%s-java6' %unpackPath- if os.path.exists(java6UnpackPath):- shutil.rmtree(java6UnpackPath)- shutil.copytree(unpackPath, java6UnpackPath)- os.chdir(java6UnpackPath)- print(' test solr example w/ Java 6...')- testSolrExample(java6UnpackPath, JAVA6_HOME, False)-print(' copying unpacked distribution for Java 7 ...')java7UnpackPath = '%s-java7' %unpackPathif os.path.exists(java7UnpackPath):diff --git a/lucene/BUILD.txt b/lucene/BUILD.txtindex 7ccab370c51..5658305de0c 100644--- a/lucene/BUILD.txt+++ b/lucene/BUILD.txt@@ -1,19 +1,19 @@Lucene Build InstructionsBasic steps:- 0) Install JDK 1.6 (or greater), Ant 1.8.2+, Ivy 2.2.0+ 0) Install JDK 1.7 (or greater), Ant 1.8.2+, Ivy 2.2.01) Download Lucene from Apache and unpack it2) Connect to the top-level of your Lucene installation3) Install JavaCC (optional)4) Run ant-Step 0) Set up your development environment (JDK 1.6 or greater,+Step 0) Set up your development environment (JDK 1.7 or greater,Ant 1.8.2+, Ivy 2.2.0)We'll assume that you know how to get and set up the JDK - if youdon't, then we suggest starting at http://java.sun.com and learningmore about Java, before returning to this README. Lucene runs with-JDK 1.6 and later.+JDK 1.7 and later.Like many Open Source java projects, Lucene uses Apache Ant for buildcontrol. Specifically, you MUST use Ant version 1.8.2+.diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex e05587ca883..206052b58e1 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -19,6 +19,11 @@ Changes in backwards compatibility policy(Nikola Tanković, Uwe Schindler, Chris Male, Mike McCandless,Robert Muir)+New Features++* LUCENE-4747: Move to Java 7 as minimum Java version.+ (Robert Muir, Uwe Schindler)+======================= Lucene 4.3.0 =======================Changes in backwards compatibility policydiff --git a/lucene/SYSTEM_REQUIREMENTS.txt b/lucene/SYSTEM_REQUIREMENTS.txtindex d5edcc6766e..7973b70c72f 100644--- a/lucene/SYSTEM_REQUIREMENTS.txt+++ b/lucene/SYSTEM_REQUIREMENTS.txt@@ -1,6 +1,6 @@# System Requirements-Apache Lucene runs of Java 6 or greater. When using Java 7, be sure to+Apache Lucene runs of Java 7 or greater. When using Java 7, be sure toinstall at least Update 1! With all Java versions it is stronglyrecommended to not use experimental `-XX` JVM options. It is alsorecommended to always use the latest update version of your Java VM,diff --git a/lucene/build.xml b/lucene/build.xmlindex 9ba696fee1a..e0af8ffba77 100644--- a/lucene/build.xml+++ b/lucene/build.xml@@ -439,7 +439,7 @@<svn-export-source source.dir="."/><!-- Exclude javadoc package-list files under licenses incompatible with the ASL -->- <delete dir="${svn.export.dir}/tools/javadoc/java6"/>+ <delete dir="${svn.export.dir}/tools/javadoc/java7"/><!-- Exclude clover license files incompatible with the ASL --><delete dir="${svn.export.dir}/tools/clover"/>diff --git a/lucene/common-build.xml b/lucene/common-build.xmlindex 3ef60df4220..cf7aaa308e3 100644--- a/lucene/common-build.xml+++ b/lucene/common-build.xml@@ -143,16 +143,16 @@<property name="javac.deprecation" value="off"/><property name="javac.debug" value="on"/>- <property name="javac.source" value="1.6"/>- <property name="javac.target" value="1.6"/>- <property name="javac.source.backwards" value="1.6"/>- <property name="javac.target.backwards" value="1.6"/>+ <property name="javac.source" value="1.7"/>+ <property name="javac.target" value="1.7"/>+ <property name="javac.source.backwards" value="1.7"/>+ <property name="javac.target.backwards" value="1.7"/><property name="javac.args" value="-Xlint -Xlint:-deprecation -Xlint:-serial -Xlint:-options"/><property name="bootclasspath" value=""/>- <property name="javadoc.link" value="http://download.oracle.com/javase/6/docs/api/"/>+ <property name="javadoc.link" value="http://download.oracle.com/javase/7/docs/api/"/><property name="javadoc.link.junit" value="http://junit.sourceforge.net/javadoc/"/><property name="javadoc.packagelist.dir" location="${common.dir}/tools/javadoc"/>- <available file="${javadoc.packagelist.dir}/java6/package-list" property="javadoc.java6.packagelist.exists"/>+ <available file="${javadoc.packagelist.dir}/java7/package-list" property="javadoc.java7.packagelist.exists"/><property name="javadoc.access" value="protected"/><property name="javadoc.charset" value="utf-8"/><property name="javadoc.dir" location="${common.dir}/build/docs"/>@@ -253,7 +253,7 @@</propertyset><patternset id="lucene.local.src.package.patterns"- excludes="**/pom.xml,**/*.iml,**/*.jar,build/**,dist/**,benchmark/work/**,benchmark/temp/**,tools/javadoc/java6/**,tools/clover/**"+ excludes="**/pom.xml,**/*.iml,**/*.jar,build/**,dist/**,benchmark/work/**,benchmark/temp/**,tools/javadoc/java7/**,tools/clover/**"/><!-- Default exclude sources and javadoc jars from Ivy fetch to save time and bandwidth -->@@ -282,10 +282,7 @@<condition property="build.java.runtime" value="1.7"><hasmethod classname="java.lang.Throwable" method="getSuppressed"/></condition>- <condition property="build.java.runtime" value="1.6">- <hasmethod classname="java.lang.String" method="isEmpty"/>- </condition>- <fail message="Minimum supported Java version is 1.6." unless="build.java.runtime"/>+ <fail message="Minimum supported Java version is 1.7." unless="build.java.runtime"/><condition property="documentation-lint.supported"><and>@@ -1662,7 +1659,7 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites<attribute name="overview" default="${src.dir}/overview.html"/><attribute name="linksource" default="no"/><sequential>- <antcall target="download-java6-javadoc-packagelist"/>+ <antcall target="download-java7-javadoc-packagelist"/><delete file="@{destdir}/stylesheet.css" failonerror="false"/><copy todir="@{destdir}" file="${prettify.dir}/prettify.js" overwrite="false" /><record name="@{destdir}/log_javadoc.txt" action="start" append="no"/>@@ -1691,8 +1688,8 @@ ${tests-output}/junit4-*.suites - per-JVM executed suitesdescription="WARNING: This API is experimental and might change in incompatible ways in the next release."/><tag name="lucene.internal"description="NOTE: This API is for internal purposes only and might change in incompatible ways in the next release."/>- <link offline="true" packagelistLoc="${javadoc.dir}"/>- <link offline="true" href="${javadoc.link}" packagelistLoc="${javadoc.packagelist.dir}/java6"/>+ <link offline="true" packagelistLoc="${javadoc.dir}"/>+ <link offline="true" href="${javadoc.link}" packagelistLoc="${javadoc.packagelist.dir}/java7"/><bottom><![CDATA[<i>Copyright © ${year} Apache Software Foundation. All Rights Reserved.</i><script src='{@docRoot}/prettify.js' type='text/javascript'></script>@@ -1762,10 +1759,10 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites</sequential></macrodef>- <target name="download-java6-javadoc-packagelist" unless="javadoc.java6.packagelist.exists">- <mkdir dir="${javadoc.packagelist.dir}/java6"/>+ <target name="download-java7-javadoc-packagelist" unless="javadoc.java7.packagelist.exists">+ <mkdir dir="${javadoc.packagelist.dir}/java7"/><get src="${javadoc.link}/package-list"- dest="${javadoc.packagelist.dir}/java6/package-list" ignoreerrors="true"/>+ dest="${javadoc.packagelist.dir}/java7/package-list" ignoreerrors="true"/></target><!-- VALIDATION work -->diff --git a/lucene/core/src/java/org/apache/lucene/util/Constants.java b/lucene/core/src/java/org/apache/lucene/util/Constants.javaindex 086ba2b4b75..1bbfb6a96d1 100644--- a/lucene/core/src/java/org/apache/lucene/util/Constants.java+++ b/lucene/core/src/java/org/apache/lucene/util/Constants.java@@ -51,12 +51,11 @@ public final class Constants {public static final String OS_VERSION = System.getProperty("os.version");public static final String JAVA_VENDOR = System.getProperty("java.vendor");- /** @deprecated With Lucene 4.0, we are always on Java 6 */+ /** @deprecated With Lucene 5.0, we are always on Java 7 */@Deprecated- public static final boolean JRE_IS_MINIMUM_JAVA6 =+ public static final boolean JRE_IS_MINIMUM_JAVA7 =new Boolean(true).booleanValue(); // prevent inlining in foreign class files-- public static final boolean JRE_IS_MINIMUM_JAVA7;+public static final boolean JRE_IS_MINIMUM_JAVA8;/** True iff running on a 64bit JVM */@@ -87,27 +86,14 @@ public final class Constants {}JRE_IS_64BIT = is64Bit;- // this method only exists in Java 7:- boolean v7 = true;+ // this method only exists in Java 8:+ boolean v8 = true;try {- Throwable.class.getMethod("getSuppressed");+ Collections.class.getMethod("emptySortedSet");} catch (NoSuchMethodException nsme) {- v7 = false;- }- JRE_IS_MINIMUM_JAVA7 = v7;-- if (JRE_IS_MINIMUM_JAVA7) {- // this method only exists in Java 8:- boolean v8 = true;- try {- Collections.class.getMethod("emptySortedSet");- } catch (NoSuchMethodException nsme) {- v8 = false;- }- JRE_IS_MINIMUM_JAVA8 = v8;- } else {- JRE_IS_MINIMUM_JAVA8 = false;+ v8 = false;}+ JRE_IS_MINIMUM_JAVA8 = v8;}// this method prevents inlining the final version constant in compiled classes,diff --git a/lucene/tools/javadoc/ecj.javadocs.prefs b/lucene/tools/javadoc/ecj.javadocs.prefsindex c4952058f69..b7398861cc4 100644--- a/lucene/tools/javadoc/ecj.javadocs.prefs+++ b/lucene/tools/javadoc/ecj.javadocs.prefs@@ -1,7 +1,7 @@#Sun Sep 23 20:55:03 EDT 2012eclipse.preferences.version=1-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6-org.eclipse.jdt.core.compiler.compliance=1.6+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7+org.eclipse.jdt.core.compiler.compliance=1.7org.eclipse.jdt.core.compiler.doc.comment.support=enabledorg.eclipse.jdt.core.compiler.problem.annotationSuperInterface=ignoreorg.eclipse.jdt.core.compiler.problem.assertIdentifier=error@@ -88,4 +88,4 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disaorg.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignoreorg.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignoreorg.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=ignore-org.eclipse.jdt.core.compiler.source=1.6+org.eclipse.jdt.core.compiler.source=1.7diff --git a/lucene/tools/javadoc/java6/package-list b/lucene/tools/javadoc/java7/package-listsimilarity index 97%rename from lucene/tools/javadoc/java6/package-listrename to lucene/tools/javadoc/java7/package-listindex 3e918cda54a..b52fe94b6a1 100644--- a/lucene/tools/javadoc/java6/package-list+++ b/lucene/tools/javadoc/java7/package-list@@ -17,6 +17,7 @@ java.iojava.langjava.lang.annotationjava.lang.instrument+java.lang.invokejava.lang.managementjava.lang.refjava.lang.reflect@@ -27,6 +28,9 @@ java.nio.channelsjava.nio.channels.spijava.nio.charsetjava.nio.charset.spi+java.nio.file+java.nio.file.attribute+java.nio.file.spijava.rmijava.rmi.activationjava.rmi.dgc@@ -120,6 +124,7 @@ javax.swing.plafjavax.swing.plaf.basicjavax.swing.plaf.metaljavax.swing.plaf.multi+javax.swing.plaf.nimbusjavax.swing.plaf.synthjavax.swing.tablejavax.swing.text@@ -163,6 +168,7 @@ javax.xml.ws.handler.soapjavax.xml.ws.httpjavax.xml.ws.soapjavax.xml.ws.spi+javax.xml.ws.spi.httpjavax.xml.ws.wsaddressingjavax.xml.xpathorg.ietf.jgssdiff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 702eca293a5..7045a49a83e 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -12,7 +12,7 @@ See http://lucene.apache.org/solr for more information.Getting Started----------------You need a Java 1.6 VM or later installed.+You need a Java 1.7 VM or later installed.In this release, there is an example Solr server including a bundledservlet container in the directory named "example".See the tutorial at http://lucene.apache.org/solr/tutorial.htmldiff --git a/solr/README.txt b/solr/README.txtindex 7b5ec4790c8..2872300cbde 100644--- a/solr/README.txt+++ b/solr/README.txt@@ -62,10 +62,10 @@ docs/index.htmlInstructions for Building Apache Solr from Source--------------------------------------------------1. Download the Java SE 6 JDK (Java Development Kit) or later from http://java.sun.com/+1. Download the Java SE 7 JDK (Java Development Kit) or later from http://java.sun.com/You will need the JDK installed, and the $JAVA_HOME/bin (Windows: %JAVA_HOME%\bin)folder included on your command path. To test this, issue a "java -version" command- from your shell (command prompt) and verify that the Java version is 1.6 or later.+ from your shell (command prompt) and verify that the Java version is 1.7 or later.2. Download the Apache Ant binary distribution (1.8.2+) fromhttp://ant.apache.org/ You will need Ant installed and the $ANT_HOME/bin (Windows:diff --git a/solr/SYSTEM_REQUIREMENTS.txt b/solr/SYSTEM_REQUIREMENTS.txtindex 9b38cbf24f6..f06ce37b6b9 100644--- a/solr/SYSTEM_REQUIREMENTS.txt+++ b/solr/SYSTEM_REQUIREMENTS.txt@@ -1,6 +1,6 @@# System Requirements-Apache Solr runs of Java 6 or greater. When using Java 7, be sure to+Apache Solr runs of Java 7 or greater. When using Java 7, be sure toinstall at least Update 1! With all Java versions it is stronglyrecommended to not use experimental `-XX` JVM options. It is alsorecommended to always use the latest update version of your Java VM,diff --git a/solr/build.xml b/solr/build.xmlindex 8ef54fea7d3..4985f48575a 100644--- a/solr/build.xml+++ b/solr/build.xml@@ -409,7 +409,7 @@<svn-export-source source.dir=".."/><!-- Exclude javadoc package-list files under licenses incompatible with the ASL -->- <delete dir="${svn.export.dir}/lucene/tools/javadoc/java6"/>+ <delete dir="${svn.export.dir}/lucene/tools/javadoc/java7"/><!-- Exclude clover license files incompatible with the ASL --><delete dir="${svn.export.dir}/lucene/tools/clover"/>diff --git a/solr/common-build.xml b/solr/common-build.xmlindex 0c07a698603..f33f49565ab 100644--- a/solr/common-build.xml+++ b/solr/common-build.xml@@ -29,9 +29,9 @@<property name="fullnamever" value="${fullname}-${version}"/><property name="final.name" value="${fullnamever}"/>- <!-- solr uses 1.6 -->- <property name="javac.source" value="1.6"/>- <property name="javac.target" value="1.6"/>+ <!-- solr uses 1.7 -->+ <property name="javac.source" value="1.7"/>+ <property name="javac.target" value="1.7"/><property name="javac.args" value=""/><property name="dest" location="${common-solr.dir}/build" />diff --git a/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/schema.xml b/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/schema.xmlindex 64ca87a3be5..9afe1f086eb 100644--- a/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/schema.xml+++ b/solr/contrib/clustering/src/test-files/clustering/solr/collection1/conf/schema.xml@@ -243,7 +243,7 @@See the Java Regular Expression documentation for moreinfomation on pattern and replacement string syntax.- http://java.sun.com/j2se/1.6.0/docs/api/java/util/regex/package-summary.html+ http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html--><filter class="solr.PatternReplaceFilterFactory"pattern="([^a-z])" replacement="" replace="all"diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathRecordReader.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathRecordReader.javaindex e5c808ddd15..c5208c721f2 100644--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathRecordReader.java+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathRecordReader.java@@ -631,6 +631,7 @@ public class XPathRecordReader {EmptyEntityResolver.configureXMLInputFactory(factory);factory.setXMLReporter(XMLLOG);try {+ // nocommit: still true for java7?// The java 1.6 bundled stax parser (sjsxp) does not currently have a thread-safe// XMLInputFactory, as that implementation tries to cache and reuse the// XMLStreamReader. Setting the parser-specific "reuse-instance" property to falsediff --git a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solr_id-schema.xml b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solr_id-schema.xmlindex 33e4bfc7b53..e789b05ec47 100644--- a/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solr_id-schema.xml+++ b/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-solr_id-schema.xml@@ -224,7 +224,7 @@See the Java Regular Expression documentation for moreinfomation on pattern and replacement string syntax.- http://java.sun.com/j2se/1.6.0/docs/api/java/util/regex/package-summary.html+ http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html--><filter class="solr.PatternReplaceFilterFactory"pattern="([^a-z])" replacement="" replace="all"diff --git a/solr/contrib/uima/src/test-files/uima/solr/collection1/conf/schema.xml b/solr/contrib/uima/src/test-files/uima/solr/collection1/conf/schema.xmlindex a32265560e9..db7c1900fb3 100644--- a/solr/contrib/uima/src/test-files/uima/solr/collection1/conf/schema.xml+++ b/solr/contrib/uima/src/test-files/uima/solr/collection1/conf/schema.xml@@ -406,7 +406,7 @@documentation for more information on pattern and replacementstring syntax.- http://java.sun.com/j2se/1.6.0/docs/api/java/util/regex/package-summary.html+ http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html--><filter class="solr.PatternReplaceFilterFactory" pattern="([^a-z])"replacement="" replace="all" />diff --git a/solr/contrib/uima/src/test-files/uima/uima-tokenizers-schema.xml b/solr/contrib/uima/src/test-files/uima/uima-tokenizers-schema.xmlindex 6a1dddbfade..cd9a0bc3d87 100644--- a/solr/contrib/uima/src/test-files/uima/uima-tokenizers-schema.xml+++ b/solr/contrib/uima/src/test-files/uima/uima-tokenizers-schema.xml@@ -402,7 +402,7 @@documentation for more information on pattern and replacementstring syntax.- http://java.sun.com/j2se/1.6.0/docs/api/java/util/regex/package-summary.html+ http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html--><filter class="solr.PatternReplaceFilterFactory" pattern="([^a-z])"replacement="" replace="all" />diff --git a/solr/core/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.javaindex c1602a05fdf..3f44296b0cc 100644--- a/solr/core/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java+++ b/solr/core/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java@@ -91,6 +91,7 @@ public class DocumentAnalysisRequestHandler extends AnalysisRequestHandlerBase {inputFactory = XMLInputFactory.newInstance();try {+ // nocommit: still true in 1.7?// The java 1.6 bundled stax parser (sjsxp) does not currently have a thread-safe// XMLInputFactory, as that implementation tries to cache and reuse the// XMLStreamReader. Setting the parser-specific "reuse-instance" property to falsediff --git a/solr/core/src/java/org/apache/solr/handler/loader/XMLLoader.java b/solr/core/src/java/org/apache/solr/handler/loader/XMLLoader.javaindex 6211322cef7..9e4940981f7 100644--- a/solr/core/src/java/org/apache/solr/handler/loader/XMLLoader.java+++ b/solr/core/src/java/org/apache/solr/handler/loader/XMLLoader.java@@ -86,6 +86,7 @@ public class XMLLoader extends ContentStreamLoader {EmptyEntityResolver.configureXMLInputFactory(inputFactory);inputFactory.setXMLReporter(xmllog);try {+ // nocommit: still true in 1.7?// The java 1.6 bundled stax parser (sjsxp) does not currently have a thread-safe// XMLInputFactory, as that implementation tries to cache and reuse the// XMLStreamReader. Setting the parser-specific "reuse-instance" property to falsediff --git a/solr/core/src/test-files/solr/collection1/conf/schema-trie.xml b/solr/core/src/test-files/solr/collection1/conf/schema-trie.xmlindex 5c7b4cce0a4..6a8bc6e6208 100644--- a/solr/core/src/test-files/solr/collection1/conf/schema-trie.xml+++ b/solr/core/src/test-files/solr/collection1/conf/schema-trie.xml@@ -233,7 +233,7 @@See the Java Regular Expression documentation for moreinfomation on pattern and replacement string syntax.- http://java.sun.com/j2se/1.6.0/docs/api/java/util/regex/package-summary.html+ http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html--><filter class="solr.PatternReplaceFilterFactory"pattern="([^a-z])" replacement="" replace="all"diff --git a/solr/core/src/test-files/solr/collection1/conf/schema11.xml b/solr/core/src/test-files/solr/collection1/conf/schema11.xmlindex 35dc6b81da2..985e8ca77dd 100755--- a/solr/core/src/test-files/solr/collection1/conf/schema11.xml+++ b/solr/core/src/test-files/solr/collection1/conf/schema11.xml@@ -224,7 +224,7 @@See the Java Regular Expression documentation for moreinfomation on pattern and replacement string syntax.- http://java.sun.com/j2se/1.6.0/docs/api/java/util/regex/package-summary.html+ http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html--><filter class="solr.PatternReplaceFilterFactory"pattern="([^a-z])" replacement="" replace="all"diff --git a/solr/example/example-DIH/solr/db/conf/schema.xml b/solr/example/example-DIH/solr/db/conf/schema.xmlindex 20efe478a3f..45d6662201b 100644--- a/solr/example/example-DIH/solr/db/conf/schema.xml+++ b/solr/example/example-DIH/solr/db/conf/schema.xml@@ -224,7 +224,7 @@See the Java Regular Expression documentation for moreinfomation on pattern and replacement string syntax.- http://java.sun.com/j2se/1.6.0/docs/api/java/util/regex/package-summary.html+ http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html--><filter class="solr.PatternReplaceFilterFactory"pattern="([^a-z])" replacement="" replace="all"diff --git a/solr/example/example-DIH/solr/mail/conf/schema.xml b/solr/example/example-DIH/solr/mail/conf/schema.xmlindex df64fb6ed42..663fc579111 100644--- a/solr/example/example-DIH/solr/mail/conf/schema.xml+++ b/solr/example/example-DIH/solr/mail/conf/schema.xml@@ -294,7 +294,7 @@See the Java Regular Expression documentation for moreinfomation on pattern and replacement string syntax.- http://java.sun.com/j2se/1.6.0/docs/api/java/util/regex/package-summary.html+ http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html--><filter class="solr.PatternReplaceFilterFactory"pattern="([^a-z])" replacement="" replace="all"diff --git a/solr/example/example-DIH/solr/rss/conf/schema.xml b/solr/example/example-DIH/solr/rss/conf/schema.xmlindex cf1bcfac0b2..38488cb8bb8 100644--- a/solr/example/example-DIH/solr/rss/conf/schema.xml+++ b/solr/example/example-DIH/solr/rss/conf/schema.xml@@ -224,7 +224,7 @@See the Java Regular Expression documentation for moreinfomation on pattern and replacement string syntax.- http://java.sun.com/j2se/1.6.0/docs/api/java/util/regex/package-summary.html+ http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html--><filter class="solr.PatternReplaceFilterFactory"pattern="([^a-z])" replacement="" replace="all"diff --git a/solr/example/example-DIH/solr/solr/conf/schema.xml b/solr/example/example-DIH/solr/solr/conf/schema.xmlindex 6f067184dc6..c78d417277c 100644--- a/solr/example/example-DIH/solr/solr/conf/schema.xml+++ b/solr/example/example-DIH/solr/solr/conf/schema.xml@@ -224,7 +224,7 @@See the Java Regular Expression documentation for moreinfomation on pattern and replacement string syntax.- http://java.sun.com/j2se/1.6.0/docs/api/java/util/regex/package-summary.html+ http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html--><filter class="solr.PatternReplaceFilterFactory"pattern="([^a-z])" replacement="" replace="all"diff --git a/solr/example/solr/collection1/conf/schema.xml b/solr/example/solr/collection1/conf/schema.xmlindex f6a1a6cb87a..a0463bf97f4 100755--- a/solr/example/solr/collection1/conf/schema.xml+++ b/solr/example/solr/collection1/conf/schema.xml@@ -614,7 +614,7 @@See the Java Regular Expression documentation for moreinformation on pattern and replacement string syntax.- http://java.sun.com/j2se/1.6.0/docs/api/java/util/regex/package-summary.html+ http://docs.oracle.com/javase/7/docs/api/java/util/regex/package-summary.html--><filter class="solr.PatternReplaceFilterFactory"pattern="([^a-z])" replacement="" replace="all"diff --git a/solr/site/html/tutorial.html b/solr/site/html/tutorial.htmlindex f7247464fd8..db5dfb16a5d 100755--- a/solr/site/html/tutorial.html+++ b/solr/site/html/tutorial.html@@ -54,13 +54,13 @@ To follow along with this tutorial, you will need...</p><ol>-<li>Java 1.6 or greater. Some places you can get it are from+<li>Java 1.7 or greater. Some places you can get it are from<a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Oracle</a>,<a href="http://openjdk.java.net/">Open JDK</a>, or<a href="http://www.ibm.com/developerworks/java/jdk/">IBM</a>.<ul><li>Running <span class="codefrag">java -version</span> at the command- line should indicate a version number starting with 1.6.+ line should indicate a version number starting with 1.7.</li><li>Gnu's GCJ is not supported and does not work with Solr.</li></ul>diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/XMLResponseParser.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/XMLResponseParser.javaindex 5e11e2e91dc..26ec6786296 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/XMLResponseParser.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/XMLResponseParser.java@@ -55,6 +55,7 @@ public class XMLResponseParser extends ResponseParserstatic {factory = XMLInputFactory.newInstance();try {+ // nocommit: still true for 1.7?// The java 1.6 bundled stax parser (sjsxp) does not currently have a thread-safe// XMLInputFactory, as that implementation tries to cache and reuse the// XMLStreamReader. Setting the parser-specific "reuse-instance" property to false