]> source.dussan.org Git - pf4j.git/commitdiff
Make the project build on Java 11 (#278)
authorDmitry Timofeev <dmitry-timofeev@users.noreply.github.com>
Wed, 13 Feb 2019 20:19:48 +0000 (22:19 +0200)
committerDecebal Suiu <decebal.suiu@gmail.com>
Wed, 13 Feb 2019 20:19:48 +0000 (22:19 +0200)
.travis.yml
demo/app/pom.xml
demo/plugins/pom.xml
pom.xml

index 685674229dacea61ce4987ad18051d230f9c0554..90b27702c3b2441048baae0f57d32ad769a8bbba 100644 (file)
@@ -4,5 +4,6 @@ jdk:
 # JDK7 is not supported anymore; https://github.com/travis-ci/travis-ci/issues/7884#issuecomment-308451879
 #    - oraclejdk7
     - oraclejdk8
+    - openjdk11
 after_success:
   - mvn clean cobertura:cobertura coveralls:report
index 6075e423ad06585b2254b43ce5e19035963ea481..3335fbe53e0952a56b023750c8bcdb0618ab37ec 100644 (file)
@@ -42,7 +42,6 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
-                <version>2.3.1</version>
                 <configuration>
                     <archive>
                         <manifest>
index 5e0373232e227ee72284d750e608110ad7c3cb68..dc7a8fc01c915113bf094425d8378785c0289a80 100644 (file)
@@ -31,7 +31,6 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.7.0</version>
                 <configuration>
                     <source>${java.version}</source>
                     <target>${java.version}</target>
diff --git a/pom.xml b/pom.xml
index 1ae16f67afff459b73d1f88841462ea379a1b6a6..6de3eef6d95f8213aa30b322c0b42282ce3be7f0 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -48,7 +48,7 @@
         <asm.version>7.0</asm.version>
 
         <junit.version>4.12</junit.version>
-        <mockito.version>2.0.28-beta</mockito.version>
+        <mockito.version>2.24.0</mockito.version>
         <cobertura.version>2.7</cobertura.version>
         <coveralls.version>3.1.0</coveralls.version>
 
     </properties>
 
     <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.3.2</version>
-                <configuration>
-                    <source>${java.version}</source>
-                    <target>${java.version}</target>
-                    <optimize>true</optimize>
-                </configuration>
-            </plugin>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>3.8.0</version>
+                    <configuration>
+                        <showWarnings>true</showWarnings>
+                        <source>${java.version}</source>
+                        <target>${java.version}</target>
+                    </configuration>
+                </plugin>
+
+                <plugin>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.22.1</version>
+                </plugin>
+
+                <plugin>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>2.6</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
 
+        <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
-                <version>2.8</version>
+                <version>3.0.1</version>
                 <configuration>
                     <skip>${javadoc.disabled}</skip>
+                    <doclint>none</doclint>
+                    <failOnWarnings>false</failOnWarnings>
                 </configuration>
                 <executions>
                     <execution>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-source-plugin</artifactId>
-                <version>2.2</version>
+                <version>3.0.1</version>
                 <configuration>
                     <skipSource>${source.disabled}</skipSource>
                 </configuration>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-resources-plugin</artifactId>
-                <version>2.4.3</version>
+                <version>3.1.0</version>
             </plugin>
 
             <plugin>
                 <artifactId>maven-jar-plugin</artifactId>
-                <version>2.4</version>
                 <configuration>
                     <archive>
                         <manifest>
 
     <profiles>
         <profile>
-            <id>jdk8-build</id>
+            <!-- Disable Javadoc generation on Java 11, as it fails with message on 11.0.2:
+                 "error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/7/docs/api/ are in the unnamed module."
+                 -->
+            <id>jdk11-build</id>
             <activation>
-                <jdk>[1.8,)</jdk>
+                <jdk>[11, 12)</jdk>
             </activation>
             <properties>
-                <additionalparam>-Xdoclint:none</additionalparam>
+                <javadoc.disabled>true</javadoc.disabled>
             </properties>
         </profile>
         <profile>