Skip to content

Commit f19fd23

Browse files
committed
set up jacoco-maven-plugin, bound to phase verify, covered ratio should be greater than 50%
1 parent 8fbe3a1 commit f19fd23

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

pom.xml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,48 @@
7979
<groupId>org.apache.maven.plugins</groupId>
8080
<artifactId>maven-failsafe-plugin</artifactId>
8181
</plugin>
82+
<plugin>
83+
<groupId>org.jacoco</groupId>
84+
<artifactId>jacoco-maven-plugin</artifactId>
85+
<version>0.7.7.201606060606</version>
86+
<executions>
87+
<execution>
88+
<id>default-prepare-agent</id>
89+
<goals>
90+
<goal>prepare-agent</goal>
91+
</goals>
92+
</execution>
93+
<execution>
94+
<id>default-report</id>
95+
<phase>verify</phase>
96+
<goals>
97+
<goal>report</goal>
98+
</goals>
99+
</execution>
100+
<execution>
101+
<id>default-check</id>
102+
<goals>
103+
<goal>check</goal>
104+
</goals>
105+
<configuration>
106+
<rules>
107+
<!-- implementation is needed only for Maven 2 -->
108+
<rule implementation="org.jacoco.maven.RuleConfiguration">
109+
<element>BUNDLE</element>
110+
<limits>
111+
<!-- implementation is needed only for Maven 2 -->
112+
<limit implementation="org.jacoco.report.check.Limit">
113+
<counter>COMPLEXITY</counter>
114+
<value>COVEREDRATIO</value>
115+
<minimum>0.50</minimum>
116+
</limit>
117+
</limits>
118+
</rule>
119+
</rules>
120+
</configuration>
121+
</execution>
122+
</executions>
123+
</plugin>
82124
</plugins>
83125
</build>
84126

0 commit comments

Comments
 (0)