]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1953] Upgrading and fixing jacoco configuration
authorMartin Stockhammer <martin_s@apache.org>
Tue, 13 Jun 2017 20:48:31 +0000 (22:48 +0200)
committerMartin Stockhammer <martin_s@apache.org>
Tue, 13 Jun 2017 20:48:31 +0000 (22:48 +0200)
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
archiva-modules/archiva-web/archiva-web-common/pom.xml
archiva-modules/archiva-web/archiva-webdav/pom.xml
pom.xml

index d6b1c98c187590c4574501f693d0546a2535d159..2c471a5513ca326fd50448468fb161fbb7eba87d 100644 (file)
             <include>**/*Tests.java</include>
             <include>**/*Test.java</include>
           </includes>
-          <argLine>-Xmx512m -Xms512m -server -XX:MaxPermSize=256m ${jacocoagent}</argLine>
+          <argLine>-Xmx512m -Xms512m -server -XX:MaxPermSize=256m @{jacocoproperty}</argLine>
           <systemPropertyVariables>
             <appserver.base>${project.build.directory}/appserver-base</appserver.base>
             <plexus.home>${project.build.directory}/appserver-base</plexus.home>
index c14197124c604b162bb86c3786db82f89fca8ee7..90d245e5a4e545daee871f09d8e2524b5f6bc26a 100644 (file)
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
-          <argLine>-Xmx1024m -Xms512m -XX:MaxPermSize=256m ${jacocoagent}</argLine>
+          <argLine>-Xmx1024m -Xms512m -XX:MaxPermSize=256m @{jacocoproperty}</argLine>
           <systemPropertyVariables>
             <appserver.base>${project.build.directory}/appserver-base</appserver.base>
             <plexus.home>${project.build.directory}/appserver-base</plexus.home>
           </systemPropertyVariables>
         </configuration>
       </plugin>
+      <!-- Conflicts with the client libraries. Found no other exclude entry that worked -->
+      <plugin>
+        <groupId>org.jacoco</groupId>
+        <artifactId>jacoco-maven-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude>**/*org/apache/archiva/web/model/*</exclude>
+            <exclude>**/archiva-web-common-json-client.jar*</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
index a277f1163889a4908e8208b08785ed588345aea0..5d596644810d9080e9f1f78ddda035562529a08a 100644 (file)
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
-          <argLine>${webdav.argLine} ${jacocoagent}</argLine>
+          <argLine>${webdav.argLine} @{jacocoproperty}</argLine>
           <systemPropertyVariables>
             <appserver.base>${project.build.directory}/appserver-base</appserver.base>
             <plexus.home>${project.build.directory}/appserver-base</plexus.home>
diff --git a/pom.xml b/pom.xml
index 408846e74b60c0c80e8d4e652c48d8eadbeee2ed..4e618883d6e5a041effef2592dedd32154892c31 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -75,7 +75,6 @@
     <javax.jcr.version>2.0</javax.jcr.version>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile>
-    <jacocoagent />
     <lucene.version>3.6.2</lucene.version>
     <jackrabbit.version>2.14.1</jackrabbit.version>
 
     <mockito.version>1.9.5</mockito.version>
     
     <openjpa.Log>DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR</openjpa.Log>
+
+    <jacocoproperty/>
+    <jacoco.plugin.version>0.7.9</jacoco.plugin.version>
   </properties>
 
   <dependencyManagement>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
           <configuration>
-            <argLine>${jacocoagent}</argLine>
+            <argLine>@{jacocoproperty}</argLine>
             <redirectTestOutputToFile>${surefire.redirectTestOutputToFile}</redirectTestOutputToFile>
             <runOrder>alphabetical</runOrder>
             <systemPropertyVariables>
           <plugin>
             <groupId>org.jacoco</groupId>
             <artifactId>jacoco-maven-plugin</artifactId>
-            <version>0.7.2.201409121644</version>
+            <version>${jacoco.plugin.version}</version>
             <executions>
               <execution>
                 <goals>
           </plugin>
         </plugins>
       </build>
-      <properties>
-        <jacocoagent>${jacocoproperty}</jacocoagent>
-      </properties>
     </profile>
     <profile>
       <id>modernizer</id>