Browse Source

Fix implicit duplicate duplicatesStrategy in processResources (#58929)

* Fix implicit duplicate duplicatesStrategy in processResources
* Fix duplicates strategy in docker distribution setup
Rene Groeschke 5 years ago
parent
commit
2bf44f5e7c

+ 0 - 4
client/rest-high-level/build.gradle

@@ -61,10 +61,6 @@ dependencies {
   testImplementation(project(':x-pack:plugin:eql'))
 }
 
-processTestResources {
-  from(project(':client:rest-high-level').file('src/test/resources'))
-}
-
 tasks.named('forbiddenApisMain').configure {
   // core does not depend on the httpclient for compile so we add the signatures here. We don't add them for test as they are already
   // specified

+ 1 - 0
distribution/docker/build.gradle

@@ -94,6 +94,7 @@ project.ext {
          * Oss and default distribution can have different configuration, therefore we want to allow overriding the default configuration
          * by creating config files in oss or default build-context sub-modules.
          */
+        duplicatesStrategy = DuplicatesStrategy.INCLUDE
         from project.projectDir.toPath().resolve("src/docker/config")
         if (oss) {
           from project.projectDir.toPath().resolve("src/docker/config/oss")

+ 4 - 0
x-pack/plugin/core/build.gradle

@@ -65,6 +65,10 @@ ext.expansions = [
 
 processResources {
   from(sourceSets.main.resources.srcDirs) {
+    // we need to have duplicate strategy here as
+    // we cannot apply the filter on root level due
+    // to wrong behaviour with binary files.
+    duplicatesStrategy = DuplicatesStrategy.INCLUDE
     exclude '**/public.key'
     inputs.properties(expansions)
     MavenFilteringHack.filter(it, expansions)