Skip to content

Commit

Permalink
SQL: Fix build on Java 10
Browse files Browse the repository at this point in the history
Due to a runtime classpath clash, featureAware task was failing on JVMs
higher than 1.8 (since the ASM version from Painless was used instead
which does not recognized Java 9 or 10 bytecode) causing the task to
fail.
This commit excludes the ASM dependency (since it's not used by SQL
itself).
  • Loading branch information
costin committed Jun 14, 2018
1 parent 375d09c commit f7a0caf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 1 addition & 3 deletions x-pack/plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ subprojects {
final FileCollection classDirectories = project.files(files).filter { it.exists() }

doFirst {
String cp = project.configurations.featureAwarePlugin.asPath
cp = cp.replaceAll(":[^:]*/asm-debug-all-5.1.jar:", ":")
args('-cp', cp, 'org.elasticsearch.xpack.test.feature_aware.FeatureAwareCheck')
args('-cp', project.configurations.featureAwarePlugin.asPath, 'org.elasticsearch.xpack.test.feature_aware.FeatureAwareCheck')
classDirectories.each { args it.getAbsolutePath() }
}
doLast {
Expand Down
5 changes: 4 additions & 1 deletion x-pack/plugin/sql/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ integTest.enabled = false

dependencies {
compileOnly "org.elasticsearch.plugin:x-pack-core:${version}"
compileOnly project(':modules:lang-painless')
compileOnly(project(':modules:lang-painless')) {
// exclude ASM to not affect featureAware task on Java 10+
exclude group: "org.ow2.asm"
}
compile project('sql-proto')
compile "org.elasticsearch.plugin:aggs-matrix-stats-client:${version}"
compile "org.antlr:antlr4-runtime:4.5.3"
Expand Down

0 comments on commit f7a0caf

Please sign in to comment.