Search code examples
mavensonarqubertcsonarqube5.1sonarqube-scan

SonarQube: Coverage on New Code not calculated for RTC


I originally sent a question about incremental code coverage not working. The coverage was not being calculated and I found out I need to enable the SCM integration for that (i.e. uploading the results straight from Maven locally was not enough).

I managed to make incremental code coverage work with Git. However, not with RTC. I configured my project in SonarQube with my RTC user name and password. The project I'm trying to upload does NOT have a .jazz5/ folder in it, but the top level directory does. That doesn't seem to be a problem, or at least the SonarQube Maven plug-in didn't complain about it.

However, the incremental code coverage is not appearing in SonarQube. I get a dash for the incremental code coverage. Also at no point I had to type in my RTC server information (is it maybe being picked up from ~/.jazz-scm?)

Any inputs on this, or a lead on how I can debug what's going on? The Maven execution completes successfully (mvn sonar:sonar).


Solution

  • Adding -Dsonar.scm.provider=jazz to the mvn sonar:sonar command solved the problem for me. Maven was able to pick up my Jazz credentials automatically. I can see the incremental code coverage now.