From 9bb92f81bd5206c3597889644a1dded127760e22 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Tue, 3 Mar 2020 15:16:20 +0100 Subject: [PATCH] Issue #4443 - Track backport of ALPN APIs to Java 8. Modified jetty-alpn-openjdk8-* classes to support both pre 8u252 (via alpn-boot) and post 8u252 (via standard API). Replaced usages of -Xbootclasspath with -javaagent, and using Jetty ALPN Agent jar rather than Jetty ALPN boot jar. Removed all alpn-1.8.0*.mod files since now it is possible to use a fixed version of the ALPN Agent to cover all the versions. Signed-off-by: Simone Bordet --- examples/embedded/pom.xml | 2 +- jetty-alpn/jetty-alpn-java-client/pom.xml | 4 +- jetty-alpn/jetty-alpn-java-server/pom.xml | 9 +- jetty-alpn/jetty-alpn-openjdk8-client/pom.xml | 1 + .../client/OpenJDK8ClientALPNProcessor.java | 78 ++- .../server/OpenJDK8ServerALPNProcessor.java | 89 ++- .../config/modules/alpn-impl/alpn-1.8.0.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_05.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_101.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_102.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_11.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_111.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_112.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_121.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_131.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_141.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_144.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_151.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_152.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_161.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_162.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_171.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_172.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_181.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_191.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_192.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_20.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_201.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_202.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_211.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_212.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_221.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_222.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_231.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_232.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_241.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_242.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_25.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_31.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_40.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_45.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_51.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_60.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_65.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_66.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_71.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_72.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_73.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_74.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_77.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_91.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_92.mod | 7 - .../main/config/modules/alpn-impl/alpn-8.mod | 33 +- jetty-alpn/pom.xml | 2 +- jetty-home/pom.xml | 2 +- jetty-http-spi/pom.xml | 2 +- jetty-http2/http2-alpn-tests/pom.xml | 43 +- .../http2-http-client-transport/pom.xml | 25 +- jetty-http2/pom.xml | 3 +- .../src/it/jetty-deploy-war-mojo-it/pom.xml | 2 +- jetty-osgi/test-jetty-osgi/pom.xml | 15 +- .../osgi/test/TestJettyOSGiBootHTTP2.java | 34 +- .../jetty/server/DetectorConnectionTest.java | 12 +- .../java/org/eclipse/jetty/start/Modules.java | 22 +- .../modules/alpn-impl/alpn-1.8.0_101.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_102.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_111.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_112.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_121.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_131.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_141.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_144.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_151.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_152.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_161.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_162.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_171.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_172.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_181.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_191.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_192.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_201.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_202.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_211.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_212.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_221.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_222.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_231.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_232.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_241.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_242.mod | 7 - .../modules/alpn-impl/alpn-1.8.0_91.mod | 5 - .../modules/alpn-impl/alpn-1.8.0_92.mod | 5 - jetty-webapp/pom.xml | 2 +- pom.xml | 561 +----------------- tests/test-http-client-transport/pom.xml | 72 +-- tests/test-webapps/test-http2-webapp/pom.xml | 25 +- 97 files changed, 305 insertions(+), 1208 deletions(-) delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_05.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_101.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_102.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_11.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_111.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_112.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_121.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_131.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_141.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_144.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_151.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_152.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_161.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_162.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_171.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_172.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_181.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_191.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_192.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_20.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_201.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_202.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_211.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_212.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_221.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_222.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_231.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_232.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_241.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_242.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_25.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_31.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_40.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_45.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_51.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_60.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_65.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_66.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_71.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_72.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_73.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_74.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_77.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_91.mod delete mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_92.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_101.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_102.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_111.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_112.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_121.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_131.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_141.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_144.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_151.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_152.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_161.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_162.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_171.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_172.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_181.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_191.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_192.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_201.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_202.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_211.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_212.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_221.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_222.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_231.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_232.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_241.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_242.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_91.mod delete mode 100644 jetty-start/src/test/resources/dist-home/modules/alpn-impl/alpn-1.8.0_92.mod diff --git a/examples/embedded/pom.xml b/examples/embedded/pom.xml index 35b277a27d4..25fa3bf60c9 100644 --- a/examples/embedded/pom.xml +++ b/examples/embedded/pom.xml @@ -171,7 +171,7 @@ jdk9 - [1.9,) + [9,) diff --git a/jetty-alpn/jetty-alpn-java-client/pom.xml b/jetty-alpn/jetty-alpn-java-client/pom.xml index f9a6a2ad6d6..cd38c4a9069 100644 --- a/jetty-alpn/jetty-alpn-java-client/pom.xml +++ b/jetty-alpn/jetty-alpn-java-client/pom.xml @@ -20,8 +20,8 @@ maven-compiler-plugin - 1.9 - 1.9 + 9 + 9 9 diff --git a/jetty-alpn/jetty-alpn-java-server/pom.xml b/jetty-alpn/jetty-alpn-java-server/pom.xml index 1b5c5434786..5582dccfa56 100644 --- a/jetty-alpn/jetty-alpn-java-server/pom.xml +++ b/jetty-alpn/jetty-alpn-java-server/pom.xml @@ -19,8 +19,8 @@ maven-compiler-plugin - 1.9 - 1.9 + 9 + 9 9 @@ -46,11 +46,6 @@ jetty-io ${project.version} - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - org.eclipse.jetty jetty-alpn-server diff --git a/jetty-alpn/jetty-alpn-openjdk8-client/pom.xml b/jetty-alpn/jetty-alpn-openjdk8-client/pom.xml index 9c98b9807f8..a76767a2f0a 100644 --- a/jetty-alpn/jetty-alpn-openjdk8-client/pom.xml +++ b/jetty-alpn/jetty-alpn-openjdk8-client/pom.xml @@ -25,6 +25,7 @@ org.eclipse.jetty.alpn alpn-api ${alpn.api.version} + provided org.eclipse.jetty.http2 diff --git a/jetty-alpn/jetty-alpn-openjdk8-client/src/main/java/org/eclipse/jetty/alpn/openjdk8/client/OpenJDK8ClientALPNProcessor.java b/jetty-alpn/jetty-alpn-openjdk8-client/src/main/java/org/eclipse/jetty/alpn/openjdk8/client/OpenJDK8ClientALPNProcessor.java index bc6ee6c523d..28557b64e45 100644 --- a/jetty-alpn/jetty-alpn-openjdk8-client/src/main/java/org/eclipse/jetty/alpn/openjdk8/client/OpenJDK8ClientALPNProcessor.java +++ b/jetty-alpn/jetty-alpn-openjdk8-client/src/main/java/org/eclipse/jetty/alpn/openjdk8/client/OpenJDK8ClientALPNProcessor.java @@ -18,13 +18,20 @@ package org.eclipse.jetty.alpn.openjdk8.client; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.util.List; import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLException; +import javax.net.ssl.SSLHandshakeException; +import javax.net.ssl.SSLParameters; import org.eclipse.jetty.alpn.ALPN; import org.eclipse.jetty.alpn.client.ALPNClientConnection; import org.eclipse.jetty.io.Connection; import org.eclipse.jetty.io.ssl.ALPNProcessor; +import org.eclipse.jetty.io.ssl.SslConnection; +import org.eclipse.jetty.io.ssl.SslHandshakeListener; import org.eclipse.jetty.util.JavaVersion; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; @@ -33,11 +40,28 @@ public class OpenJDK8ClientALPNProcessor implements ALPNProcessor.Client { private static final Logger LOG = Log.getLogger(OpenJDK8ClientALPNProcessor.class); + private Method alpnProtocols; + private Method alpnProtocol; + @Override public void init() { if (JavaVersion.VERSION.getPlatform() != 8) throw new IllegalStateException(this + " not applicable for java " + JavaVersion.VERSION); + + try + { + // JDK 8u252 has the JDK 9 ALPN API backported. + // Use reflection so we can build with a JDK version less than 8u252. + alpnProtocols = SSLParameters.class.getMethod("setApplicationProtocols", String[].class); + alpnProtocol = SSLEngine.class.getMethod("getApplicationProtocol"); + return; + } + catch (NoSuchMethodException ignored) + { + } + + // Backported ALPN APIs not available. if (ALPN.class.getClassLoader() != null) throw new IllegalStateException(ALPN.class.getName() + " must be on JVM boot classpath"); if (LOG.isDebugEnabled()) @@ -53,14 +77,34 @@ public class OpenJDK8ClientALPNProcessor implements ALPNProcessor.Client @Override public void configure(SSLEngine sslEngine, Connection connection) { - connection.addListener(new ALPNListener((ALPNClientConnection)connection)); + ALPNClientConnection alpnConnection = (ALPNClientConnection)connection; + if (alpnProtocols == null) + { + connection.addListener(new ALPNConnectionListener(alpnConnection)); + } + else + { + try + { + Object protocols = alpnConnection.getProtocols().toArray(new String[0]); + SSLParameters sslParameters = sslEngine.getSSLParameters(); + alpnProtocols.invoke(sslParameters, protocols); + sslEngine.setSSLParameters(sslParameters); + ((SslConnection.DecryptedEndPoint)connection.getEndPoint()).getSslConnection() + .addHandshakeListener(new ALPNSSLListener(alpnConnection)); + } + catch (IllegalAccessException | InvocationTargetException x) + { + throw new IllegalStateException(this + " unable to set ALPN protocols", x); + } + } } - private final class ALPNListener implements ALPN.ClientProvider, Connection.Listener + private static final class ALPNConnectionListener implements ALPN.ClientProvider, Connection.Listener { private final ALPNClientConnection alpnConnection; - private ALPNListener(ALPNClientConnection connection) + private ALPNConnectionListener(ALPNClientConnection connection) { alpnConnection = connection; } @@ -102,4 +146,32 @@ public class OpenJDK8ClientALPNProcessor implements ALPNProcessor.Client alpnConnection.selected(protocol); } } + + private final class ALPNSSLListener implements SslHandshakeListener + { + private final ALPNClientConnection alpnConnection; + + private ALPNSSLListener(ALPNClientConnection connection) + { + alpnConnection = connection; + } + + @Override + public void handshakeSucceeded(Event event) throws SSLException + { + try + { + SSLEngine sslEngine = alpnConnection.getSSLEngine(); + String protocol = (String)alpnProtocol.invoke(sslEngine); + if (LOG.isDebugEnabled()) + LOG.debug("selected protocol {}", protocol); + alpnConnection.selected(protocol); + } + catch (IllegalAccessException | InvocationTargetException x) + { + SSLHandshakeException failure = new SSLHandshakeException(this + " unable to get ALPN protocol"); + throw (SSLHandshakeException)failure.initCause(x); + } + } + } } diff --git a/jetty-alpn/jetty-alpn-openjdk8-server/src/main/java/org/eclipse/jetty/alpn/openjdk8/server/OpenJDK8ServerALPNProcessor.java b/jetty-alpn/jetty-alpn-openjdk8-server/src/main/java/org/eclipse/jetty/alpn/openjdk8/server/OpenJDK8ServerALPNProcessor.java index b2668c6391a..552e98673d6 100644 --- a/jetty-alpn/jetty-alpn-openjdk8-server/src/main/java/org/eclipse/jetty/alpn/openjdk8/server/OpenJDK8ServerALPNProcessor.java +++ b/jetty-alpn/jetty-alpn-openjdk8-server/src/main/java/org/eclipse/jetty/alpn/openjdk8/server/OpenJDK8ServerALPNProcessor.java @@ -18,15 +18,19 @@ package org.eclipse.jetty.alpn.openjdk8.server; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.util.Collections; import java.util.List; +import java.util.function.BiFunction; import javax.net.ssl.SSLEngine; -import javax.net.ssl.SSLException; import org.eclipse.jetty.alpn.ALPN; import org.eclipse.jetty.alpn.server.ALPNServerConnection; import org.eclipse.jetty.io.Connection; import org.eclipse.jetty.io.ssl.ALPNProcessor; +import org.eclipse.jetty.io.ssl.SslConnection; +import org.eclipse.jetty.io.ssl.SslHandshakeListener; import org.eclipse.jetty.util.JavaVersion; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; @@ -35,11 +39,26 @@ public class OpenJDK8ServerALPNProcessor implements ALPNProcessor.Server { private static final Logger LOG = Log.getLogger(OpenJDK8ServerALPNProcessor.class); + private Method alpnSelector; + @Override public void init() { if (JavaVersion.VERSION.getPlatform() != 8) throw new IllegalStateException(this + " not applicable for java " + JavaVersion.VERSION); + + try + { + // JDK 8u252 has the JDK 9 ALPN API backported. + // Use reflection so we can build with a JDK version less than 8u252. + alpnSelector = SSLEngine.class.getMethod("setHandshakeApplicationProtocolSelector", BiFunction.class); + return; + } + catch (NoSuchMethodException ignored) + { + } + + // Backported ALPN APIs not available. if (ALPN.class.getClassLoader() != null) throw new IllegalStateException(ALPN.class.getName() + " must be on JVM boot classpath"); if (LOG.isDebugEnabled()) @@ -55,10 +74,26 @@ public class OpenJDK8ServerALPNProcessor implements ALPNProcessor.Server @Override public void configure(SSLEngine sslEngine, Connection connection) { - connection.addListener(new ALPNListener((ALPNServerConnection)connection)); + if (alpnSelector == null) + { + ALPNListener listener = new ALPNListener((ALPNServerConnection)connection); + connection.addListener(listener); + } + else + { + try + { + ALPNCallback callback = new ALPNCallback((ALPNServerConnection)connection); + alpnSelector.invoke(sslEngine, callback); + } + catch (IllegalAccessException | InvocationTargetException x) + { + throw new IllegalStateException(this + " unable to set ALPN selector", x); + } + } } - private final class ALPNListener implements ALPN.ServerProvider, Connection.Listener + private static final class ALPNListener implements ALPN.ServerProvider, Connection.Listener { private final ALPNServerConnection alpnConnection; @@ -92,7 +127,7 @@ public class OpenJDK8ServerALPNProcessor implements ALPNProcessor.Server } @Override - public String select(List protocols) throws SSLException + public String select(List protocols) { if (LOG.isDebugEnabled()) LOG.debug("select {} {}", alpnConnection, protocols); @@ -100,4 +135,50 @@ public class OpenJDK8ServerALPNProcessor implements ALPNProcessor.Server return alpnConnection.getProtocol(); } } + + private static class ALPNCallback implements BiFunction, String>, SslHandshakeListener + { + private final ALPNServerConnection alpnConnection; + + private ALPNCallback(ALPNServerConnection connection) + { + alpnConnection = connection; + ((SslConnection.DecryptedEndPoint)alpnConnection.getEndPoint()).getSslConnection().addHandshakeListener(this); + } + + @Override + public String apply(SSLEngine engine, List protocols) + { + try + { + if (LOG.isDebugEnabled()) + LOG.debug("apply {} {}", alpnConnection, protocols); + alpnConnection.select(protocols); + return alpnConnection.getProtocol(); + } + catch (Throwable x) + { + // Cannot negotiate the protocol, return null to have + // JSSE send Alert.NO_APPLICATION_PROTOCOL to the client. + return null; + } + } + + @Override + public void handshakeSucceeded(Event event) + { + String protocol = alpnConnection.getProtocol(); + if (LOG.isDebugEnabled()) + LOG.debug("TLS handshake succeeded, protocol={} for {}", protocol, alpnConnection); + if (protocol == null) + alpnConnection.unsupported(); + } + + @Override + public void handshakeFailed(Event event, Throwable failure) + { + if (LOG.isDebugEnabled()) + LOG.debug("TLS handshake failed " + alpnConnection, failure); + } + } } diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0.mod deleted file mode 100644 index bbcca55ad48..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.0.v20141016|lib/alpn/alpn-boot-8.1.0.v20141016.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.0.v20141016.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_05.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_05.mod deleted file mode 100644 index bbcca55ad48..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_05.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.0.v20141016|lib/alpn/alpn-boot-8.1.0.v20141016.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.0.v20141016.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_101.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_101.mod deleted file mode 100644 index 98e9460dd1a..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_101.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.9.v20160720|lib/alpn/alpn-boot-8.1.9.v20160720.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.9.v20160720.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_102.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_102.mod deleted file mode 100644 index 98e9460dd1a..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_102.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.9.v20160720|lib/alpn/alpn-boot-8.1.9.v20160720.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.9.v20160720.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_11.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_11.mod deleted file mode 100644 index bbcca55ad48..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_11.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.0.v20141016|lib/alpn/alpn-boot-8.1.0.v20141016.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.0.v20141016.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_111.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_111.mod deleted file mode 100644 index 98e9460dd1a..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_111.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.9.v20160720|lib/alpn/alpn-boot-8.1.9.v20160720.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.9.v20160720.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_112.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_112.mod deleted file mode 100644 index 8d4ac37b4f4..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_112.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.10.v20161026|lib/alpn/alpn-boot-8.1.10.v20161026.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.10.v20161026.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_121.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_121.mod deleted file mode 100644 index 7a3a9192362..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_121.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.11.v20170118|lib/alpn/alpn-boot-8.1.11.v20170118.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.11.v20170118.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_131.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_131.mod deleted file mode 100644 index 7a3a9192362..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_131.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.11.v20170118|lib/alpn/alpn-boot-8.1.11.v20170118.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.11.v20170118.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_141.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_141.mod deleted file mode 100644 index 7a3a9192362..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_141.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.11.v20170118|lib/alpn/alpn-boot-8.1.11.v20170118.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.11.v20170118.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_144.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_144.mod deleted file mode 100644 index 7a3a9192362..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_144.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.11.v20170118|lib/alpn/alpn-boot-8.1.11.v20170118.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.11.v20170118.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_151.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_151.mod deleted file mode 100644 index 7a3a9192362..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_151.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.11.v20170118|lib/alpn/alpn-boot-8.1.11.v20170118.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.11.v20170118.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_152.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_152.mod deleted file mode 100644 index 7a3a9192362..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_152.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.11.v20170118|lib/alpn/alpn-boot-8.1.11.v20170118.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.11.v20170118.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_161.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_161.mod deleted file mode 100644 index 00366a87b3d..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_161.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.12.v20180117|lib/alpn/alpn-boot-8.1.12.v20180117.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.12.v20180117.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_162.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_162.mod deleted file mode 100644 index 00366a87b3d..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_162.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.12.v20180117|lib/alpn/alpn-boot-8.1.12.v20180117.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.12.v20180117.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_171.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_171.mod deleted file mode 100644 index 00366a87b3d..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_171.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.12.v20180117|lib/alpn/alpn-boot-8.1.12.v20180117.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.12.v20180117.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_172.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_172.mod deleted file mode 100644 index 00366a87b3d..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_172.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.12.v20180117|lib/alpn/alpn-boot-8.1.12.v20180117.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.12.v20180117.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_181.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_181.mod deleted file mode 100644 index 00366a87b3d..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_181.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.12.v20180117|lib/alpn/alpn-boot-8.1.12.v20180117.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.12.v20180117.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_191.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_191.mod deleted file mode 100644 index ed8a55508d6..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_191.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.13.v20181017|lib/alpn/alpn-boot-8.1.13.v20181017.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.13.v20181017.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_192.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_192.mod deleted file mode 100644 index ed8a55508d6..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_192.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.13.v20181017|lib/alpn/alpn-boot-8.1.13.v20181017.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.13.v20181017.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_20.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_20.mod deleted file mode 100644 index bbcca55ad48..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_20.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.0.v20141016|lib/alpn/alpn-boot-8.1.0.v20141016.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.0.v20141016.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_201.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_201.mod deleted file mode 100644 index ed8a55508d6..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_201.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.13.v20181017|lib/alpn/alpn-boot-8.1.13.v20181017.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.13.v20181017.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_202.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_202.mod deleted file mode 100644 index ed8a55508d6..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_202.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.13.v20181017|lib/alpn/alpn-boot-8.1.13.v20181017.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.13.v20181017.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_211.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_211.mod deleted file mode 100644 index ed8a55508d6..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_211.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.13.v20181017|lib/alpn/alpn-boot-8.1.13.v20181017.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.13.v20181017.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_212.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_212.mod deleted file mode 100644 index ed8a55508d6..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_212.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.13.v20181017|lib/alpn/alpn-boot-8.1.13.v20181017.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.13.v20181017.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_221.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_221.mod deleted file mode 100644 index ed8a55508d6..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_221.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.13.v20181017|lib/alpn/alpn-boot-8.1.13.v20181017.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.13.v20181017.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_222.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_222.mod deleted file mode 100644 index ed8a55508d6..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_222.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.13.v20181017|lib/alpn/alpn-boot-8.1.13.v20181017.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.13.v20181017.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_231.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_231.mod deleted file mode 100644 index ed8a55508d6..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_231.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.13.v20181017|lib/alpn/alpn-boot-8.1.13.v20181017.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.13.v20181017.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_232.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_232.mod deleted file mode 100644 index ed8a55508d6..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_232.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.13.v20181017|lib/alpn/alpn-boot-8.1.13.v20181017.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.13.v20181017.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_241.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_241.mod deleted file mode 100644 index ed8a55508d6..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_241.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.13.v20181017|lib/alpn/alpn-boot-8.1.13.v20181017.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.13.v20181017.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_242.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_242.mod deleted file mode 100644 index ed8a55508d6..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_242.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.13.v20181017|lib/alpn/alpn-boot-8.1.13.v20181017.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.13.v20181017.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_25.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_25.mod deleted file mode 100644 index f34b1841244..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_25.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.2.v20141202|lib/alpn/alpn-boot-8.1.2.v20141202.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.2.v20141202.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_31.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_31.mod deleted file mode 100644 index 9ffca1a9699..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_31.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.3.v20150130|lib/alpn/alpn-boot-8.1.3.v20150130.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.3.v20150130.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_40.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_40.mod deleted file mode 100644 index 9ffca1a9699..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_40.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.3.v20150130|lib/alpn/alpn-boot-8.1.3.v20150130.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.3.v20150130.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_45.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_45.mod deleted file mode 100644 index 9ffca1a9699..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_45.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.3.v20150130|lib/alpn/alpn-boot-8.1.3.v20150130.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.3.v20150130.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_51.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_51.mod deleted file mode 100644 index bd6891a07e4..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_51.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.4.v20150727|lib/alpn/alpn-boot-8.1.4.v20150727.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.4.v20150727.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_60.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_60.mod deleted file mode 100644 index 004663c5e7a..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_60.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.5.v20150921|lib/alpn/alpn-boot-8.1.5.v20150921.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.5.v20150921.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_65.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_65.mod deleted file mode 100644 index 532c440dd42..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_65.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.6.v20151105|lib/alpn/alpn-boot-8.1.6.v20151105.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.6.v20151105.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_66.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_66.mod deleted file mode 100644 index 532c440dd42..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_66.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.6.v20151105|lib/alpn/alpn-boot-8.1.6.v20151105.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.6.v20151105.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_71.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_71.mod deleted file mode 100644 index 48de22c2231..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_71.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.7.v20160121|lib/alpn/alpn-boot-8.1.7.v20160121.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.7.v20160121.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_72.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_72.mod deleted file mode 100644 index 48de22c2231..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_72.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.7.v20160121|lib/alpn/alpn-boot-8.1.7.v20160121.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.7.v20160121.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_73.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_73.mod deleted file mode 100644 index 48de22c2231..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_73.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.7.v20160121|lib/alpn/alpn-boot-8.1.7.v20160121.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.7.v20160121.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_74.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_74.mod deleted file mode 100644 index 48de22c2231..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_74.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.7.v20160121|lib/alpn/alpn-boot-8.1.7.v20160121.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.7.v20160121.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_77.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_77.mod deleted file mode 100644 index 48de22c2231..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_77.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.7.v20160121|lib/alpn/alpn-boot-8.1.7.v20160121.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.7.v20160121.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_91.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_91.mod deleted file mode 100644 index 48de22c2231..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_91.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.7.v20160121|lib/alpn/alpn-boot-8.1.7.v20160121.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.7.v20160121.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_92.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_92.mod deleted file mode 100644 index a3677be88e3..00000000000 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-1.8.0_92.mod +++ /dev/null @@ -1,7 +0,0 @@ -DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - -[files] -maven://org.mortbay.jetty.alpn/alpn-boot/8.1.8.v20160420|lib/alpn/alpn-boot-8.1.8.v20160420.jar - -[exec] --Xbootclasspath/p:lib/alpn/alpn-boot-8.1.8.v20160420.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-8.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-8.mod index 252d27466af..ece589b8884 100644 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-8.mod +++ b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-8.mod @@ -1,33 +1,22 @@ DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html [description] -Provides ALPN support for JDK 8, modifying the sun.security.ssl -classes and adding them to the JVM boot classpath. -This modification has a tight dependency on specific recent updates of -Java 1.7 and Java 1.8 (Java versions prior to 1.7u40 are not supported). -This module will use an appropriate alpn-boot jar for your -specific version of Java. -# IMPORTANT: Versions of Java that exist after this module was created are -# not guaranteed to work with existing alpn-boot jars, and might -# need a new alpn-boot to be created / tested / deployed by the -# Jetty project in order to provide support for these future -# Java versions. -# -# All versions of the alpn-boot jar can be found at -# https://repo1.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/ - -[depend] -alpn-impl/alpn-${java.version} - -[lib] -lib/jetty-alpn-openjdk8-server-${jetty.version}.jar +Provides ALPN support for JDK 8, using the Jetty ALPN Agent. [files] lib/ lib/alpn/ +maven://org.mortbay.jetty.alpn/jetty-alpn-agent/2.0.10|lib/alpn/jetty-alpn-agent-2.0.10.jar + +[lib] +lib/jetty-alpn-openjdk8-server-${jetty.version}.jar [license] -ALPN is a hosted at github under the GPL v2 with ClassPath Exception. -ALPN replaces/modifies OpenJDK classes in the sun.security.ssl package. +The ALPN implementation for Java 8u242 and earlier replaces/modifies OpenJDK classes +in the sun.security.ssl package. +These modified classes are hosted at GitHub under the GPL v2 with ClassPath Exception. http://github.com/jetty-project/jetty-alpn http://openjdk.java.net/legal/gplv2+ce.html + +[exec] +-javaagent:lib/alpn/jetty-alpn-agent-2.0.10.jar diff --git a/jetty-alpn/pom.xml b/jetty-alpn/pom.xml index d319192bdda..ea355904386 100644 --- a/jetty-alpn/pom.xml +++ b/jetty-alpn/pom.xml @@ -21,7 +21,7 @@ jdk9 - [1.9,) + [9,) jetty-alpn-java-client diff --git a/jetty-home/pom.xml b/jetty-home/pom.xml index 87910286041..7cc9e6cf16b 100644 --- a/jetty-home/pom.xml +++ b/jetty-home/pom.xml @@ -774,7 +774,7 @@ jdk9 - [1.9,) + [9,) diff --git a/jetty-http-spi/pom.xml b/jetty-http-spi/pom.xml index 319900b29ac..ec89e2470da 100644 --- a/jetty-http-spi/pom.xml +++ b/jetty-http-spi/pom.xml @@ -78,7 +78,7 @@ jdk9 - [1.9,) + [9,) diff --git a/jetty-http2/http2-alpn-tests/pom.xml b/jetty-http2/http2-alpn-tests/pom.xml index ce1c57e3afe..0eb37365467 100644 --- a/jetty-http2/http2-alpn-tests/pom.xml +++ b/jetty-http2/http2-alpn-tests/pom.xml @@ -20,7 +20,7 @@ maven-dependency-plugin - copy + copy-alpn-agent generate-resources copy @@ -29,8 +29,8 @@ org.mortbay.jetty.alpn - alpn-boot - ${alpn.version} + jetty-alpn-agent + ${alpn.agent.version} jar false ${project.build.directory}/alpn @@ -43,7 +43,7 @@ maven-surefire-plugin - -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar + -javaagent:${project.build.directory}/alpn/jetty-alpn-agent-${alpn.agent.version}.jar=debug=true @@ -54,12 +54,6 @@ org.eclipse.jetty.alpn alpn-api ${alpn.api.version} - provided - - - org.eclipse.jetty - jetty-alpn-openjdk8-server - ${project.version} test @@ -68,6 +62,18 @@ ${project.version} test + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + test + + + org.eclipse.jetty + jetty-alpn-openjdk8-server + ${project.version} + test + org.eclipse.jetty.http2 http2-server @@ -81,21 +87,4 @@ - - - jdk9 - - [1.9,) - - - - - org.eclipse.jetty - jetty-alpn-java-server - ${project.version} - test - - - - diff --git a/jetty-http2/http2-http-client-transport/pom.xml b/jetty-http2/http2-http-client-transport/pom.xml index 82f89728329..6381d1269ce 100644 --- a/jetty-http2/http2-http-client-transport/pom.xml +++ b/jetty-http2/http2-http-client-transport/pom.xml @@ -18,7 +18,7 @@ jdk8 - [1.8,1.9) + [1.8,9) @@ -26,7 +26,7 @@ maven-dependency-plugin - copy + copy-alpn-agent generate-resources copy @@ -35,8 +35,8 @@ org.mortbay.jetty.alpn - alpn-boot - ${alpn.version} + jetty-alpn-agent + ${alpn.agent.version} jar false ${project.build.directory}/alpn @@ -49,16 +49,29 @@ maven-surefire-plugin - -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar + -javaagent:${project.build.directory}/alpn/jetty-alpn-agent-${alpn.agent.version}.jar=debug=true + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + + + org.eclipse.jetty + jetty-alpn-openjdk8-client + ${project.version} + + jdk9 - [1.9,) + [9,) diff --git a/jetty-http2/pom.xml b/jetty-http2/pom.xml index e71440791fe..4139a840928 100644 --- a/jetty-http2/pom.xml +++ b/jetty-http2/pom.xml @@ -24,9 +24,10 @@ jdk8 - [1.8,1.9) + [1.8,9) + http2-alpn-tests diff --git a/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/pom.xml b/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/pom.xml index d29454fdaf9..95047929633 100644 --- a/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/pom.xml +++ b/jetty-maven-plugin/src/it/jetty-deploy-war-mojo-it/pom.xml @@ -129,7 +129,7 @@ jdk9+ - [1.9,) + [9,) diff --git a/jetty-osgi/test-jetty-osgi/pom.xml b/jetty-osgi/test-jetty-osgi/pom.xml index 172062ee43d..600946d2241 100644 --- a/jetty-osgi/test-jetty-osgi/pom.xml +++ b/jetty-osgi/test-jetty-osgi/pom.xml @@ -17,7 +17,6 @@ 4.13.1 2.6.1 1.0 - true @@ -446,7 +445,6 @@ maven-surefire-plugin - ${skipTests} ${settings.localRepository} ${env.GLOBAL_MVN_SETTINGS} @@ -541,20 +539,17 @@ test - - false - maven-surefire-plugin + + + -Dmortbay-alpn-agent=${settings.localRepository}/org/mortbay/jetty/alpn/jetty-alpn-agent/${alpn.agent.version}/jetty-alpn-agent-${alpn.agent.version}.jar -Dconscrypt-version=${conscrypt.version} **/TestJettyOSGiBootHTTP2JDK9* - - - -Dmortbay-alpn-boot=${settings.localRepository}/org/mortbay/jetty/alpn/alpn-boot/${alpn.version}/alpn-boot-${alpn.version}.jar -Dconscrypt-version=${conscrypt.version} @@ -591,15 +586,11 @@ test - - false - maven-surefire-plugin - ${skipTests} **/TestJettyOSGiBootHTTP2 diff --git a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootHTTP2.java b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootHTTP2.java index 0881197f951..1f971fd0e33 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootHTTP2.java +++ b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootHTTP2.java @@ -47,7 +47,6 @@ import org.osgi.framework.ServiceReference; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.ops4j.pax.exam.CoreOptions.mavenBundle; import static org.ops4j.pax.exam.CoreOptions.systemProperty; @@ -93,18 +92,13 @@ public class TestJettyOSGiBootHTTP2 List - org.apache.maven.plugins maven-failsafe-plugin - -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar + -javaagent:${project.build.directory}/alpn/jetty-alpn-agent-${alpn.agent.version}.jar=debug=true + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + org.eclipse.jetty jetty-alpn-openjdk8-client ${project.version} - - - org.eclipse.jetty.alpn - alpn-api - - org.eclipse.jetty @@ -120,7 +119,7 @@ jdk9 - [1.9,) + [9,)