Jacoco coverage is showing 0 coverage when i updated spring boot version to 2.6.7

1,528 views
Skip to first unread message

Logeswari K

unread,
May 18, 2022, 3:34:42 AM5/18/22
to JaCoCo and EclEmma Users
Hi,

Due to some vulnerability issues i upgraded my springboot version to 2.6.7 from 2.3.9 RELEASE, when the moment i changed springboot version,jacoco coverage showing 0,Whats the relation between springboot version and jacoco coverage, Refered so many documents nothing worked. Thanks in advance.

Springboot version:

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.7</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

Jacoco plugin:

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.7</version>
<configuration>
<excludes>
<exclude>**/*Application**</exclude>
<exclude>**/repository/**/*</exclude>
<exclude>**/entities/**/*</exclude>
<exclude>**/config/**/*</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule>
<element>PACKAGE</element>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.7</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>

Thanks,
Logeswari

Ashwin Singh

unread,
Aug 20, 2022, 8:39:15 AM8/20/22
to JaCoCo and EclEmma Users

Hi all,

Does anyone know the solution to the problem statement posed ?

Thanks and Regards, 
Ashwin

Devaraj U

unread,
Sep 13, 2022, 12:07:24 PM9/13/22
to JaCoCo and EclEmma Users
We faced Same Issue. Added below Plugin and it worked 

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.21.0</version>
</plugin>
Reply all
Reply to author
Forward
0 new messages