views:

43

answers:

1

Possible Duplicate:
How to get Cobertura to fail M2 build for low code coverage

I would like to calculate code coverage of my Java code base and fail building process if any package, class, or method has code coverage of 80% or less. Is it possible to achieve with some open source tool? Preferably through a maven2 plugin.

A: 

Have you tried Cobertura (http://mojo.codehaus.org/cobertura-maven-plugin/)?

Peter Haldbæk