Getting error while running spot bugs "A failure occurred while executing com.github.spotbugs.snom.internal.SpotBugsRunnerForWorker$SpotBugsExecutor"
Gradle Version :- 6.6.1 SpotBug plugin- 4.2
plugins {
id 'java'
id 'io.quarkus'
id "com.github.spotbugs" version "4.2.0"
}
repositories {
mavenCentral()
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
resources {
srcDir 'src/main/resources'
}
}
}
dependencies {
compile "org.apache.commons:commons-lang3:3.11"
compile "org.jboss.logmanager:log4j2-jboss-logmanager"
compile 'org.jboss.slf4j:slf4j-jboss-logging'
compile 'org.jboss.logging:commons-logging-jboss-logging'
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.10.1'
}
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs << '-parameters'
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
spotbugs {
toolVersion = '4.2.0'
}
Check whether the java version installed is
java 11
. You can check withjava -version
in the terminal. Got the same error while usingjava 18
to build ajava 11
project.