WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succeed?

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) : * Community Edition Version 8.7.1 (build 42226)
  • what are you trying to achieve : Jenkins to sonar qualitygate integration
  • what have you tried so far to achieve this : I have configured Sonar Scanner and Sonar Quality Gate without any issues.

One thing i have observed here is the pipeline worked for one job iteam but the same pipeline is not working if i created new job.

Getting below error

15:03:39 [INFO] ------------- Run sensors on module gtcircuits Maven Webapp
15:03:39 [INFO] Load metrics repository
15:03:39 [INFO] Load metrics repository (done) | time=1583ms
15:03:39 [INFO] Sensor JavaSquidSensor [java]
15:03:39 [INFO] Configured Java source version (sonar.java.source): 8
15:03:39 [INFO] JavaClasspath initialization
15:03:39 [INFO] ------------------------------------------------------------------------
15:03:39 [INFO] BUILD FAILURE
15:03:39 [INFO] ------------------------------------------------------------------------
15:03:39 [INFO] Total time: 01:16 min
15:03:39 [INFO] Finished at: 2021-05-04T09:33:34Z
15:03:39 [INFO] ------------------------------------------------------------------------
15:03:39 [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar (default-cli) on project download: Your project contains .java files, please provide compiled classes with sonar.java.binaries property, or exclude them from the analysis with sonar.exclusions property. → [Help 1]
15:03:39 [ERROR]
15:03:39 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
15:03:39 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
15:03:39 [ERROR]
15:03:39 [ERROR] For more information about the errors and possible solutions, please read the following articles:
15:03:39 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [Pipeline] } 15:03:39 WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succeed?
[Pipeline] // withSonarQubeEnv
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline ERROR: script returned exit code 1 Finished: FAILURE

Thanks,

Hi,

What did you make of the error message?

 
Ann