mirror of https://github.com/apache/lucene.git
LUCENE-6743: Allow Ivy lockStrategy to be overridden by system property.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1697060 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7a93c3e6f1
commit
3d5999d455
|
@ -98,6 +98,7 @@
|
|||
centralized.versions.file="${common.dir}/ivy-versions.properties"
|
||||
ivy.settings.file="${common.dir}/ivy-settings.xml"
|
||||
ivy.resolution-cache.dir="${ivy.resolution-cache.dir}"
|
||||
ivy.lock-strategy="${ivy.lock-strategy}"
|
||||
common.build.dir="${common.build.dir}"
|
||||
ignore.conflicts.file="${common.dir}/ivy-ignore-conflicts.properties"/>
|
||||
</target>
|
||||
|
|
|
@ -85,6 +85,7 @@
|
|||
<!-- Running ant targets in parralel may require this set to false because ivy:retrieve tasks may race with resolve -->
|
||||
<property name="ivy.sync" value="true"/>
|
||||
<property name="ivy.resolution-cache.dir" location="${common.build.dir}/ivy-resolution-cache"/>
|
||||
<property name="ivy.lock-strategy" value="artifact-lock"/>
|
||||
|
||||
<property name="junit.jar" value="junit-4.10.jar"/>
|
||||
<property name="junit-location.jar" location="${common.dir}/test-framework/lib/${junit.jar}"/>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
|
||||
<include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
|
||||
|
||||
<caches lockStrategy="artifact-lock" 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" />
|
||||
|
|
|
@ -90,6 +90,7 @@
|
|||
<attribute name="centralized.versions.file"/>
|
||||
<attribute name="ivy.settings.file"/>
|
||||
<attribute name="ivy.resolution-cache.dir"/>
|
||||
<attribute name="ivy.lock-strategy"/>
|
||||
<attribute name="common.build.dir"/>
|
||||
<attribute name="ignore.conflicts.file"/>
|
||||
<sequential>
|
||||
|
@ -102,6 +103,7 @@
|
|||
<libversions centralizedVersionsFile="@{centralized.versions.file}"
|
||||
ivySettingsFile="@{ivy.settings.file}"
|
||||
ivyResolutionCacheDir="@{ivy.resolution-cache.dir}"
|
||||
ivyLockStrategy="@{ivy.lock-strategy}"
|
||||
commonBuildDir="@{common.build.dir}"
|
||||
ignoreConflictsFile="@{ignore.conflicts.file}">
|
||||
<fileset dir="@{dir}">
|
||||
|
|
|
@ -126,6 +126,11 @@ public class LibVersionsCheckTask extends Task {
|
|||
*/
|
||||
private File ivyResolutionCacheDir;
|
||||
|
||||
/**
|
||||
* Artifact lock strategy that Ivy should use.
|
||||
*/
|
||||
private String ivyLockStrategy;
|
||||
|
||||
/**
|
||||
* A logging level associated with verbose logging.
|
||||
*/
|
||||
|
@ -183,6 +188,10 @@ public class LibVersionsCheckTask extends Task {
|
|||
public void setIvyResolutionCacheDir(File dir) {
|
||||
ivyResolutionCacheDir = dir;
|
||||
}
|
||||
|
||||
public void setIvyLockStrategy(String strategy) {
|
||||
this.ivyLockStrategy = strategy;
|
||||
}
|
||||
|
||||
public void setCommonBuildDir(File file) {
|
||||
commonBuildDir = file;
|
||||
|
@ -683,6 +692,7 @@ public class LibVersionsCheckTask extends Task {
|
|||
ivySettings.setVariable("common.build.dir", commonBuildDir.getAbsolutePath());
|
||||
ivySettings.setVariable("ivy.exclude.types", "source|javadoc");
|
||||
ivySettings.setVariable("ivy.resolution-cache.dir", ivyResolutionCacheDir.getAbsolutePath());
|
||||
ivySettings.setVariable("ivy.lock-strategy", ivyLockStrategy);
|
||||
ivySettings.setBaseDir(commonBuildDir);
|
||||
ivySettings.setDefaultConflictManager(new NoConflictManager());
|
||||
ivy = Ivy.newInstance(ivySettings);
|
||||
|
|
Loading…
Reference in New Issue