I am trying to run Jacoco test coverage for my project. When I use the command mvn clean package
from the terminal, the test cases won't run. But when I run the same tests using IntelliJ, everything works fine.
My maven version is 3.6.3
. These are the versions of the dependencies and plugin in the pom.xml
<maven-failsafe-plugin.version>2.22.1</maven-failsafe-plugin.version>
<maven-surefire-plugin.version>2.22.1</maven-surefire-plugin.version>
<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
<junit-jupiter.version>5.7.0</junit-jupiter.version>
I am using the Springboot starter parent
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.1.RELEASE</version>
</parent>
I spent an awful amount of time trying to figure out the issue, but no joy. Below are the few of the many links I tried. Any help is greatly appreciated. Thanks!