coverage { //('*') The Single asterik excludes top-level groovy classes/scripts, such as BootStrap, changelog (Database Migration), ApplicationResources, etc exclusions = ['*'] // Creates xml output that can be parsed in the Jenkins-Cobertura plugin xml = true //Keeps the coverage results from a previous set of unit tests (see: https://github.com/beckje01/grails-code-coverage) appendCoverageResults = true }
On a related note, the Spring-Security-Core plugin generates source code instead of providing it via plugin, but does not create unit test code, so there will be little to no coverage out of the box. Some may argue that the generated code is tested before being packaged into the plugin. If you are one, then you could substitute the previous exclusions block with the one below:
//('**/security/*') Excludes packages from the 'security' package, which
// is where I put my generated Spring-Security-Core classes
exclusions = ['*','**/security/*']I would not recommend this however, because if you feel the need to have security on your application, you should test it.