SQL: Fix IDE build after shading (elastic/x-pack-elasticsearch#3026)

The IDEs don't participate in the shading but gradle does. So we have to
be a little more tricky about how we set up the IDE projects, sadly.

Original commit: elastic/x-pack-elasticsearch@5196756702
This commit is contained in:
Nik Everett 2017-11-15 15:33:25 -05:00 committed by GitHub
parent 89e80e0cba
commit 56e4c66d1f
1 changed files with 11 additions and 10 deletions

View File

@ -8,16 +8,17 @@ dependencies {
compile "org.elasticsearch.test:framework:${versions.elasticsearch}" compile "org.elasticsearch.test:framework:${versions.elasticsearch}"
// JDBC testing dependencies // JDBC testing dependencies
compile(project(path: ':x-pack-elasticsearch:sql:jdbc', configuration: 'shadow')) {
if (false == isEclipse && false == isIdea) { if (false == isEclipse && false == isIdea) {
/* Skip the transitive dependencies of the server when outside // If we're not doing IDE stuff use the shadowed jar
* of an IDE because outside of an IDE we use the jdbc jar compile(project(path: ':x-pack-elasticsearch:sql:jdbc', configuration: 'shadow'))
* which includes all the transitive dependencies *already*. } else {
* If we didn't skip these dependencies the jar hell checks /* If we're doing IDE stuff then use then use the project
* would fail. And we need the transitive dependencies to * dependency so the IDEs don't get confused. Transitive
* run in embedded mode but only do that inside of an IDE. */ * deps are OK here too because this is the only time we
transitive = false * pull all of those deps in. We make sure exclude them
} * below so they don't cause jar hell with the shadowed
* jar. */
compile(project(':x-pack-elasticsearch:sql:jdbc'))
} }
compile "net.sourceforge.csvjdbc:csvjdbc:1.0.34" compile "net.sourceforge.csvjdbc:csvjdbc:1.0.34"
runtime "com.h2database:h2:1.4.194" runtime "com.h2database:h2:1.4.194"