usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject [1/2] usergrid git commit: Add ability to generate master Jacoco report for all stack modules, plus some fixes to POM files that were double declaring the Surefire plugin.
Date Thu, 22 Oct 2015 18:22:29 GMT
Repository: usergrid
Updated Branches:
  refs/heads/master c812403c5 -> df9bc60d9


Add ability to generate master Jacoco report for all stack modules, plus some fixes to POM
files that were double declaring the Surefire plugin.


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/14e2a9d9
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/14e2a9d9
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/14e2a9d9

Branch: refs/heads/master
Commit: 14e2a9d976492c55b22cab94529cb13939187264
Parents: c812403
Author: Dave Johnson <snoopdave@apache.org>
Authored: Thu Oct 22 11:26:43 2015 -0400
Committer: Dave Johnson <snoopdave@apache.org>
Committed: Thu Oct 22 11:26:43 2015 -0400

----------------------------------------------------------------------
 stack/Coverage.md                        | 17 +++++-
 stack/corepersistence/collection/pom.xml | 13 -----
 stack/corepersistence/graph/pom.xml      | 11 +---
 stack/corepersistence/pom.xml            | 80 +++++++++++++++++++++++----
 stack/corepersistence/queryindex/pom.xml | 15 +----
 stack/pom.xml                            | 19 +++++--
 stack/test-utils/pom.xml                 |  8 ---
 7 files changed, 104 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e2a9d9/stack/Coverage.md
----------------------------------------------------------------------
diff --git a/stack/Coverage.md b/stack/Coverage.md
index a2c1e47..f36ba71 100644
--- a/stack/Coverage.md
+++ b/stack/Coverage.md
@@ -1,7 +1,11 @@
 Generating Coverage reports
 ---
 
-run this command: mvn verify jacoco:report
+To generate Jacoco coverage reports for Usergrid, run this command in the usergrid/stack
directory:
+
+    mvn verify jacoco:report
+
+Note that all tests must pass, or some Jacoco files will be missing and report generation
is likely to fail complete.
 
 Once you do that the below coverage reports will be available.
 
@@ -19,3 +23,14 @@ Coverage reports
 * [./services/target/site/jacoco/index.html](file:./services/target/site/jacoco/index.html)
 * [./rest/target/site/jacoco/index.html](file:./services/target/site/jacoco/index.html)
 
+Master Coverage report
+---
+
+After you run the above command to generate Jacoco reports, you can run this command to generate
a master report:
+
+    mvn -f jacoco-pom.xml install
+
+The master report will be available at this link:
+
+* [./target/coverage-report/html/index.html](file:./target/coverage-report/html/index.html)
+

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e2a9d9/stack/corepersistence/collection/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/pom.xml b/stack/corepersistence/collection/pom.xml
index 62fadf7..1a1d51a 100644
--- a/stack/corepersistence/collection/pom.xml
+++ b/stack/corepersistence/collection/pom.xml
@@ -32,25 +32,14 @@
 
   <dependencies>
 
-<!--    <dependency>
-      <groupId>org.safehaus.chop</groupId>
-      <artifactId>chop-api</artifactId>
-      <version>${chop.version}</version>
-    </dependency>-->
-
     <!-- Google Guice Integration Test Injectors -->
 
-
     <dependency>
       <groupId>org.apache.usergrid</groupId>
       <artifactId>common</artifactId>
       <version>${project.version}</version>
     </dependency>
 
-
-
-
-
     <!-- tests -->
 
     <dependency>
@@ -61,7 +50,6 @@
       <scope>test</scope>
     </dependency>
 
-
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
@@ -69,6 +57,5 @@
       <scope>test</scope>
     </dependency>
 
-
   </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e2a9d9/stack/corepersistence/graph/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/pom.xml b/stack/corepersistence/graph/pom.xml
index 4a3a8a7..f7c5541 100644
--- a/stack/corepersistence/graph/pom.xml
+++ b/stack/corepersistence/graph/pom.xml
@@ -103,15 +103,8 @@
                     <argLine>
                         -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec
                     </argLine>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <!-- We want to exclude any chop tests or stress tests.  They kill
the embedded cassandra and
-                    aren't intended to be part of the build process-->
+                    <!-- We want to exclude any chop tests or stress tests.
+                    They kill the embedded cassandra and aren't intended to be part of the
build process-->
                     <excludes>
                         <exclude>**/*ChopTest.java</exclude>
                         <exclude>**/*LoadTest.java</exclude>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e2a9d9/stack/corepersistence/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/pom.xml b/stack/corepersistence/pom.xml
index d216a56..1ca08f6 100644
--- a/stack/corepersistence/pom.xml
+++ b/stack/corepersistence/pom.xml
@@ -95,29 +95,86 @@ limitations under the License.
 
         <pluginManagement>
             <plugins>
+
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-surefire-plugin</artifactId>
                     <version>${surefire.version}</version>
