We set up Jenkins with Sonar to generate code coverage report, and we uses Jacoco as code coverage algorithm. Jacoco is ant task to run code coverage to generate Jacoco.exec and test report, then Sonar runner is invoked in Jenkins. In addition, we installed the sonar SCM Activity Plugin, however, in sonar report, we cannot see the code coverage "on new code" section when we checked in new codes in CVS. In the sonar log, we got WARN, and the AsyncOperationEventHandler.java has new codes in CVS
02:00:56.664 WARN - Fail to retrieve SCM info of: D:.jenkins\workspace\runTestAndGenerateJacocoReport\ECMFoundation\src\com\imany\foundation\asyncoperation\AsyncOperationEventHandler.java. Reason: The cvs command failed. cvs annotate: Empty password used - try 'cvs login' with a real password
cvs [annotate aborted]: authorization failed: server maple.imany.com rejected access to /cvsroot/atg for user tom
SCM Activity plugin use empty password to login CVS, and it doesn't pick up password we set up in the file sonar-runner.properties. In sonar-runner.properties, we configured the soanr scm usr: sonar.scm.url=scm:cvs:pserver:username:[email protected]:/cvsroot/atg:ECMFoundation
And we also tried set up the scm url in sonar web management, but it didn't work as well.
Btw, In the sonar log file, we also got below scm activity log information. 01:56:09.371 INFO - Sensor ScmActivitySensor... 01:56:09.371 INFO - Trying to guess scm provider from project layout... 01:56:09.372 INFO - Didn't find which SCM provider is used. Fallback on configuration 01:56:09.373 INFO - Retrieve SCM blame information with encoding windows-1252... 01:56:09.374 WARN - SCM Activity Plugin is configured to use more threads than actually available on this machine. 01:56:13.688 INFO - Retrieve SCM blame information with encoding windows-1252 done: 4314 ms 01:56:13.689 INFO - Sensor ScmActivitySensor done: 4318 ms