Skip to content

Commit f7a0caf

Browse files
committed
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).
1 parent 375d09c commit f7a0caf

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

x-pack/plugin/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ subprojects {
4343
final FileCollection classDirectories = project.files(files).filter { it.exists() }
4444

4545
doFirst {
46-
String cp = project.configurations.featureAwarePlugin.asPath
47-
cp = cp.replaceAll(":[^:]*/asm-debug-all-5.1.jar:", ":")
48-
args('-cp', cp, 'org.elasticsearch.xpack.test.feature_aware.FeatureAwareCheck')
46+
args('-cp', project.configurations.featureAwarePlugin.asPath, 'org.elasticsearch.xpack.test.feature_aware.FeatureAwareCheck')
4947
classDirectories.each { args it.getAbsolutePath() }
5048
}
5149
doLast {

x-pack/plugin/sql/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ integTest.enabled = false
2020

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

0 commit comments

Comments
 (0)