Hi I am trying to exclude classes for my code coverage using jacoco. I want to exclude the gui folder and all the classes inside it.
We can exclude the class from coverage checking (i.e. fail the build if the coverage doesn't meet the target), but not exclude them from the reporting (i.e. you can still see the class in the report). Is it what you after?
If you would like to exclude the classes from checking, you could try the following config, and please use com.project.folder.tools.gui.* pattern without the slash and trailing suffix.
org.jacoco
jacoco-maven-plugin
check
check
true
CLASS
com.example.className
com.example.config.*
LINE
COVEREDRATIO
0.80
Check this offical doco for detail