You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by nt...@apache.org on 2017/10/04 12:04:40 UTC

cayenne git commit: CAY-2253 Cayenne JDK9 compatibility - backport of changes made for 4.1 branch - fix imports to deal with java.lang.Module class conflict

Repository: cayenne
Updated Branches:
  refs/heads/STABLE-4.0 522d45811 -> 859f459c2


CAY-2253 Cayenne JDK9 compatibility
  - backport of changes made for 4.1 branch
  - fix imports to deal with java.lang.Module class conflict


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/859f459c
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/859f459c
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/859f459c

Branch: refs/heads/STABLE-4.0
Commit: 859f459c2019d14867fce4ca010aaa674cd49701
Parents: 522d458
Author: Nikita Timofeev <st...@gmail.com>
Authored: Wed Oct 4 15:04:27 2017 +0300
Committer: Nikita Timofeev <st...@gmail.com>
Committed: Wed Oct 4 15:04:27 2017 +0300

----------------------------------------------------------------------
 .../upgrade/v7/ProjectUpgrader_V7Test.java      |   7 +-
 .../upgrade/v8/ProjectUpgrader_V8Test.java      |   7 +-
 .../upgrade/v9/ProjectUpgrader_V9Test.java      |   7 +-
 docs/doc/src/main/resources/RELEASE-NOTES.txt   |   1 +
 .../modeler/osx/OSXApplicationWrapper.java      | 154 +++++++++++++++++++
 .../modeler/osx/OSXPlatformInitializer.java     |  25 ++-
 .../cayenne/modeler/osx/OSXQuitHandler.java     |  29 ++++
 .../modeler/osx/OSXQuitResponseWrapper.java     |  73 +++++++++
 .../components/image/FilteredIconFactory.java   |   5 +-
 pom.xml                                         |  12 +-
 10 files changed, 294 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/859f459c/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v7/ProjectUpgrader_V7Test.java
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v7/ProjectUpgrader_V7Test.java b/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v7/ProjectUpgrader_V7Test.java
index 8dd51a2..9b3cf4f 100644
--- a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v7/ProjectUpgrader_V7Test.java
+++ b/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v7/ProjectUpgrader_V7Test.java
@@ -24,7 +24,12 @@ import org.apache.cayenne.configuration.DefaultConfigurationNameMapper;
 import org.apache.cayenne.configuration.XMLDataMapLoader;
 import org.apache.cayenne.configuration.server.JNDIDataSourceFactory;
 import org.apache.cayenne.configuration.server.XMLPoolingDataSourceFactory;
-import org.apache.cayenne.di.*;
+import org.apache.cayenne.di.AdhocObjectFactory;
+import org.apache.cayenne.di.Binder;
+import org.apache.cayenne.di.Module;
+import org.apache.cayenne.di.ClassLoaderManager;
+import org.apache.cayenne.di.DIBootstrap;
+import org.apache.cayenne.di.Injector;
 import org.apache.cayenne.di.spi.DefaultAdhocObjectFactory;
 import org.apache.cayenne.di.spi.DefaultClassLoaderManager;
 import org.apache.cayenne.project.FileProjectSaver;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/859f459c/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v8/ProjectUpgrader_V8Test.java
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v8/ProjectUpgrader_V8Test.java b/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v8/ProjectUpgrader_V8Test.java
index 610d77c..139495e 100644
--- a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v8/ProjectUpgrader_V8Test.java
+++ b/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v8/ProjectUpgrader_V8Test.java
@@ -23,7 +23,12 @@ import org.apache.cayenne.configuration.ConfigurationNameMapper;
 import org.apache.cayenne.configuration.DataMapLoader;
 import org.apache.cayenne.configuration.DefaultConfigurationNameMapper;
 import org.apache.cayenne.configuration.XMLDataMapLoader;
-import org.apache.cayenne.di.*;
+import org.apache.cayenne.di.AdhocObjectFactory;
+import org.apache.cayenne.di.Binder;
+import org.apache.cayenne.di.Module;
+import org.apache.cayenne.di.ClassLoaderManager;
+import org.apache.cayenne.di.DIBootstrap;
+import org.apache.cayenne.di.Injector;
 import org.apache.cayenne.di.spi.DefaultAdhocObjectFactory;
 import org.apache.cayenne.di.spi.DefaultClassLoaderManager;
 import org.apache.cayenne.project.FileProjectSaver;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/859f459c/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v9/ProjectUpgrader_V9Test.java
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v9/ProjectUpgrader_V9Test.java b/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v9/ProjectUpgrader_V9Test.java
index 3851a2e..b0ecf0b 100644
--- a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v9/ProjectUpgrader_V9Test.java
+++ b/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/v9/ProjectUpgrader_V9Test.java
@@ -23,7 +23,12 @@ import org.apache.cayenne.configuration.ConfigurationNameMapper;
 import org.apache.cayenne.configuration.DataMapLoader;
 import org.apache.cayenne.configuration.DefaultConfigurationNameMapper;
 import org.apache.cayenne.configuration.XMLDataMapLoader;
