mirror of https://github.com/apache/lucene.git
SOLR-9121: Fix check-lib-versions task to pass through the "ivysettings.xml" property as an Ivy variable so that the nested ivy settings file can be located when parsing the top-level ivy settings file.
This commit is contained in:
parent
2b9cbe97a8
commit
be5172631d
|
@ -137,8 +137,8 @@ Other
|
||||||
* LUCENE-7263: Make queryparser/xml/CoreParser's SpanQueryBuilderFactory
|
* LUCENE-7263: Make queryparser/xml/CoreParser's SpanQueryBuilderFactory
|
||||||
accessible to deriving classes. (Daniel Collins via Christine Poerschke)
|
accessible to deriving classes. (Daniel Collins via Christine Poerschke)
|
||||||
|
|
||||||
* SOLR-9109: Allow specification of a custom Ivy settings file via system
|
* SOLR-9109/SOLR-9121: Allow specification of a custom Ivy settings file via system
|
||||||
property "ivysettings.xml". (Misha Dmitriev, Uwe Schindler, Steve Rowe)
|
property "ivysettings.xml". (Misha Dmitriev, Christine Poerschke, Uwe Schindler, Steve Rowe)
|
||||||
|
|
||||||
======================= Lucene 6.0.1 =======================
|
======================= Lucene 6.0.1 =======================
|
||||||
(No Changes)
|
(No Changes)
|
||||||
|
|
|
@ -97,7 +97,7 @@
|
||||||
description="Verify that the '/org/name' keys in ivy-versions.properties are sorted lexically and are neither duplicates nor orphans, and that all dependencies in all ivy.xml files use rev="$${/org/name}" format.">
|
description="Verify that the '/org/name' keys in ivy-versions.properties are sorted lexically and are neither duplicates nor orphans, and that all dependencies in all ivy.xml files use rev="$${/org/name}" format.">
|
||||||
<lib-versions-check-macro dir="${common.dir}/.."
|
<lib-versions-check-macro dir="${common.dir}/.."
|
||||||
centralized.versions.file="${common.dir}/ivy-versions.properties"
|
centralized.versions.file="${common.dir}/ivy-versions.properties"
|
||||||
ivy.settings.file="${common.dir}/top-level-ivy-settings.xml"
|
top.level.ivy.settings.file="${common.dir}/top-level-ivy-settings.xml"
|
||||||
ivy.resolution-cache.dir="${ivy.resolution-cache.dir}"
|
ivy.resolution-cache.dir="${ivy.resolution-cache.dir}"
|
||||||
ivy.lock-strategy="${ivy.lock-strategy}"
|
ivy.lock-strategy="${ivy.lock-strategy}"
|
||||||
common.build.dir="${common.build.dir}"
|
common.build.dir="${common.build.dir}"
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
<macrodef name="lib-versions-check-macro">
|
<macrodef name="lib-versions-check-macro">
|
||||||
<attribute name="dir"/>
|
<attribute name="dir"/>
|
||||||
<attribute name="centralized.versions.file"/>
|
<attribute name="centralized.versions.file"/>
|
||||||
<attribute name="ivy.settings.file"/>
|
<attribute name="top.level.ivy.settings.file"/>
|
||||||
<attribute name="ivy.resolution-cache.dir"/>
|
<attribute name="ivy.resolution-cache.dir"/>
|
||||||
<attribute name="ivy.lock-strategy"/>
|
<attribute name="ivy.lock-strategy"/>
|
||||||
<attribute name="common.build.dir"/>
|
<attribute name="common.build.dir"/>
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
-->
|
-->
|
||||||
<echo>Lib versions check under: @{dir}</echo>
|
<echo>Lib versions check under: @{dir}</echo>
|
||||||
<libversions centralizedVersionsFile="@{centralized.versions.file}"
|
<libversions centralizedVersionsFile="@{centralized.versions.file}"
|
||||||
ivySettingsFile="@{ivy.settings.file}"
|
topLevelIvySettingsFile="@{top.level.ivy.settings.file}"
|
||||||
ivyResolutionCacheDir="@{ivy.resolution-cache.dir}"
|
ivyResolutionCacheDir="@{ivy.resolution-cache.dir}"
|
||||||
ivyLockStrategy="@{ivy.lock-strategy}"
|
ivyLockStrategy="@{ivy.lock-strategy}"
|
||||||
commonBuildDir="@{common.build.dir}"
|
commonBuildDir="@{common.build.dir}"
|
||||||
|
|
|
@ -111,9 +111,9 @@ public class LibVersionsCheckTask extends Task {
|
||||||
private File ignoreConflictsFile;
|
private File ignoreConflictsFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ivy settings file: ivy-settings.xml
|
* Ivy settings file: top-level-ivy-settings.xml
|
||||||
*/
|
*/
|
||||||
private File ivySettingsFile;
|
private File topLevelIvySettingsFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Location of common build dir: lucene/build/
|
* Location of common build dir: lucene/build/
|
||||||
|
@ -180,8 +180,8 @@ public class LibVersionsCheckTask extends Task {
|
||||||
centralizedVersionsFile = file;
|
centralizedVersionsFile = file;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIvySettingsFile(File file) {
|
public void setTopLevelIvySettingsFile(File file) {
|
||||||
ivySettingsFile = file;
|
topLevelIvySettingsFile = file;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIvyResolutionCacheDir(File dir) {
|
public void setIvyResolutionCacheDir(File dir) {
|
||||||
|
@ -692,12 +692,13 @@ public class LibVersionsCheckTask extends Task {
|
||||||
ivySettings.setVariable("ivy.exclude.types", "source|javadoc");
|
ivySettings.setVariable("ivy.exclude.types", "source|javadoc");
|
||||||
ivySettings.setVariable("ivy.resolution-cache.dir", ivyResolutionCacheDir.getAbsolutePath());
|
ivySettings.setVariable("ivy.resolution-cache.dir", ivyResolutionCacheDir.getAbsolutePath());
|
||||||
ivySettings.setVariable("ivy.lock-strategy", ivyLockStrategy);
|
ivySettings.setVariable("ivy.lock-strategy", ivyLockStrategy);
|
||||||
|
ivySettings.setVariable("ivysettings.xml", getProject().getProperty("ivysettings.xml")); // nested settings file
|
||||||
ivySettings.setBaseDir(commonBuildDir);
|
ivySettings.setBaseDir(commonBuildDir);
|
||||||
ivySettings.setDefaultConflictManager(new NoConflictManager());
|
ivySettings.setDefaultConflictManager(new NoConflictManager());
|
||||||
ivy = Ivy.newInstance(ivySettings);
|
ivy = Ivy.newInstance(ivySettings);
|
||||||
ivy.configure(ivySettingsFile);
|
ivy.configure(topLevelIvySettingsFile);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BuildException("Exception reading " + ivySettingsFile.getPath() + ": " + e.toString(), e);
|
throw new BuildException("Exception reading " + topLevelIvySettingsFile.getPath() + ": " + e.toString(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue