zhouhao преди 7 години
родител
ревизия
310d617bea
променени са 2 файла, в които са добавени 68 реда и са изтрити 48 реда
  1. 14 5
      .travis.yml
  2. 54 43
      pom.xml

+ 14 - 5
.travis.yml

@@ -1,7 +1,16 @@
 language: java
-jdk: oraclejdk8
 sudo: false
-install: false
-#script: mvn test
-after_success:
-  - mvn clean cobertura:cobertura coveralls:report
+install: true
+addons:
+  sonarcloud:
+    organization: "hsweb"
+    token:
+      secure: "fba01e9fb57104fd0cfbed380e8c90301e35ff09"
+jdk:
+  - oraclejdk8
+script:
+  - mvn clean jacoco:report package sonar:sonar
+cache:
+  directories:
+    - '$HOME/.m2/repository'
+    - '$HOME/.sonar/cache'

+ 54 - 43
pom.xml

@@ -175,68 +175,79 @@
             </distributionManagement>
         </profile>
     </profiles>
-
     <build>
 
         <plugins>
-            <plugin>
-                <groupId>org.eluder.coveralls</groupId>
-                <artifactId>coveralls-maven-plugin</artifactId>
-                <version>4.3.0</version>
-            </plugin>
+            <!--<plugin>-->
+                <!--<groupId>org.eluder.coveralls</groupId>-->
+                <!--<artifactId>coveralls-maven-plugin</artifactId>-->
+                <!--<version>4.3.0</version>-->
+            <!--</plugin>-->
 
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>animal-sniffer-maven-plugin</artifactId>
-                <version>1.16</version>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <version>0.7.9</version>
                 <configuration>
-                    <signature>
-                        <!-- Make sure only the API of this JDK is used -->
-                        <groupId>org.codehaus.mojo.signature</groupId>
-                        <artifactId>java18</artifactId>
-                        <version>1.0</version>
-                    </signature>
+                    <destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
+                    <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
+                    <output>file</output>
+                    <append>true</append>
                 </configuration>
                 <executions>
                     <execution>
-                        <id>animal-sniffer</id>
-                        <phase>verify</phase>
                         <goals>
-                            <goal>check</goal>
+                            <goal>prepare-agent</goal>
                         </goals>
                     </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>cobertura-maven-plugin</artifactId>
-                <version>2.7</version>
-                <configuration>
-                    <formats>
-                        <format>xml</format>
-                        <format>html</format>
-                    </formats>
-                    <aggregate>true</aggregate>
-                    <instrumentation>
-                        <excludes>
-                            <exclude>**/*Test.class</exclude>
-                            <exclude>**/*Tests.class</exclude>
-                            <exclude>**/*Entity.class</exclude>
-                            <exclude>**/*Configuration.class</exclude>
-                        </excludes>
-                    </instrumentation>
-                </configuration>
-                <executions>
                     <execution>
-                        <phase>package</phase>
+                        <id>report</id>
+                        <phase>prepare-package</phase>
                         <goals>
-                            <goal>cobertura</goal>
+                            <goal>report</goal>
                         </goals>
                     </execution>
                 </executions>
             </plugin>
 
+
+
+            <!--<plugin>-->
+                <!--<groupId>org.codehaus.mojo</groupId>-->
+                <!--<artifactId>cobertura-maven-plugin</artifactId>-->
+                <!--<version>2.7</version>-->
+                <!--<configuration>-->
+                    <!--<formats>-->
+                        <!--<format>xml</format>-->
+                        <!--<format>html</format>-->
+                    <!--</formats>-->
+                    <!--<aggregate>true</aggregate>-->
+                    <!--<instrumentation>-->
+                        <!--<excludes>-->
+                            <!--<exclude>**/*Test.class</exclude>-->
+                            <!--<exclude>**/*Tests.class</exclude>-->
+                            <!--<exclude>**/*Entity.class</exclude>-->
+                            <!--<exclude>**/*Configuration.class</exclude>-->
+                        <!--</excludes>-->
+                    <!--</instrumentation>-->
+                <!--</configuration>-->
+                <!--<executions>-->
+                    <!--<execution>-->
+                        <!--<phase>package</phase>-->
+                        <!--<goals>-->
+                            <!--<goal>cobertura</goal>-->
+                        <!--</goals>-->
+                    <!--</execution>-->
+                <!--</executions>-->
+                <!--<dependencies>-->
+                    <!--<dependency>-->
+                        <!--<groupId>org.codehaus.javancss</groupId>-->
+                        <!--<artifactId>javancss</artifactId>-->
+                        <!--<version>33.54</version>-->
+                    <!--</dependency>-->
+                <!--</dependencies>-->
+            <!--</plugin>-->
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-scm-plugin</artifactId>