I struggle since days getting JaCoCo report integrated in SonarQube 5.0.1 for our project. Always I read 0.0% coverage in SonarQube.
TeamCity 9 generated a testresults.xml and a jacoco.exec file which I use for the sonar runner. TeamCity displays the coverage, so the exec file seams to be okay. And Java code analysis works basically in SonarQube (FindBugs, PMD etc.)
I have a multi module project which is still build with Ant. The unit tests for the "core" project are in an own project called "junit". The JUnit 4 library is used, but the tests are still JUnit 3.
These are the relevant (?) properties I use in a file called "sonar-project.properties":
core.sonar.tests = ../junit/src
core.sonar.junit.reportsPath = /tmp/testresults.xml
core.sonar.core.coveragePlugin = jacoco
core.sonar.jacoco.reportMissing.force.zero = false
core.sonar.jacoco.reportPath = /tmp/jacoco.exec
The property prefix "core" is because they are configuring the module "core".
Paths should be correct. But it says: "WARN - Reports path not found: /tmp/testresults.xml" The path is correct, I don't know why this warning appears.
Do I need binaries for the coverage in SonarQube? I haven't compiled the code.
Or what could be the reason that SonarQube displays 0% coverage after I run sonar-runner?