-import org.apache.cayenne.di.*;
+import org.apache.cayenne.di.AdhocObjectFactory;
+import org.apache.cayenne.di.Binder;
+import org.apache.cayenne.di.Module;
+import org.apache.cayenne.di.ClassLoaderManager;
+import org.apache.cayenne.di.DIBootstrap;
+import org.apache.cayenne.di.Injector;
 import org.apache.cayenne.di.spi.DefaultAdhocObjectFactory;
 import org.apache.cayenne.di.spi.DefaultClassLoaderManager;
 import org.apache.cayenne.project.FileProjectSaver;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/859f459c/docs/doc/src/main/resources/RELEASE-NOTES.txt
----------------------------------------------------------------------
diff --git a/docs/doc/src/main/resources/RELEASE-NOTES.txt b/docs/doc/src/main/resources/RELEASE-NOTES.txt
index c7fd1f9..052fd2f 100644
--- a/docs/doc/src/main/resources/RELEASE-NOTES.txt
+++ b/docs/doc/src/main/resources/RELEASE-NOTES.txt
@@ -13,6 +13,7 @@ Date:
 ----------------------------------
 Bug Fixes:
 
+CAY-2253 Cayenne JDK9 compatibility
 CAY-2361 PostgreSQL DbGenerator issues
 CAY-2364 Wrong logging in SQLTemplate
 CAY-2365 SQLExec query tries to convert (unexpected) result set into objects

