SBT plugin to generate sonar properties for projects.
Work in progress without warranties.
It should work with SBT 0.11.3, 0.12.x and 0.13.0.
Add to project/plugins.sbt:
//release versions will be pushed to Maven Central
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
addSbtPlugin("info.schleichardt" % "sbt-sonar" % "TODO")
Add to build.sbt (project/Build.scala see beyond):
sonarSettings
OR project/Build.scala:
import info.schleichardt.sbt.sonar.SbtSonarPlugin._
val main = project(...).settings(sonarSettings:_*)
Run sonar:
sbt test sonar
Use the gen-sonar-prop task after the testing tasks, since the configuration checks for existing folders.
sonarProperties := sonarProperties.value ++
Map("sonar.projectName" -> "override-name", "new.key" -> "new.value")
sonarProperties ~= { old => old ++
Map("sonar.projectName" -> "override-name", "new.key" -> "new.value") }
- Do not use it with Play 2.1.3, Play has problems to generate correct test reports.