Author: tallison
Date: Tue Dec 17 15:45:15 2019
New Revision: 1871701

URL: http://svn.apache.org/viewvc?rev=1871701&view=rev
Log:
PDFBOX-4715 -- specify release version for builds with Java >= 9

Modified:
    pdfbox/trunk/parent/pom.xml

Modified: pdfbox/trunk/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/parent/pom.xml?rev=1871701&r1=1871700&r2=1871701&view=diff
==============================================================================
--- pdfbox/trunk/parent/pom.xml (original)
+++ pdfbox/trunk/parent/pom.xml Tue Dec 17 15:45:15 2019
@@ -144,6 +144,24 @@
                 <addmod>--add-modules java.xml.bind</addmod>
             </properties>
         </profile>
+        <!-- need to specify release version so that if PDFBox is built with
+        &gt; Java 8, it can still be run with e.g. Java 6; PDFBOX-4715 -->
+        <profile>
+            <id>jdkGte9</id>
+            <activation>
+                <jdk>[1.9,)</jdk>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <configuration>
+                            <release>8</release>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
         <profile>
             <!-- from jdk11 onwards java.xml.bind is no longer part of the jdk 
-->
             <!-- must be set to "test" or "provided" in subprojects --> 
@@ -151,6 +169,10 @@
             <activation>
                 <jdk>[11,)</jdk>
             </activation>
+            <properties>
+                <!-- needs to exist even if empty due to problems with 
jacoco-maven-plugin -->
+                <addmod></addmod>
+            </properties>
             <dependencyManagement>
                 <dependencies>
                     <dependency>


Reply via email to