+                    <configuration>
+                        <includes>
+                            <include>**/*Test.java</include>
+                            <include>**/*IT.java</include>
+                        </includes>
+                        <systemPropertyVariables>
+                            <archaius.deployment.environment>UNIT</archaius.deployment.environment>
+                        </systemPropertyVariables>
+                        <argLine>-Xms2G -Xmx4G</argLine>
+                    </configuration>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.jacoco</groupId>
+                    <artifactId>jacoco-maven-plugin</artifactId>
+                    <version>${jacoco.version}</version>
+
+                    <executions>
+                        <execution>
+                            <id>default-prepare-agent</id>
+                            <goals>
+                                <goal>prepare-agent</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <id>default-report</id>
+                            <phase>prepare-package</phase>
+                            <goals>
+                                <goal>report</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <id>default-check</id>
+                            <goals>
+                                <goal>check</goal>
+                            </goals>
+                            <configuration>
+                                <rules>
+                                    <rule>
+                                        <element>BUNDLE</element>
+                                        <limits>
+                                            <limit>
+                                                <counter>COMPLEXITY</counter>
+                                                <value>COVEREDRATIO</value>
+                                                <!-- we should increase this as our coverage
increases -->
+                                                <minimum>0.10</minimum>
+                                            </limit>
+                                        </limits>
+                                    </rule>
+                                </rules>
+                            </configuration>
+                        </execution>
+                    </executions>
+
+                    <configuration>
+                        <fileSets>
+                            <fileSet>
+                                <directory>${project.build.directory}</directory>
+                                <includes>
+                                    <include>jacoco.exec</include>
+                                </includes>
+                            </fileSet>
+                        </fileSets>
+                    </configuration>
+
                 </plugin>
+
             </plugins>
         </pluginManagement>
 
         <plugins>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
-                <version>${surefire.version}</version>
-                <configuration>
-                    <includes>
-                        <include>**/*Test.java</include>
-                        <include>**/*IT.java</include>
-                    </includes>
-                    <systemPropertyVariables>
-                        <archaius.deployment.environment>UNIT</archaius.deployment.environment>
-                    </systemPropertyVariables>
-                    <argLine>-Xms2G -Xmx4G</argLine>
-                </configuration>
             </plugin>
 
             <plugin>
@@ -133,7 +190,6 @@ limitations under the License.
                 </executions>
             </plugin>
 
-
             <plugin>
                 <groupId>org.jacoco</groupId>
                 <artifactId>jacoco-maven-plugin</artifactId>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e2a9d9/stack/corepersistence/queryindex/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/pom.xml b/stack/corepersistence/queryindex/pom.xml
index e2694c4..c319c3e 100644
--- a/stack/corepersistence/queryindex/pom.xml
+++ b/stack/corepersistence/queryindex/pom.xml
@@ -51,6 +51,9 @@
                 <artifactId>maven-surefire-plugin</artifactId>
 
                 <configuration>
+                    <argLine>
+                        -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec
+                    </argLine>
                     <includes>
                         <include>**/*IT.java</include>
                         <include>**/*Test.java</include>
@@ -59,22 +62,10 @@
                     <excludes>
                         <exclude>**/IndexLoadTestsIT.java</exclude>
                     </excludes>
-
                 </configuration>
 
             </plugin>
 
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <version>${surefire.plugin.version}</version>
-                <configuration>
-                    <argLine>
-                        -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec
-                    </argLine>
-                </configuration>
-            </plugin>
-
         </plugins>
 
     </build>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e2a9d9/stack/pom.xml
----------------------------------------------------------------------
diff --git a/stack/pom.xml b/stack/pom.xml
index 344502c..6498595 100644
--- a/stack/pom.xml
+++ b/stack/pom.xml
@@ -1536,14 +1536,13 @@
                     </goals>
                     <configuration>
                         <rules>
-                            <!--  implementation is needed only for Maven 2  -->
-                            <rule implementation="org.jacoco.maven.RuleConfiguration">
+                            <rule>
                                 <element>BUNDLE</element>
                                 <limits>
-                                    <!--  implementation is needed only for Maven 2  -->
-                                    <limit implementation="org.jacoco.report.check.Limit">
+                                    <limit>
                                         <counter>COMPLEXITY</counter>
                                         <value>COVEREDRATIO</value>
+                                        <!-- we should increase this as our coverage increases
-->
                                         <minimum>0.30</minimum>
                                     </limit>
                                 </limits>
@@ -1553,6 +1552,17 @@
                 </execution>
             </executions>
 
+            <configuration>
+                <fileSets>
+                    <fileSet>
+                        <directory>${project.build.directory}</directory>
+                        <includes>
+                            <include>jacoco.exec</include>
+                        </includes>
+                    </fileSet>
+                </fileSets>
+            </configuration>
+
         </plugin>
 
         <plugin>
@@ -1670,6 +1680,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
+        <version>2.10</version>
         <configuration>
           <configLocation>usergrid/checkstyle.xml</configLocation>
         </configuration>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e2a9d9/stack/test-utils/pom.xml
----------------------------------------------------------------------
diff --git a/stack/test-utils/pom.xml b/stack/test-utils/pom.xml
index a673b49..6478c4e 100644
--- a/stack/test-utils/pom.xml
+++ b/stack/test-utils/pom.xml
@@ -242,7 +242,6 @@
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-test</artifactId>
-            <scope>test</scope>
         </dependency>
 
         <dependency>
@@ -270,13 +269,6 @@
             <artifactId>tomcat-jsp-api</artifactId>
         </dependency>
 
-
-        <dependency>
-          <groupId>org.springframework</groupId>
-          <artifactId>spring-test</artifactId>
-        </dependency>
-
-
     </dependencies>
 
 </project>


Mime
View raw message