Author: tilman
Date: Sat Nov  9 14:22:40 2019
New Revision: 1869602

URL: http://svn.apache.org/viewvc?rev=1869602&view=rev
Log:
PDFBOX-4680: add test coverage to build with jacoco-maven-plugin

Modified:
    pdfbox/trunk/examples/pom.xml
    pdfbox/trunk/parent/pom.xml
    pdfbox/trunk/pdfbox/pom.xml
    pdfbox/trunk/preflight/pom.xml
    pdfbox/trunk/xmpbox/pom.xml

Modified: pdfbox/trunk/examples/pom.xml
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/examples/pom.xml?rev=1869602&r1=1869601&r2=1869602&view=diff
==============================================================================
--- pdfbox/trunk/examples/pom.xml (original)
+++ pdfbox/trunk/examples/pom.xml Sat Nov  9 14:22:40 2019
@@ -131,13 +131,6 @@
           </excludes>
         </configuration>
       </plugin>
-      <!-- JDK9 -->
-      <plugin>
-          <artifactId>maven-surefire-plugin</artifactId>
-          <configuration>
-              <argLine>${addmod}</argLine>
-          </configuration>
-      </plugin>
     </plugins>
   </build>
 

Modified: pdfbox/trunk/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/parent/pom.xml?rev=1869602&r1=1869601&r2=1869602&view=diff
==============================================================================
--- pdfbox/trunk/parent/pom.xml (original)
+++ pdfbox/trunk/parent/pom.xml Sat Nov  9 14:22:40 2019
@@ -113,6 +113,16 @@
     </dependencyManagement>
 
     <profiles>
+        <profile>
+            <id>default</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <properties>
+                <!-- needs to exist even if empty due to problems with 
jacoco-maven-plugin -->
+                <addmod></addmod>
+            </properties>
+        </profile>
         <!-- call mvn with -Pjdk9 or call with -Daddmod="...." -->
         <profile>
             <id>jdk9</id>
@@ -147,6 +157,10 @@
         </profile>
         <profile>
             <id>pedantic</id>
+            <properties>
+                <!-- needs to exist even if empty due to problems with 
jacoco-maven-plugin -->
+                <addmod></addmod>
+            </properties>
             <build>
                 <plugins>
                     <plugin>
@@ -186,6 +200,34 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <version>0.8.5</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                        <configuration>
+                            <propertyName>surefireArgLine</propertyName>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>report</id>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                    </execution>                
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <argLine>${addmod} ${surefireArgLine}</argLine>
+                </configuration>
+            </plugin>
+            <plugin>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
                     <showDeprecation>true</showDeprecation>

Modified: pdfbox/trunk/pdfbox/pom.xml
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/pom.xml?rev=1869602&r1=1869601&r2=1869602&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/pom.xml (original)
+++ pdfbox/trunk/pdfbox/pom.xml Sat Nov  9 14:22:40 2019
@@ -112,7 +112,7 @@
             <plugin>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
-                    <argLine>-Xmx768m</argLine>
+                    <argLine>${addmod} ${surefireArgLine} -Xmx768m</argLine>
                     <excludes>
                         
<exclude>org/apache/pdfbox/rendering/TestPDFToImage.java</exclude>
                     </excludes>

Modified: pdfbox/trunk/preflight/pom.xml
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/preflight/pom.xml?rev=1869602&r1=1869601&r2=1869602&view=diff
==============================================================================
--- pdfbox/trunk/preflight/pom.xml (original)
+++ pdfbox/trunk/preflight/pom.xml Sat Nov  9 14:22:40 2019
@@ -57,7 +57,7 @@
                                <artifactId>maven-surefire-plugin</artifactId>
                                <configuration>
                                        <skip>true</skip>
-                                        <argLine>${addmod}</argLine>
+                                        <argLine>${addmod} 
${surefireArgLine}</argLine>
                                </configuration>
                                <executions>
                                        <execution>
@@ -71,7 +71,7 @@
                                                        <excludes>
                                                                
<exclude>**/integration/**</exclude>
                                                        </excludes>
-                                                        
<argLine>${addmod}</argLine>
+                                                        <argLine>${addmod} 
${surefireArgLine}</argLine>
                                                </configuration>
                                        </execution>
                                        <execution>
@@ -82,7 +82,7 @@
                                                </goals>
                                                <configuration>
                                                        <skip>${skipITs}</skip>
-                                                        
<argLine>${addmod}</argLine>
+                                                        <argLine>${addmod} 
${surefireArgLine}</argLine>
                                                        <includes>
                                                                
<include>**/integration/*</include>
                                                        </includes>

Modified: pdfbox/trunk/xmpbox/pom.xml
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/pom.xml?rev=1869602&r1=1869601&r2=1869602&view=diff
==============================================================================
--- pdfbox/trunk/xmpbox/pom.xml (original)
+++ pdfbox/trunk/xmpbox/pom.xml Sat Nov  9 14:22:40 2019
@@ -72,14 +72,6 @@
                                        
<configLocation>../pdfbox-checkstyle-5.xml</configLocation>
                                </configuration>
                        </plugin>
-                        
-                        <!-- JDK9 -->
-                        <plugin>
-                            <artifactId>maven-surefire-plugin</artifactId>
-                            <configuration>
-                                <argLine>${addmod}</argLine>
-                            </configuration>
-                        </plugin>
                         <plugin>
                             <groupId>org.apache.maven.plugins</groupId>
                             <artifactId>maven-jar-plugin</artifactId>


Reply via email to