I would like to know whats the easiest way to plug JaCoCo4sbt's data into Sonar, In Jenkins I have installed Sonar & JaCoCo's plugins. I have also installed JaCoCo's plugin in Sonar.
My sonar-project.properties file contains :
sonar.jacoco.reportPath=target/jacoco/jacoco.exec
And Jenkins's job execute these commands :
sbt jacoco:cover
/opt/sonar-runner/bin/sonar-runner
SBT_OPTS="-Dsbt.log.noformat=true"
sbt clean update compile test doc
For now I don't get any code coverage data into Sonar
You'll need the following properties:
I don't use sbt, but the following is an ANT example:
Check the properties file at the end for all the Sonar related stuff.
Do you want to report code coverage on Scala code using the Scala plugin for Sonar (http://docs.codehaus.org/display/SONAR/Scala+Plugin)? Unfortunately it does not yet provide a sensor for code coverage. It's on the roadmap for future versions.
At least jacoco4sbt successfully generates the file jacoco.exec but it is just not picket up by the Scala plugin.