Spotbugs-sast does not provide reasonable error message when running with wrong java version
Summary
Spotbugs-sast does not provide a reasonable error message when the wrong java version is used.
Steps to reproduce
- create a demo spring boot gradle java 11 project (any will do, either do it from https://start.spring.io or use the following: https://gitlab.com/rburgst/spotbugs-sast-java1-demo)
- use the auto devops pipeline
- once running spotbugs-sast you will get the following output
$ /analyzer run
[INFO] [Find Security Bugs] [2021-02-24T17:17:33Z] ▶ GitLab Find Security Bugs analyzer v2.15.2
[INFO] [Find Security Bugs] [2021-02-24T17:17:33Z] ▶ Detecting project
[INFO] [Find Security Bugs] [2021-02-24T17:17:33Z] ▶ Found project in /builds/group/project
[INFO] [Find Security Bugs] [2021-02-24T17:17:33Z] ▶ Running analyzer
[INFO] [Find Security Bugs] [2021-02-24T17:17:34Z] ▶ Found Gradlew project in /builds/group/project directory
[INFO] [Find Security Bugs] [2021-02-24T17:17:34Z] ▶ Found 1 analyzable projects.
[INFO] [Find Security Bugs] [2021-02-24T17:17:34Z] ▶ Building Gradlew project at /builds/group/project.
[ERRO] [Find Security Bugs] [2021-02-24T17:19:23Z] ▶ Project couldn't be built: exit status 1
[FATA] [Find Security Bugs] [2021-02-24T17:19:23Z] ▶ exit status 1
Example Project
https://gitlab.com/rburgst/spotbugs-sast-java1-demo
What is the current bug behavior?
The error log does not provide any indication that the wrong java version was used
$ /analyzer run
[INFO] [Find Security Bugs] [2021-02-24T17:17:33Z] ▶ GitLab Find Security Bugs analyzer v2.15.2
[INFO] [Find Security Bugs] [2021-02-24T17:17:33Z] ▶ Detecting project
[INFO] [Find Security Bugs] [2021-02-24T17:17:33Z] ▶ Found project in /builds/group/project
[INFO] [Find Security Bugs] [2021-02-24T17:17:33Z] ▶ Running analyzer
[INFO] [Find Security Bugs] [2021-02-24T17:17:34Z] ▶ Found Gradlew project in /builds/group/project directory
[INFO] [Find Security Bugs] [2021-02-24T17:17:34Z] ▶ Found 1 analyzable projects.
[INFO] [Find Security Bugs] [2021-02-24T17:17:34Z] ▶ Building Gradlew project at /builds/group/project.
[ERRO] [Find Security Bugs] [2021-02-24T17:19:23Z] ▶ Project couldn't be built: exit status 1
[FATA] [Find Security Bugs] [2021-02-24T17:19:23Z] ▶ exit status 1
What is the expected correct behavior?
The detailed error from the gradle execution should show up by default.
Relevant logs and/or screenshots
https://gitlab.com/rburgst/spotbugs-sast-java1-demo/-/jobs/1054803352
Output of checks
This bug happens on GitLab.com
Edited by Rainer Burgstaller