You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2017/09/02 15:43:58 UTC
[05/50] lucene-solr:feature/autoscaling_72: LUCENE-4960: Fail the
build in the presence of Ivy jar(s) with unsupported versions.
LUCENE-4960: Fail the build in the presence of Ivy jar(s) with unsupported versions.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f5c2e102
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f5c2e102
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f5c2e102
Branch: refs/heads/feature/autoscaling_72
Commit: f5c2e10222d9014c434ee42411b8857926fb3c23
Parents: d86bc63
Author: Steve Rowe <sa...@apache.org>
Authored: Mon Aug 28 11:41:49 2017 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Mon Aug 28 11:41:49 2017 -0400
----------------------------------------------------------------------
lucene/common-build.xml | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f5c2e102/lucene/common-build.xml
----------------------------------------------------------------------
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index c0965af..763fe8f 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -80,7 +80,7 @@
<!-- Needed in case a module needs the original build, also for compile-tools to be called from a module -->
<property name="common.build.dir" location="${common.dir}/build"/>
- <property name="ivy.bootstrap.version" value="2.3.0" />
+ <property name="ivy.bootstrap.version" value="2.3.0" /> <!-- UPGRADE NOTE: update disallowed.ivy.jars regex in ivy-availability-check -->
<property name="ivy.default.configuration" value="*"/>
<!-- Running ant targets in parralel may require this set to false because ivy:retrieve tasks may race with resolve -->
@@ -416,12 +416,35 @@
<property name="ivy_checksum_sha1" value="c5ebf1c253ad4959a29f4acfe696ee48cdd9f473"/>
<target name="ivy-availability-check" unless="ivy.available">
+ <path id="disallowed.ivy.jars">
+ <fileset dir="${ivy_install_path}">
+ <filename regex="ivy-2\.[012].*\.jar"/> <!-- TODO: Update this regex to disallow Ivy versions -->
+ </fileset>
+ </path>
+ <loadresource property="disallowed.ivy.jars.list">
+ <string value="${toString:disallowed.ivy.jars}"/>
+ <filterchain><tokenfilter><replacestring from="jar:" to="jar, "/></tokenfilter></filterchain>
+ </loadresource>
+ <condition property="disallowed.ivy.jar.found">
+ <resourcecount when="greater" count="0">
+ <path refid="disallowed.ivy.jars"/>
+ </resourcecount>
+ </condition>
+ <antcall target="-ivy-fail-disallowed-ivy-version"/>
+
<condition property="ivy.available">
<typefound uri="antlib:org.apache.ivy.ant" name="configure" />
</condition>
<antcall target="ivy-fail" />
</target>
+ <target name="-ivy-fail-disallowed-ivy-version" if="disallowed.ivy.jar.found">
+ <sequential>
+ <echo message="Please delete the following disallowed Ivy jar(s): ${disallowed.ivy.jars.list}"/>
+ <fail>Found disallowed Ivy jar(s): ${disallowed.ivy.jars.list}</fail>
+ </sequential>
+ </target>
+
<target name="ivy-fail" unless="ivy.available">
<echo>
This build requires Ivy and Ivy could not be found in your ant classpath.