This is my configuration.Keeping it brief only for spotbug configuration
plugins{
id "com.github.spotbugs" version "6.0.3"
}
// Spotbugs Plugin Configuration
spotbugs {
toolVersion = "4.8.3"
ignoreFailures = true
excludeFilter = file("${projectDir}/static-code-analysis/spotbugs/exclude.xml")
spotbugsTest.enabled = false
}
spotbugsMain {
reports.create("html") {
required = true
outputLocation = file("$buildDir/reports/spotbugs/main/spotbugs.html")
stylesheet = 'fancy-hist.xsl'
}
}
Tool version:
Spring 3.1.8
Java 17 (eclipse temurin)
Gradle 7.6.1
Error:
Blockquote 2024-01-25T17:25:59.282-0600 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :spotbugsMain 2024-01-25T17:26:21.179-0600 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED 2024-01-25T17:26:21.179-0600 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command 'C:\Program Files\Eclipse Adoptium\jdk-17.0.7.7-hotspot\bin\java.exe'' finished with exit value 1 (state: FAILED) 2024-01-25T17:26:21.179-0600 [WARN] [com.github.spotbugs.snom.internal.SpotBugsRunnerForHybrid$SpotBugsExecutor$Inject] SpotBugs ended with exit code 1
Can someone suggest what is issue here, build is fine but this error is giving issue? Thanks
That is because the build does not fail when bugs are found with
ignoreFailures = true. From this test.