My JUnit testcoverage is not propagated to sonar when built on jenkins. The "Unit test coverage" field on sonar stays empty, the "Unit test success" field shows the correct values though. I'm using jacoco for the testcoverage. On jenkins, the report of jacoco works well and shows the correct coverage in the generated html. I just can't get it to sonar.
With the jacoco plugin from jenkins, I invoke a standalone Sonar Analysis with the following parameters.
# required metadata
sonar.projectKey=ePortal:Ejb
sonar.projectName=ePortal
sonar.projectVersion=1.0
# path to source directories (required)
sonar.sources=ePortalEjb/ejbModule
# path to test source directories (optional)
sonar.tests=ePortalEjb/src/test
sonar.core.codeCoveragePlugin=jacoco
sonar.surefire.reportsPath=ePortalEjb/junit
sonar.forceAnalysis=true
sonar.jacoco.reportPath=ePortalEjb/build_test/jacoco/jacoco.exec
sonar.dynamicAnalysis=reuseReports
sonar.jacoco.antTargets=test
Paths and ant-tasks are correct. Maybe I am missing something obvious? Thanks in advance for any help.
Greetings Redmo