The plugin computes and feeds Sonar SonarQubeTM with four (4) new metrics : Commits / Author, Commits / Clock Hour, Commits / Week Day and Commits / Month.
Five(5) project widgets ( under the SCM category ) display these metrics using graphical representations.
Usage, Installation and Configuration
- Install the SCM Stats plugin through the Update Center or download it into the SONAR SONARQUBE_HOME/extensions/plugins directory
- If you plan to use this plugin with non-maven projects, or SCM access is available only with username/password or no SCM information is included in project's pom.xml you have to also install the SCM Activity plugin
- Restart the Sonar SonarQubeTM server
- Set the SCM user / password (if needed) by setting the sonarcsonar.scm.user.secured and sonar.scm.password.secured properties of SCM Activity plugin
Launch a new quality analysis and the metrics will be fed
Warning title Important noticeThe sonar.scm.user.secured and sonar.scm.password.secured properties end with secured which means that we need to authenticate the analyzer to use them. So you have two possible solutions.A: If you've set these properties at project or global settings then use/set the sonar.login and sonar.password properties in your analyzer to authenticate it.B: You can set sonar.scm.user.secured and sonar.scm.password.secured properties directly in your analyzer wihtout specifying the sonar.login and sonar.password properties.For example if you use maven then in case A (scm properties set in project/global settings) the maven cmd could be like this No Format nopanel true
mvn sonar:sonar -Dsonar.login=admin -Dsonar.password=admin
and in case B (scm properties set directly to analyzer) like this
No Format nopanel true
mvn sonar:sonar -Dsonar.scm.user.secured=<SCM_USER> -Dsonar.scm.passoword.secured=<SCM_PWD>