Issue
I am using IntelliJ and when I run my project it works fine with jacoco and all dependencies.
When I create a test class I suddenly get an error and I don't understand why.
The error I get is this one.
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.8.5:check (jacoco-check) on project
statistik-jar: Coverage checks have not been met. See log for details. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following
articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :statistik-jar
When I have one test class, it works fine, but it gives this error when I add one more. The folder looks like this when I get the error:
/Test
/test.class <-- working
/folder
/test2.class <-- gives a error
This error occurs when creating a second class
Solution
Because Jacoco works with percentile if you create more classes and do not have relative tests it will give the error.
<value>COVEREDRATIO</value>
<minimum>0.xx</minimum>
Check these data. I will give you some insight.
Answered By - Ijaz