]> source.dussan.org Git - pf4j.git/commitdiff
Prepare unit test coverage on Travis and Coveralls
authorMário Franco <mario.ffranco@gmail.com>
Mon, 20 Jul 2015 15:58:46 +0000 (16:58 +0100)
committerMário Franco <mario.ffranco@gmail.com>
Mon, 20 Jul 2015 15:58:46 +0000 (16:58 +0100)
.travis.yml
pf4j/pom.xml
pom.xml

index af0e47001b97a199078489dc4ca1a22f2af3da56..5942ba6ecc8a25ab3dd130963b5384515d96a917 100644 (file)
@@ -1,3 +1,8 @@
 language: java
 jdk:
     - oraclejdk7
+    - oraclejdk8
+    - openjdk7
+
+after_success:
+  - mvn clean cobertura:cobertura coveralls:report
\ No newline at end of file
index 4f05a19179a2added280faba86a020836c6fe2a7..3c10d84b57e91f011152a7999ea10fc8816b7291 100644 (file)
@@ -40,7 +40,7 @@
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>4.8.1</version>
+            <version>${junit.version}</version>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/pom.xml b/pom.xml
index 2ebede74bc04dfaee889920f963ead4556e85130..a0bd22e4446e04d1a75618d81df71f2fc9f1f931 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <java.version>1.7</java.version>
+
+        <junit.version>4.12</junit.version>
+        <cobertura.version>2.7</cobertura.version>
+        <coveralls.version>3.1.0</coveralls.version>
     </properties>
 
     <build>
                 <additionalparam>-Xdoclint:none</additionalparam>
             </properties>
         </profile>
+        <profile>
+            <id>travis</id>
+            <activation>
+                <property>
+                    <name>env.TRAVIS</name>
+                    <value>true</value>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>cobertura-maven-plugin</artifactId>
+                        <version>${cobertura.version}</version>
+                        <configuration>
+                            <formats>
+                                <format>xml</format>
+                            </formats>
+                        </configuration>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.eluder.coveralls</groupId>
+                        <artifactId>coveralls-maven-plugin</artifactId>
+                        <version>${coveralls.version}</version>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
         <profile>
             <id>release-sign-artifacts</id>
             <activation>