You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2018/03/26 15:35:03 UTC

[2/2] lucene-solr:branch_7x: LUCENE-8224: Allow releases to be built with ant 1.10

LUCENE-8224: Allow releases to be built with ant 1.10

Also adds a check to common-build.xml to fail early with ant 1.10.2, which
has a bug that prevents lucene from building.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/d12bc45c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/d12bc45c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/d12bc45c

Branch: refs/heads/branch_7x
Commit: d12bc45cac01289f039588fa0ee25de958294e8c
Parents: 983a443
Author: Alan Woodward <ro...@apache.org>
Authored: Mon Mar 26 12:00:12 2018 +0100
Committer: Alan Woodward <ro...@apache.org>
Committed: Mon Mar 26 16:34:37 2018 +0100

----------------------------------------------------------------------
 dev-tools/scripts/buildAndPushRelease.py | 12 ++++++++++--
 dev-tools/scripts/smokeTestRelease.py    |  4 ++--
 lucene/common-build.xml                  |  6 ++++++
 3 files changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d12bc45c/dev-tools/scripts/buildAndPushRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py
index af3053b..417bd3d 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 problems
   if 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()

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d12bc45c/dev-tools/scripts/smokeTestRelease.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.py
index 2e6f1e6..33df9f4 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,

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d12bc45c/lucene/common-build.xml
----------------------------------------------------------------------
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index 1061a54..05af24e 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>