Skip to content

Commit

Permalink
Avoid clobbering shared testcluster JAR files when installing modules (
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-vieira committed Jun 5, 2019
1 parent 7a587d2 commit d42e7a0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.elasticsearch.gradle.FileSupplier;
import org.elasticsearch.gradle.OS;
import org.elasticsearch.gradle.Version;
import org.gradle.api.file.DuplicatesStrategy;
import org.gradle.api.logging.Logger;
import org.gradle.api.logging.Logging;

Expand Down Expand Up @@ -361,6 +362,9 @@ private void copyExtraConfigFiles() {
private void installModules() {
if (distribution == Distribution.INTEG_TEST) {
modules.forEach(module -> services.copy(spec -> {
// ensure we don't override any existing JARs, since these are hardlinks other clusters might be using those files
spec.setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE);

if (module.getName().toLowerCase().endsWith(".zip")) {
spec.from(services.zipTree(module));
} else if (module.isDirectory()) {
Expand Down

0 comments on commit d42e7a0

Please sign in to comment.