Skip to content

Commit

Permalink
Build: Fix jdbc jar to include deps (#35602)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rjernst committed Nov 27, 2018
1 parent d3681ae commit b6c2cb1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions x-pack/plugin/sql/jdbc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -55,7 +61,6 @@ task nodepsJar(type: Jar) {

artifacts {
nodeps nodepsJar
archives shadowJar
}

publishing {
Expand Down

0 comments on commit b6c2cb1

Please sign in to comment.