I am trying to get code coverage with Sonar and Jenkins. I see Jenkins\' Sonar plugin successfully executes JUnit test cases and completes build successfully. But Sonar does not
According to this blog post, you probably forget to set the sonar.binaries
property in your project properties
Don’t forget sonar.binaries, otherwise, you might get something like « Project coverage is set to 0% since there is no directories with classes. » in your logs.
[...]
sonar.surefire.reportsPath=target/surefire-reports
sonar.jacoco.reportPath=target/jacoco.exec
sonar.binaries=target/classes
[...]