diff --git a/lucene/build.xml b/lucene/build.xml
index 5348d799d7e..54d33b0a694 100644
--- a/lucene/build.xml
+++ b/lucene/build.xml
@@ -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"/>
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index e78d11cff54..6ba0b06cb37 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -85,6 +85,7 @@
+
diff --git a/lucene/ivy-settings.xml b/lucene/ivy-settings.xml
index 770b07c72c0..80dd3050cb5 100644
--- a/lucene/ivy-settings.xml
+++ b/lucene/ivy-settings.xml
@@ -28,7 +28,7 @@
-
+
diff --git a/lucene/tools/custom-tasks.xml b/lucene/tools/custom-tasks.xml
index d7344d1d392..8210002d10a 100644
--- a/lucene/tools/custom-tasks.xml
+++ b/lucene/tools/custom-tasks.xml
@@ -90,6 +90,7 @@
+
@@ -102,6 +103,7 @@
diff --git a/lucene/tools/src/java/org/apache/lucene/validation/LibVersionsCheckTask.java b/lucene/tools/src/java/org/apache/lucene/validation/LibVersionsCheckTask.java
index 2f42629d7db..0fa68cc899b 100644
--- a/lucene/tools/src/java/org/apache/lucene/validation/LibVersionsCheckTask.java
+++ b/lucene/tools/src/java/org/apache/lucene/validation/LibVersionsCheckTask.java
@@ -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);