Monday, February 9, 2009

Grails code coverage plugin issue

Recently I've installed official Grails Code Coverage plugin (called Cobertura). As fas as I'm using Grails 1.0.4 appropriate code coverage plugin version for me is 0.9. You also can install it using simple Grails command:
grails install-plugin code-coverage 0.9
But when I tried to use it and to generate test reports using command:
grails test-app-cobertura
I've got an exception:
[cobertura-report] java.lang.NoClassDefFoundError: org/apache/log4j/Category
[cobertura-report] Exception in thread "main"
Reason for that was that Code Coverage plugin needs log4j library to be present in project library folder. So when I downloaded latest version (for me it was 1.2.15) everything worked great. Enjoy using Grails Code Coverage Plugin!

No comments:

Post a Comment