Maven Check Mojo should also check required coverage levels for each class

Currently the Jacoco Check Mojo checks required coverage by checking the overall project coverage. In addition, it would be useful to apply a minimum coverage check to every class in the project.

Checking for minimum coverage on each class is useful particularly on projects which already have very high code coverage, as relying solely on the project level coverage check, leaves a potential hole, where new classes can be added without any coverage.


             <check>
                <overall>      <!--- check that the project satisfies minimum coverage -->
                  <instructionRatio>75</instructionRatio>
                  <methodRatio>75</methodRatio>
                  <branchRatio>75</branchRatio>
                  <complexityRatio>75</complexityRatio>
                  <lineRatio>75</lineRatio>
                </overall>
                <eachClass>   <!--- check that every class has these minimum coverage -->
                  <instructionRatio>75</instructionRatio>
                  <methodRatio>75</methodRatio>
                  <branchRatio>75</branchRatio>
                  <complexityRatio>75</complexityRatio>
                  <lineRatio>75</lineRatio>
                </eachClass>
              </check>

See the tests: it-check-passes-multi-class and it-check-fails-multi-class to see the effect of the eachClass check.