SQL: Fix build on Java 10

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).
This commit is contained in:
Costin Leau 2018-06-14 18:07:29 +03:00
parent 375d09c588
commit f7a0cafe55
2 changed files with 5 additions and 4 deletions

View File

@ -43,9 +43,7 @@ subprojects {
final FileCollection classDirectories = project.files(files).filter { it.exists() } final FileCollection classDirectories = project.files(files).filter { it.exists() }
doFirst { doFirst {
String cp = project.configurations.featureAwarePlugin.asPath args('-cp', project.configurations.featureAwarePlugin.asPath, 'org.elasticsearch.xpack.test.feature_aware.FeatureAwareCheck')
cp = cp.replaceAll(":[^:]*/asm-debug-all-5.1.jar:", ":")
args('-cp', cp, 'org.elasticsearch.xpack.test.feature_aware.FeatureAwareCheck')
classDirectories.each { args it.getAbsolutePath() } classDirectories.each { args it.getAbsolutePath() }
} }
doLast { doLast {

View File

@ -20,7 +20,10 @@ integTest.enabled = false
dependencies { dependencies {
compileOnly "org.elasticsearch.plugin:x-pack-core:${version}" 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 project('sql-proto')
compile "org.elasticsearch.plugin:aggs-matrix-stats-client:${version}" compile "org.elasticsearch.plugin:aggs-matrix-stats-client:${version}"
compile "org.antlr:antlr4-runtime:4.5.3" compile "org.antlr:antlr4-runtime:4.5.3"