olaq / sbt-sonar-scanner-plugin   1.3.0

MIT License GitHub

SonarQube Scanner Plugin for SBT

Scala versions: 2.10
sbt plugins: 0.13


SonarQube Scanner for SBT

Build Status Codacy Badge


This is sbt plugin that is a wrapper for sonar-scanner (similar to Ant or Gradle scanners). Uses embedded sonar-scanner-api, hence does not require you to download separate binaries manually.


Add following to statement to project/plugins.sbt

addSbtPlugin("com.olaq" % "sbt-sonar-scanner-plugin" % "1.3.0")


Add sonarProperties to build.sbt. Example:

sonarProperties ++= Map(
  "sonar.host.url" -> "http://sonar.somewhere.com:9000",
  "sonar.java.source" -> "1.8",
  "sonar.junit.reportsPath" -> "target/test-reports",
  "sonar.jacoco.reportPaths" -> "target/scala-2.11/jacoco/jacoco.exec"

Any valid sonar parameter can be used. Valid parameters can be found here: https://docs.sonarqube.org/display/SONAR/Analysis+Parameters

Following parameters have default value provided by plugin.


To print properties run:

sbt printSonarProperties


sbt sonar