diff --git a/x-pack/plugin/sql/jdbc/build.gradle b/x-pack/plugin/sql/jdbc/build.gradle index 4268daf734719..1a4d2313022f7 100644 --- a/x-pack/plugin/sql/jdbc/build.gradle +++ b/x-pack/plugin/sql/jdbc/build.gradle @@ -36,13 +36,19 @@ dependencyLicenses { ignoreSha 'elasticsearch' } +test { + // don't use the shaded jar for tests + classpath += project.tasks.compileJava.outputs.files + classpath -= project.tasks.shadowJar.outputs.files +} + 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 don't need normal jar, we use shadow jar instead -jar.enabled = false - // We need a no-depenencies jar though for qa testing so it doesn't conflict with cli configurations { nodeps @@ -55,7 +61,6 @@ task nodepsJar(type: Jar) { artifacts { nodeps nodepsJar - archives shadowJar } publishing {