Custom Search

Thursday, October 2, 2008

Why does Clover instrument classes I have excluded using the element of the task?

There are two possible causes.
1. Cascading build files:
Clover uses Ant patternsets to manage the includes and excludes specified in the clover-setup task. By default Ant does not pass these patternsets to the sub-builds. If you are using a master-build/sub-build arrangement, with compilation occuring in the sub-builds and done in the master-build, you will need to explicitly pass these patternsets as references:




2. Excluded files are still registered in the Clover database:
Clover's database is built incrementally, and this can mean that files that are now excluded but were previously included are still reported on. The simple workaround is to delete the Clover database whenever you change the clover includes or excludes. This is fixed in Clover 1.2.

No comments: