jenkins plugins - SonarQube - no JaCoCo execution data has been dumped -


i'm running sonarqube in jenkins job (using post-build actions). i'm getting following problem jacoco -

[info] [16:57:43.157] sensor jacocosensor... [info] [16:57:43.157] project coverage set 0% no jacoco execution data has been dumped: /var/lib/jenkins/.../target/jacoco.exec [info] [16:57:43.426] sensor jacocosensor done: 269 ms 

as result, i'm getting 0% code coverage project. couldn't find why jacoco.exec not being created.

i don't have "jacoco" configured run maven (in pom.xml). know in past jacoco.exec created anyway (probably sonar itself).

what doing wrong? need configure jacoco in pom.xml work? thanks.

from web java ecosystem:

it no longer possible let sonarqube drive execution of unit tests. have generate junit , code coverage (jacoco or cobertura or clover) reports prior sonarqube analysis , feed sonarqube reports.

so need include jacoco in pom.xml:

   <plugin>        <groupid>org.jacoco</groupid>        <artifactid>jacoco-maven-plugin</artifactid>        <version>0.7.0.201403182114</version>    <configuration>        <destfile>${basedir}/target/jacoco-unit.exec</destfile>        <datafile>${basedir}/target/jacoco-unit.exec</datafile>    </configuration>        <executions>            ...        </executions>    </plugin> 

and give data file sonarqube:

sonar.jacoco.reportpath=target/jacoco-unit.exec 

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -