Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-9109: Allow specification of a custom Ivy settings file via system property "ivysettings.xml".

Steve Rowe82788504aa31
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 97d5b966731..41f77cd6d1f 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -137,6 +137,9 @@ Other
* LUCENE-7263: Make queryparser/xml/CoreParser's SpanQueryBuilderFactory
accessible to deriving classes. (Daniel Collins via Christine Poerschke)
+* SOLR-9109: Allow specification of a custom Ivy settings file via system
+ property "ivysettings.xml". (Misha Dmitriev, Uwe Schindler, Steve Rowe)
+
======================= Lucene 6.0.1 =======================
(No Changes)
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index da9f7bf6f2b..a3477726e50 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -38,6 +38,7 @@
<property name="dev-tools.dir" location="${common.dir}/../dev-tools"/>
<property name="prettify.dir" location="${common.dir}/tools/prettify"/>
<property name="license.dir" location="${common.dir}/licenses"/>
+ <property name="ivysettings.xml" location="${common.dir}/default-nested-ivy-settings.xml"/>
<tstamp>
<format property="current.year" pattern="yyyy"/>
@@ -422,7 +423,7 @@
you have an idea, fix it.
unless="ivy.settings.uptodate" -->
<!-- override: just for safety, should be unnecessary -->
- <ivy:configure file="${common.dir}/ivy-settings.xml" override="true"/>
+ <ivy:configure file="${common.dir}/top-level-ivy-settings.xml" override="true"/>
<!-- <property name="ivy.settings.uptodate" value="true"/> -->
</target>
diff --git a/lucene/ivy-settings.xml b/lucene/default-nested-ivy-settings.xml
similarity index 93%
rename from lucene/ivy-settings.xml
rename to lucene/default-nested-ivy-settings.xml
index e615d918f8c..97445e113df 100644
--- a/lucene/ivy-settings.xml
+++ b/lucene/default-nested-ivy-settings.xml
@@ -14,27 +14,28 @@
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
- under the License.
+ under the License.
-->
<ivysettings>
+ <!-- This file is included by default by top-level-ivy-settings.xml,
+ which loads ivy-versions.properties as Ivy variables. -->
+
<settings defaultResolver="default"/>
<property name="local-maven2-dir" value="${user.home}/.m2/repository/" />
-
- <properties file="${ivy.settings.dir}/ivy-versions.properties" override="false"/>
-
+
<include url="${ivy.default.settings.dir}/ivysettings-public.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
- <caches lockStrategy="${ivy.lock-strategy}" resolutionCacheDir="${ivy.resolution-cache.dir}" />
+ <caches lockStrategy="${ivy.lock-strategy}" resolutionCacheDir="${ivy.resolution-cache.dir}" />
<resolvers>
<ibiblio name="sonatype-releases" root="https://oss.sonatype.org/content/repositories/releases" m2compatible="true" />
<ibiblio name="maven.restlet.org" root="http://maven.restlet.org" m2compatible="true" />
<ibiblio name="releases.cloudera.com" root="http://repository.cloudera.com/content/repositories/releases" m2compatible="true" />
-
+
<!-- needed only for newer svnkit releases, e.g. 1.8.x -->
<ibiblio name="svnkit-releases" root="http://maven.tmatesoft.com/content/repositories/releases" m2compatible="true" />
diff --git a/lucene/top-level-ivy-settings.xml b/lucene/top-level-ivy-settings.xml
new file mode 100644
index 00000000000..0be25ecdeec
--- /dev/null
+++ b/lucene/top-level-ivy-settings.xml
@@ -0,0 +1,24 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<ivysettings>
+ <!-- Load ivy-versions.properties as Ivy variables. -->
+ <properties file="${ivy.settings.dir}/ivy-versions.properties" override="false"/>
+ <!-- Include the Ivy settings file pointed to by the "ivysettings.xml" property. -->
+ <include url="${ivysettings.xml}"/>
+</ivysettings>
diff --git a/solr/common-build.xml b/solr/common-build.xml
index d2672587edc..27976a4d68d 100644
--- a/solr/common-build.xml
+++ b/solr/common-build.xml
@@ -505,12 +505,12 @@
<!-- Forbidden API Task, customizations for Solr -->
<target name="-check-forbidden-all" depends="-init-forbidden-apis,compile-core,compile-test">
- <property file="${common.dir}/ivy-versions.properties"/> <!-- for commons-io version -->
+ <property prefix="ivyversions" file="${common.dir}/ivy-versions.properties"/> <!-- for commons-io version -->
<forbidden-apis internalRuntimeForbidden="true" suppressAnnotation="**.SuppressForbidden" classpathref="forbidden-apis.allclasses.classpath">
<signatures>
<bundled name="jdk-unsafe-${javac.target}"/>
<bundled name="jdk-deprecated-${javac.target}"/>
- <bundled name="commons-io-unsafe-${/commons-io/commons-io}"/>
+ <bundled name="commons-io-unsafe-${ivyversions./commons-io/commons-io}"/>
<fileset dir="${common.dir}/tools/forbiddenApis">
<include name="base.txt" />
<include name="servlet-api.txt" />