http://git-wip-us.apache.org/repos/asf/cayenne/blob/859f459c/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXApplicationWrapper.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXApplicationWrapper.java b/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXApplicationWrapper.java
new file mode 100644
index 0000000..6c1ca50
--- /dev/null
+++ b/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXApplicationWrapper.java
@@ -0,0 +1,154 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+
+package org.apache.cayenne.modeler.osx;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+import com.apple.eawt.Application;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This class wraps apple {@link com.apple.eawt.Application} class and dynamically
+ * proxying it's lifecycle handlers setup.
+ * <p>
+ * This code exists to support both Java 8 and 9, as handler interfaces where incompatibly moved
+ * to other package between these versions.
+ * <p>
+ * See <a href="https://bugs.openjdk.java.net/browse/JDK-8160437">JDK-8160437 issue</a> for details.
+ *
+ * @see #setAboutHandler(Runnable) run action on "About App" menu item select
+ * @see #setPreferencesHandler(Runnable) run action on "Preferences..." menu item select
+ * @see #setQuitHandler(OSXQuitHandler) run action on "Quit App" menu item select
+ *
+ * @see OSXQuitResponseWrapper
+ *
+ * @since 4.1
+ */
+public class OSXApplicationWrapper {
+
+    private static final Logger logger = LoggerFactory.getLogger(OSXApplicationWrapper.class);
+
+    // package for handler classes for Java 8 and older
+    private static final String JAVA8_PACKAGE = "com.apple.eawt.";
+
+    // package for handler classes for Java 9 and newer
+    private static final String JAVA9_PACKAGE = "java.awt.desktop.";
+
+    private final Application application;
+
+    private Class<?> aboutHandlerClass;
+    private Method setAboutHandler;
+
+    private Class<?> preferencesHandlerClass;
+    private Method setPreferencesHandler;
+
+    private Class<?> quitHandlerClass;
+    private Method setQuitHandler;
+
+    public OSXApplicationWrapper(Application application) {
+        this.application = application;
+        initMethods();
+    }
+
+    public void setPreferencesHandler(Runnable action) {
+        setHandler(setPreferencesHandler, preferencesHandlerClass, action);
+    }
+
+    public void setAboutHandler(Runnable action) {
+        setHandler(setAboutHandler, aboutHandlerClass, action);
+    }
+
+    public void setQuitHandler(final OSXQuitHandler quitHandler) {
+        InvocationHandler handler = new InvocationHandler() {
+            @Override
+            public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+                // args: 0 - event, 1 - quitResponse
+                quitHandler.handle(new OSXQuitResponseWrapper(args[1]));
+                return null;
+            }
+        };
+        Object proxy = createProxy(quitHandlerClass, handler);
+        try {
+            setQuitHandler.invoke(application, proxy);
+        } catch (IllegalAccessException | InvocationTargetException ex) {
+            logger.warn("Unable to call " + setQuitHandler.getName(), ex);
+        }
+    }
+
+    /**
+     * Find required handlers' methods and classes
+     */
+    private void initMethods() {
+        aboutHandlerClass = getHandlerClass("AboutHandler");
+        setAboutHandler = getMethod("setAboutHandler", aboutHandlerClass);
+
+        preferencesHandlerClass = getHandlerClass("PreferencesHandler");
+        setPreferencesHandler = getMethod("setPreferencesHandler", preferencesHandlerClass);
+
+        quitHandlerClass = getHandlerClass("QuitHandler");
+        setQuitHandler = getMethod("setQuitHandler", quitHandlerClass);
+    }
+
+    private void setHandler(Method setMethod, Class<?> handlerClass, final Runnable action) {
+        InvocationHandler handler = new InvocationHandler() {
+            @Override
+            public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+                action.run();
+                return null;
+            }
+        };
+        Object proxy = createProxy(handlerClass, handler);
+        try {
+            setMethod.invoke(application, proxy);
+        } catch (IllegalAccessException | InvocationTargetException ex) {
+            logger.warn("Unable to call " + setMethod.getName(), ex);
+        }
+    }
+
+    private Object createProxy(Class<?> handlerClass, InvocationHandler handler) {
+        return Proxy.newProxyInstance(OSXApplicationWrapper.class.getClassLoader(), new Class<?>[]{handlerClass}, handler);
+    }
+
+    private Method getMethod(String name, Class<?> ... parameters) {
+        try {
+            return application.getClass().getMethod(name, parameters);
+        } catch (NoSuchMethodException ex) {
+            logger.warn("Unable to find method " + name, ex);
+            return null;
+        }
+    }
+
+    private Class<?> getHandlerClass(String className) {
+        try {
+            return Class.forName(JAVA8_PACKAGE + className);
+        } catch (ClassNotFoundException ex) {
+            try {
+                return Class.forName(JAVA9_PACKAGE + className);
+            } catch (ClassNotFoundException ex2) {
+                return null;
+            }
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/859f459c/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXPlatformInitializer.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXPlatformInitializer.java b/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXPlatformInitializer.java
index fa47935..4ddbdc2 100644
--- a/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXPlatformInitializer.java
+++ b/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXPlatformInitializer.java
@@ -40,12 +40,7 @@ import org.apache.cayenne.modeler.action.ConfigurePreferencesAction;
 import org.apache.cayenne.modeler.action.ExitAction;
 import org.apache.cayenne.modeler.init.platform.PlatformInitializer;
 
-import com.apple.eawt.AboutHandler;
-import com.apple.eawt.AppEvent;
 import com.apple.eawt.Application;
-import com.apple.eawt.PreferencesHandler;
-import com.apple.eawt.QuitHandler;
-import com.apple.eawt.QuitResponse;
 
 public class OSXPlatformInitializer implements PlatformInitializer {
 
@@ -58,26 +53,28 @@ public class OSXPlatformInitializer implements PlatformInitializer {
         overrideUIDefaults();
 
         // configure special Mac menu handlers
-        Application app = Application.getApplication();
-        app.setAboutHandler(new AboutHandler() {
+        OSXApplicationWrapper wrapper = new OSXApplicationWrapper(Application.getApplication());
+        wrapper.setAboutHandler(new Runnable() {
             @Override
-            public void handleAbout(AppEvent.AboutEvent aboutEvent) {
+            public void run() {
                 actionManager.getAction(AboutAction.class).showAboutDialog();
             }
         });
 
-        app.setPreferencesHandler(new PreferencesHandler() {
+        wrapper.setPreferencesHandler(new Runnable() {
             @Override
-            public void handlePreferences(AppEvent.PreferencesEvent preferencesEvent) {
+            public void run() {
                 actionManager.getAction(ConfigurePreferencesAction.class).showPreferencesDialog();
             }
         });
 
-        app.setQuitHandler(new QuitHandler() {
+        wrapper.setQuitHandler(new OSXQuitHandler() {
             @Override
-            public void handleQuitRequestWith(AppEvent.QuitEvent quitEvent, QuitResponse quitResponse) {
-                if(!actionManager.getAction(ExitAction.class).exit()) {
-                    quitResponse.cancelQuit();
+            public void handle(OSXQuitResponseWrapper response) {
+                if (!actionManager.getAction(ExitAction.class).exit()) {
+                    response.cancelQuit();
+                } else {
+                    response.performQuit();
                 }
             }
         });

http://git-wip-us.apache.org/repos/asf/cayenne/blob/859f459c/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXQuitHandler.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXQuitHandler.java b/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXQuitHandler.java
new file mode 100644
index 0000000..eb0fdd3
--- /dev/null
+++ b/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXQuitHandler.java
@@ -0,0 +1,29 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+
+package org.apache.cayenne.modeler.osx;
+
+/**
+ * @since 4.1
+ */
+public interface OSXQuitHandler {
+
+    void handle(OSXQuitResponseWrapper response);
+
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/859f459c/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXQuitResponseWrapper.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXQuitResponseWrapper.java b/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXQuitResponseWrapper.java
new file mode 100644
index 0000000..f7e049b
--- /dev/null
+++ b/modeler/cayenne-modeler-mac-ext/src/main/java/org/apache/cayenne/modeler/osx/OSXQuitResponseWrapper.java
@@ -0,0 +1,73 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+
+package org.apache.cayenne.modeler.osx;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Small wrapper around QuitResponse class that can reside in different packages:
+ * com.apple.eawt.QuitResponse in JDK 8 and java.awt.desktop.QuitResponse in JDK 9.
+ * Luckily it has same signature so we can dynamically resolve it's methods.
+ *
+ * @since 4.1
+ */
+public class OSXQuitResponseWrapper {
+
+    private static final Logger logger = LoggerFactory.getLogger(OSXQuitResponseWrapper.class);
+
+    private Method performQuit;
+
+    private Method cancelQuit;
+
+    private final Object quitResponse;
+
+    public OSXQuitResponseWrapper(Object quitResponse) {
+        this.quitResponse = quitResponse;
+        try {
+            performQuit = quitResponse.getClass().getMethod("performQuit");
+            cancelQuit = quitResponse.getClass().getMethod("cancelQuit");
+        } catch (NoSuchMethodException ex) {
+            logger.warn("Unable to find methods for quit response", ex);
+        }
+    }
+
+    public void performQuit() {
+        safePerform(performQuit);
+    }
+
+    public void cancelQuit() {
+        safePerform(cancelQuit);
+    }
+
+    private void safePerform(Method method) {
+        if(method == null) {
+            return;
+        }
+        try {
+            method.invoke(quitResponse);
+        } catch (IllegalAccessException | InvocationTargetException ex) {
+            logger.warn("Unable to call " + method.getName(), ex);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/859f459c/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/swing/components/image/FilteredIconFactory.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/swing/components/image/FilteredIconFactory.java b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/swing/components/image/FilteredIconFactory.java
index 4e92238..cb92b1c 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/swing/components/image/FilteredIconFactory.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/swing/components/image/FilteredIconFactory.java
@@ -25,12 +25,11 @@ import java.awt.image.FilteredImageSource;
 import java.awt.image.ImageProducer;
 import java.awt.image.RGBImageFilter;
 import javax.swing.Icon;
+import javax.swing.ImageIcon;
 import javax.swing.JComponent;
 import javax.swing.JPanel;
 import javax.swing.UIManager;
 
-import sun.swing.ImageIconUIResource;
-
 /**
  * @since 4.0
  */
@@ -64,7 +63,7 @@ public class FilteredIconFactory {
             icon.paintIcon(DUMMY, img.getGraphics(), 0, 0);
             ImageProducer producer = new FilteredImageSource(img.getSource(), filterType.filter);
             Image resultImage = DUMMY.createImage(producer);
-            return new ImageIconUIResource(resultImage);
+            return new ImageIcon(resultImage);
         }
         return null;
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/859f459c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4816c30..58e673f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -701,7 +701,7 @@
 				</plugin>
 				<plugin>
 					<artifactId>maven-compiler-plugin</artifactId>
-					<version>2.3.2</version>
+					<version>3.6.1</version>
 					<configuration>
 						<source>1.7</source>
 						<target>1.7</target>
@@ -747,7 +747,7 @@
 				</plugin>
 				<plugin>
 					<artifactId>maven-surefire-plugin</artifactId>
-					<version>2.5</version>
+					<version>2.20.1</version>
 				</plugin>
 				<plugin>   
 					<groupId>org.apache.felix</groupId>
@@ -756,7 +756,7 @@
 				</plugin>
 				<plugin>
 					<artifactId>maven-surefire-report-plugin</artifactId>
-					<version>2.8</version>
+					<version>2.20.1</version>
 				</plugin>
 				<plugin>
 					<groupId>org.codehaus.mojo</groupId>
@@ -779,7 +779,7 @@
 				</plugin>
 				<plugin>
 					<artifactId>maven-javadoc-plugin</artifactId>
-					<version>2.9.1</version>
+					<version>3.0.0-M1</version>
 					<configuration>
 						<!-- Java 8 is too strict about Javadoc omissions --> 
 						<additionalparam>${javadoc.doclint.none}</additionalparam>
@@ -803,7 +803,7 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-failsafe-plugin</artifactId>
-                    <version>2.17</version>
+                    <version>2.20.1</version>
                     <executions>
                         <execution>
                             <id>integration-test</id>
@@ -1600,7 +1600,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-report-plugin</artifactId>
-                <version>2.8</version>
+                <version>2.20.1</version>
             </plugin>
         </plugins>
     </reporting>