Add code coverage: jacoco

Project: 
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/commit/1ac8377a
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/tree/1ac8377a
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/diff/1ac8377a

Branch: refs/heads/jms-dev-1.1.0
Commit: 1ac8377aa84d1ab6dee26f8c45ac93cac9d0c0c9
Parents: 9649e02
Author: zhangke <zhangke_beij...@qq.com>
Authored: Wed Mar 1 21:18:36 2017 +0800
Committer: zhangke <zhangke_beij...@qq.com>
Committed: Wed Mar 1 21:19:38 2017 +0800

----------------------------------------------------------------------
 pom.xml | 46 ++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 44 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/1ac8377a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index df376d1..0949474 100644
--- a/pom.xml
+++ b/pom.xml
@@ -115,10 +115,11 @@
                 <artifactId>maven-surefire-plugin</artifactId>
                 <version>${surefire.version}</version>
                 <configuration>
-                    <argLine>-Xms512m -Xmx512m</argLine>
                     <excludes>
                         <exclude>**/integration/**</exclude>
                     </excludes>
+                    <forkCount>1</forkCount>
+                    <reuseForks>true</reuseForks>
                 </configuration>
             </plugin>
             <plugin>
@@ -126,7 +127,6 @@
                 <artifactId>maven-failsafe-plugin</artifactId>
                 <version>${surefire.version}</version>
                 <configuration>
-                    <argLine>-Xms512m -Xmx1024m</argLine>
                     <includes>
                         <include>**/integration/**</include>
                     </includes>
@@ -160,6 +160,48 @@
                 </executions>
             </plugin>
             <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <version>0.7.9</version>
+                <executions>
+                    <execution>
+                        <id>jacoco-initialize</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>jacoco-site</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>default-check</id>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                        <configuration>
+                            <rules>
+                                <!-- implementation is needed only for Maven 2 
-->
+                                <rule 
implementation="org.jacoco.maven.RuleConfiguration">
+                                    <element>BUNDLE</element>
+                                    <limits>
+                                        <!-- implementation is needed only for 
Maven 2 -->
+                                        <limit 
implementation="org.jacoco.report.check.Limit">
+                                            <counter>COMPLEXITY</counter>
+                                            <value>COVEREDRATIO</value>
+                                            <minimum>0.20</minimum>
+                                        </limit>
+                                    </limits>
+                                </rule>
+                            </rules>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.eluder.coveralls</groupId>
                 <artifactId>coveralls-maven-plugin</artifactId>
                 <version>4.3.0</version>

Reply via email to