Similar to SonarQube does not display detailed report per file for fully covered classes via Gradle but not a dupe.
Sonar Qube version 3.7.4 Gradle version 2.1
Running the gradle sonarRunner
generates a file test.exec which Sonar does pick up
14:50:28.167 INFO - Analysing D:\projname\build\jacoco\test.exec
14:50:28.265 INFO - No information about coverage per test.
14:50:28.266 INFO - Sensor JaCoCoSensor done: 106 ms
14:50:28.529 INFO - Execute decorators...
14:50:29.253 INFO - Store results in database
14:50:29.391 INFO - ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/com.projname
However on refreshing the said project it shows coverage at 0%
Unit Tests Coverage 0.0% 0.0% line coverage 0.0% branch coverage
I have set
sonarRunner {
sonarProperties {
property 'sonar.jacoco.reportPath', 'D:\\projname\\build\\jacoco\\test.exec'
property 'sonar.junit.reportsPath','$buildDir/test-results'
property 'sonar.tests', "$buildDir/classes/test"
}
}
I have tried \ and forward slashes - it does not make a difference
any ideas?
EDIT
As per Peter's answer, removed the sonarProperties
- so build.gradle basically is
subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'sonar-runner'
apply plugin: 'jacoco'
sourceCompatibility = 1.7
group = 'com.mycomp'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testCompile 'junit:junit:4.10'
}
}
This does not read the default exec file which is generated at D:\projname\build\jacoco\test.exec
Instead it gives the message
17:06:36.912 INFO - Project coverage is set to 0% as no JaCoCo execution data has been dumped: D:\projname\target\jacoco.exec
Question: Does spaces in folder names cause a problem