In the second step, my command is ‘gradle sonarqube’ with jdk 11 set on the path, the below lines are the error for me . It looks like this step is also compiling again it seems
> Task :spring-backend:compileJava FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ‘:spring-backend:compileJava’.
Compilation failed; see the compiler error output for details.
Try:
Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights.
I would suggest explaining the steps you take to switch the JDK used, as well as what commands you’re running. Ideally if gradle build was run with Java 8, running gradle sonarqube with Java 11 won’t cause a recompilation.