I’m generating clover coverage reports (using Clover’s maven plugin), and I’d like to exclude a certain package from the coverage reports (specifically, because it’s UI code that intentionally isn’t covered by my unit tests, but the reason doesn’t really matter.)
I can see how to exclude that package from being instrumented (using in the plugin configuration), but I can’t see how to exclude it from the report. The intended solution appears to be to use a Context; however, there is no package-level context available (only block, method, and statement.)
As far as I know, excluding classes from instrumentation should exclude them from the report as well. Answers to the question #9 of this thread seem to confirm this:
Could you try to do a full clean build (delete all previously compiled classes and all files in the Clover DB) to ensure that previously instrumented versions of your UI classes are removed and check again.
If this doesn’t work, please run you build with the debug option (
mvn -X > output.txt) and attach the output and yourpom.xmlto this question.