Skip to content

Apache Lucene open-source search software

LUCENE-8156: Require users to not have ASM on the Ant classpath during build (this is required by LUCENE-7966)

Uwe Schindler466c1ef4dab4
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index e6ba0f2fffb..8ab18a93532 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -175,6 +175,9 @@ Other
* LUCENE-8075: Removed unnecessary null check in IntersectTermsEnum.
(Pulak Ghosh via Adrien Grand)
+* LUCENE-8156: Require users to not have ASM on the Ant classpath during build.
+ This is required by LUCENE-7966. (Adrien Grand, Uwe Schindler)
+
======================= Lucene 7.2.1 =======================
Bug Fixes
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index 7ce8d6ffc63..e63b116cabc 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -65,6 +65,12 @@
<not><matches pattern="^\Q${version.base}\E(|\-.*)$" casesensitive="true" string="${version}"/></not>
</condition>
</fail>
+
+ <fail message="Your ~/.ant/lib folder or the main classpath of Ant contains some version of ASM. Please remove it, otherwise this build can't run correctly.">
+ <condition>
+ <available classname="org.objectweb.asm.ClassReader"/>
+ </condition>
+ </fail>
<property name="year" value="2000-${current.year}"/>