Skip to content

Apache Lucene open-source search software

LUCENE-5614: Enable building on Java 8 using Apache Ant 1.8.3 or 1.8.4 by adding a workaround for the Ant bug

Uwe Schindler7704287b8ab3
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index f79103ecb35..4156a53fdef 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -309,7 +309,10 @@ Build
* LUCENE-5512: Remove redundant typing (use diamond operator) throughout
the codebase. (Furkan KAMACI via Robert Muir)
-Documentation:
+* LUCENE-5614: Enable building on Java 8 using Apache Ant 1.8.3 or 1.8.4
+ by adding a workaround for the Ant bug. (Uwe Schindler)
+
+Documentation
* LUCENE-5534: Add javadocs to GreekStemmer methods.
(Stamatis Pitsios via Robert Muir)
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index 229106a2969..0fd7a754163 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -333,6 +333,17 @@
</and>
</condition>
+ <!-- workaround for https://issues.apache.org/bugzilla/show_bug.cgi?id=53347 -->
+ <condition property="build.compiler" value="javac1.7">
+ <and>
+ <equals arg1="${build.java.runtime}" arg2="1.8"/>
+ <or>
+ <antversion exactly="1.8.3" />
+ <antversion exactly="1.8.4" />
+ </or>
+ </and>
+ </condition>
+
<target name="-documentation-lint-unsupported" unless="documentation-lint.supported">
<fail message="Linting documentation HTML is not supported on this Java version (${build.java.runtime}) / JVM (${java.vm.name}).">
<condition>