Apache Lucene open-source search software
LUCENE-8224: Allow releases to be built with ant 1.10
Alan Woodwardf2e3b109e626
diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.pyindex af3053b5215..417bd3dae4f 100644--- a/dev-tools/scripts/buildAndPushRelease.py+++ b/dev-tools/scripts/buildAndPushRelease.py@@ -286,9 +286,17 @@ def parse_config():def check_cmdline_tools(): # Fail fast if there are cmdline tool problemsif os.system('git --version >/dev/null 2>/dev/null'):raise RuntimeError('"git --version" returned a non-zero exit code.')+ check_ant()++def check_ant():antVersion = os.popen('ant -version').read().strip()- if not antVersion.startswith('Apache Ant(TM) version 1.8') and not antVersion.startswith('Apache Ant(TM) version 1.9'):- raise RuntimeError('ant version is not 1.8.X: "%s"' % antVersion)+ if (antVersion.startswith('Apache Ant(TM) version 1.8')):+ return+ if (antVersion.startswith('Apache Ant(TM) version 1.9')):+ return+ if (antVersion.startswith('Apache Ant(TM) version 1.10')):+ return+ raise RuntimeError('Unsupported ant version (must be 1.8 - 1.10): "%s"' % antVersion)def main():check_cmdline_tools()diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.pyindex 2e6f1e68ac4..33df9f4bc5f 100644--- a/dev-tools/scripts/smokeTestRelease.py+++ b/dev-tools/scripts/smokeTestRelease.py@@ -190,8 +190,8 @@ def checkJARMetaData(desc, jarFile, gitRevision, version):'Implementation-Vendor: The Apache Software Foundation',# Make sure 1.8 compiler was used to build release bits:'X-Compile-Source-JDK: 8',- # Make sure 1.8 or 1.9 ant was used to build release bits: (this will match 1.8.x, 1.9.x)- ('Ant-Version: Apache Ant 1.8', 'Ant-Version: Apache Ant 1.9'),+ # Make sure 1.8, 1.9 or 1.10 ant was used to build release bits: (this will match 1.8.x, 1.9.x, 1.10.x)+ ('Ant-Version: Apache Ant 1.8', 'Ant-Version: Apache Ant 1.9', 'Ant-Version: Apache Ant 1.10'),# Make sure .class files are 1.8 format:'X-Compile-Target-JDK: 8','Specification-Version: %s' % version,diff --git a/lucene/common-build.xml b/lucene/common-build.xmlindex 1061a54028a..05af24ed43f 100644--- a/lucene/common-build.xml+++ b/lucene/common-build.xml@@ -283,6 +283,12 @@</condition></fail>+ <fail message="Cannot run with ANT version 1.0.2 - see https://issues.apache.org/jira/browse/LUCENE-8189">+ <condition>+ <antversion exactly="1.10.2"/>+ </condition>+ </fail>+<fail message="Minimum supported Java version is 1.8."><condition><not><hasmethod classname="java.util.Arrays" method="parallelSort"/></not>