Skip to content

Commit ad111b5

Browse files
committed
pom.xml: enabled code coverage checking by Cobertura plugin.
Bind to `mvn verify` and set threshold for service classes to 100%
1 parent 5e5afdb commit ad111b5

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

pom.xml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,50 @@
386386
</executions>
387387
</plugin>
388388

389+
<plugin>
390+
<groupId>org.codehaus.mojo</groupId>
391+
<artifactId>cobertura-maven-plugin</artifactId>
392+
<version>2.5.1</version>
393+
<configuration>
394+
<check>
395+
<regexes>
396+
<!-- Code coverage of service's classes should be 100% -->
397+
<regex>
398+
<pattern>ru.mystamps.web.service.*</pattern>
399+
<branchRate>100</branchRate>
400+
<lineRate>100</lineRate>
401+
</regex>
402+
</regexes>
403+
</check>
404+
</configuration>
405+
<executions>
406+
<execution>
407+
<id>run-cobertura</id>
408+
<phase>verify</phase>
409+
<goals>
410+
<goal>clean</goal>
411+
<goal>check</goal>
412+
</goals>
413+
</execution>
414+
</executions>
415+
</plugin>
416+
389417
</plugins>
390418

391419
</build>
392420

421+
<reporting>
422+
<plugins>
423+
424+
<plugin>
425+
<groupId>org.codehaus.mojo</groupId>
426+
<artifactId>cobertura-maven-plugin</artifactId>
427+
<version>2.5.1</version>
428+
</plugin>
429+
430+
</plugins>
431+
</reporting>
432+
393433
<name>My Stamps</name>
394434
<url>my-stamps.ru</url>
395435
<inceptionYear>2009</inceptionYear>

0 commit comments

Comments
 (0)