From 825537f041f7529069c4044e802e5b422c919e33 Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Thu, 9 Aug 2018 13:49:23 -0600 Subject: [PATCH 1/6] Make x-pack core pull transport-nio The security nio transports depend on transport-nio. This commit modifies x-pack core to include the transport-nio jar into the x-pack core module. --- x-pack/plugin/core/build.gradle | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/x-pack/plugin/core/build.gradle b/x-pack/plugin/core/build.gradle index b498246391ded..716a6dc6b7bd1 100644 --- a/x-pack/plugin/core/build.gradle +++ b/x-pack/plugin/core/build.gradle @@ -39,6 +39,16 @@ dependencies { // security deps shadow 'com.unboundid:unboundid-ldapsdk:3.2.0' shadow project(path: ':modules:transport-netty4', configuration: 'runtime') + shadow(project(path: ':plugins:transport-nio', configuration: 'runtime')) { + exclude group: "org.elasticsearch", module: "elasticsearch-core" + exclude group: "io.netty", module: "netty-buffer" + exclude group: "io.netty", module: "netty-codec" + exclude group: "io.netty", module: "netty-codec-http" + exclude group: "io.netty", module: "netty-common" + exclude group: "io.netty", module: "netty-handler" + exclude group: "io.netty", module: "netty-resolver" + exclude group: "io.netty", module: "netty-transport" + } testCompile 'org.elasticsearch:securemock:1.2' testCompile "org.elasticsearch:mocksocket:${versions.mocksocket}" From b9b3f60aca10267861ae5a0e12ec26493fc5488d Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Thu, 9 Aug 2018 15:57:10 -0600 Subject: [PATCH 2/6] Add comment --- x-pack/plugin/core/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/plugin/core/build.gradle b/x-pack/plugin/core/build.gradle index 716a6dc6b7bd1..023c3b5b74e71 100644 --- a/x-pack/plugin/core/build.gradle +++ b/x-pack/plugin/core/build.gradle @@ -40,6 +40,7 @@ dependencies { shadow 'com.unboundid:unboundid-ldapsdk:3.2.0' shadow project(path: ':modules:transport-netty4', configuration: 'runtime') shadow(project(path: ':plugins:transport-nio', configuration: 'runtime')) { + // TODO: This should not be necessary if core is compile only exclude group: "org.elasticsearch", module: "elasticsearch-core" exclude group: "io.netty", module: "netty-buffer" exclude group: "io.netty", module: "netty-codec" From dc62e9d830eb941b72a88773f8af680acc0c65fc Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Fri, 10 Aug 2018 10:11:51 -0600 Subject: [PATCH 3/6] Make changes --- libs/nio/build.gradle | 2 +- x-pack/plugin/core/build.gradle | 13 +------------ x-pack/plugin/security/build.gradle | 1 + 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/libs/nio/build.gradle b/libs/nio/build.gradle index 43c9a133a3f37..dc35311b202c6 100644 --- a/libs/nio/build.gradle +++ b/libs/nio/build.gradle @@ -33,7 +33,7 @@ publishing { } dependencies { - compile "org.elasticsearch:elasticsearch-core:${version}" + compileOnly "org.elasticsearch:elasticsearch-core:${version}" testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testCompile "junit:junit:${versions.junit}" diff --git a/x-pack/plugin/core/build.gradle b/x-pack/plugin/core/build.gradle index 023c3b5b74e71..76155ec9a3082 100644 --- a/x-pack/plugin/core/build.gradle +++ b/x-pack/plugin/core/build.gradle @@ -39,18 +39,7 @@ dependencies { // security deps shadow 'com.unboundid:unboundid-ldapsdk:3.2.0' shadow project(path: ':modules:transport-netty4', configuration: 'runtime') - shadow(project(path: ':plugins:transport-nio', configuration: 'runtime')) { - // TODO: This should not be necessary if core is compile only - exclude group: "org.elasticsearch", module: "elasticsearch-core" - exclude group: "io.netty", module: "netty-buffer" - exclude group: "io.netty", module: "netty-codec" - exclude group: "io.netty", module: "netty-codec-http" - exclude group: "io.netty", module: "netty-common" - exclude group: "io.netty", module: "netty-handler" - exclude group: "io.netty", module: "netty-resolver" - exclude group: "io.netty", module: "netty-transport" - } - + shadow project(path: ':plugins:transport-nio', configuration: 'runtime') testCompile 'org.elasticsearch:securemock:1.2' testCompile "org.elasticsearch:mocksocket:${versions.mocksocket}" testCompile "org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}" diff --git a/x-pack/plugin/security/build.gradle b/x-pack/plugin/security/build.gradle index 6db533bbecf9b..50ffbf1a13084 100644 --- a/x-pack/plugin/security/build.gradle +++ b/x-pack/plugin/security/build.gradle @@ -15,6 +15,7 @@ dependencies { compileOnly project(path: xpackModule('core'), configuration: 'shadow') compileOnly project(path: ':modules:transport-netty4', configuration: 'runtime') compileOnly project(path: ':plugins:transport-nio', configuration: 'runtime') + compileOnly project(path: ':libs:nio', configuration: 'runtime') testCompile project(path: xpackModule('monitoring')) testCompile project(path: xpackModule('sql:sql-action')) From b2d0b5343210e5e1ab440aa8438392ea4e030fc7 Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Fri, 10 Aug 2018 10:13:11 -0600 Subject: [PATCH 4/6] Whitespace --- x-pack/plugin/core/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/plugin/core/build.gradle b/x-pack/plugin/core/build.gradle index 76155ec9a3082..9e795fe72c63f 100644 --- a/x-pack/plugin/core/build.gradle +++ b/x-pack/plugin/core/build.gradle @@ -40,6 +40,7 @@ dependencies { shadow 'com.unboundid:unboundid-ldapsdk:3.2.0' shadow project(path: ':modules:transport-netty4', configuration: 'runtime') shadow project(path: ':plugins:transport-nio', configuration: 'runtime') + testCompile 'org.elasticsearch:securemock:1.2' testCompile "org.elasticsearch:mocksocket:${versions.mocksocket}" testCompile "org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}" From 94b29b4b80ec4c450f304d55717f929e4160557f Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Fri, 10 Aug 2018 11:06:23 -0600 Subject: [PATCH 5/6] Changes --- libs/nio/build.gradle | 2 +- x-pack/plugin/core/build.gradle | 7 +++++-- x-pack/plugin/security/build.gradle | 1 - 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libs/nio/build.gradle b/libs/nio/build.gradle index dc35311b202c6..43c9a133a3f37 100644 --- a/libs/nio/build.gradle +++ b/libs/nio/build.gradle @@ -33,7 +33,7 @@ publishing { } dependencies { - compileOnly "org.elasticsearch:elasticsearch-core:${version}" + compile "org.elasticsearch:elasticsearch-core:${version}" testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testCompile "junit:junit:${versions.junit}" diff --git a/x-pack/plugin/core/build.gradle b/x-pack/plugin/core/build.gradle index 9e795fe72c63f..e040eff38d388 100644 --- a/x-pack/plugin/core/build.gradle +++ b/x-pack/plugin/core/build.gradle @@ -39,8 +39,11 @@ dependencies { // security deps shadow 'com.unboundid:unboundid-ldapsdk:3.2.0' shadow project(path: ':modules:transport-netty4', configuration: 'runtime') - shadow project(path: ':plugins:transport-nio', configuration: 'runtime') - + shadow(project(path: ':plugins:transport-nio', configuration: 'runtime')) { + // TODO: This should not be necessary if core is compile only + exclude group: "org.elasticsearch", module: "elasticsearch-core" + } + testCompile 'org.elasticsearch:securemock:1.2' testCompile "org.elasticsearch:mocksocket:${versions.mocksocket}" testCompile "org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}" diff --git a/x-pack/plugin/security/build.gradle b/x-pack/plugin/security/build.gradle index 50ffbf1a13084..6db533bbecf9b 100644 --- a/x-pack/plugin/security/build.gradle +++ b/x-pack/plugin/security/build.gradle @@ -15,7 +15,6 @@ dependencies { compileOnly project(path: xpackModule('core'), configuration: 'shadow') compileOnly project(path: ':modules:transport-netty4', configuration: 'runtime') compileOnly project(path: ':plugins:transport-nio', configuration: 'runtime') - compileOnly project(path: ':libs:nio', configuration: 'runtime') testCompile project(path: xpackModule('monitoring')) testCompile project(path: xpackModule('sql:sql-action')) From 803b11c183c5dedba578639ef20a01f97db0cc4f Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Fri, 10 Aug 2018 11:19:09 -0600 Subject: [PATCH 6/6] Take ryans comment --- x-pack/plugin/core/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugin/core/build.gradle b/x-pack/plugin/core/build.gradle index e040eff38d388..a3b4bea9702f5 100644 --- a/x-pack/plugin/core/build.gradle +++ b/x-pack/plugin/core/build.gradle @@ -40,7 +40,7 @@ dependencies { shadow 'com.unboundid:unboundid-ldapsdk:3.2.0' shadow project(path: ':modules:transport-netty4', configuration: 'runtime') shadow(project(path: ':plugins:transport-nio', configuration: 'runtime')) { - // TODO: This should not be necessary if core is compile only + // TODO: core exclusion should not be necessary, since it is a transitive dep of all plugins exclude group: "org.elasticsearch", module: "elasticsearch-core" }