Sonar scanner for Play?

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube 8.9.0-DE (dockerized)
  • what are you trying to achieve
    We need to analyze application written in Play framework, (java CRUD, not maven or gradle)
  • what have you tried so far to achieve this
    Used standard sonar java setup, resulted in error:
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
	at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(
	at org.sonar.runner.impl.BatchLauncher$
	at Method)
	at org.sonar.runner.impl.BatchLauncher.doExecute(
	at org.sonar.runner.impl.BatchLauncher.execute(
	at org.sonar.runner.api.EmbeddedRunner.doExecute(
	at org.sonar.runner.api.Runner.execute(
	at org.sonar.runner.Main.executeTask(
	at org.sonar.runner.Main.execute(
	at org.sonar.runner.Main.main(
Caused by: org.sonar.squid.api.AnalysisException: SonarQube is unable to analyze file : '/<<Jenkins Job path>>/workspace/apiui/WEB-INF/application/modules/crud/app/controllers/'

Hi @Jaff ,

Can you provide a sample toy project that reproduces your issue? If so, please link/attach it here and I can take a look.


Here is an example project; it does not have any build/analysis file associated as (222.1 KB)

Hi @Jaff ,

Thanks for the sample projects. I scanned your helloworld project with SonarQube 8.9.1 (with latest version of Sonar scanner CLI) with this command:

sonar-scanner -Dsonar.projectKey=play-helloworld -Dsonar.login=<INSERT-USER-TOKEN>  

If you are not using Maven or Gradle, then you need to use sonar-scanner CLI and ensure you set (see Java | SonarQube Docs for more information). You may need to adjust and (and set proper sonar.exclusions also).