From 10447dd9624659537a040aef47f2b8605bb08c78 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Mon, 26 Nov 2018 16:18:35 -0800 Subject: [PATCH] Build: Fix jdbc jar to include deps (#35602) This commit adds back bundling of all deps of the sql jdbc jar. This was lost in a refactoring of how the shadow plugin is handled for the entire elasticsearch project. --- x-pack/plugin/sql/jdbc/build.gradle | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/x-pack/plugin/sql/jdbc/build.gradle b/x-pack/plugin/sql/jdbc/build.gradle index 4268daf7347..1a4d2313022 100644 --- a/x-pack/plugin/sql/jdbc/build.gradle +++ b/x-pack/plugin/sql/jdbc/build.gradle @@ -36,12 +36,18 @@ dependencyLicenses { ignoreSha 'elasticsearch' } -shadowJar { - relocate 'com.fasterxml', 'org.elasticsearch.fasterxml' +test { + // don't use the shaded jar for tests + classpath += project.tasks.compileJava.outputs.files + classpath -= project.tasks.shadowJar.outputs.files } -// We don't need normal jar, we use shadow jar instead -jar.enabled = false +shadowJar { + relocate 'com.fasterxml', 'org.elasticsearch.fasterxml' + // set the shaded configuration back to runtime instead of bundle because + // we need tests to use the non-shaded deps to allow editing/testing in intellij + configurations = [project.configurations.runtime] +} // We need a no-depenencies jar though for qa testing so it doesn't conflict with cli configurations { @@ -55,7 +61,6 @@ task nodepsJar(type: Jar) { artifacts { nodeps nodepsJar - archives shadowJar } publishing {