From 11d669092a8e60a8122f24e761ad480046635ca0 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Thu, 12 Jan 2017 15:34:04 +0100 Subject: [PATCH] Issue #1073 - JDK9 support in Jetty 9.3.x. * Updated Maven plugins to versions that support JDK 9. * Added jdk9 profiles to the build files. * Introduced modules jetty-alpn-java-client and jetty-alpn-java-server containing a pure JDK 9 implementation of ALPN. * Wired ALPN connection factories (client and server) to use the proper ALPN implementation based on the JDK platform version (8 or 9). --- apache-jsp/pom.xml | 6 - .../eclipse/jetty/embedded/Http2Server.java | 3 - .../client/ALPNClientConnectionFactory.java | 41 +++- jetty-alpn/jetty-alpn-java-client/pom.xml | 53 +++++ .../java/client/JDK9ClientALPNProcessor.java | 54 +++++ ....eclipse.jetty.io.ssl.ALPNProcessor$Client | 1 + .../alpn/java/client/JDK9HTTP2Client.java | 85 +++++++ .../test/resources/jetty-logging.properties | 2 + jetty-alpn/jetty-alpn-java-server/pom.xml | 73 ++++++ .../java/server/JDK9ServerALPNProcessor.java | 49 ++++ ....eclipse.jetty.io.ssl.ALPNProcessor$Server | 1 + .../alpn/java/server/JDK9HTTP2Server.java | 66 ++++++ .../test/resources/jetty-logging.properties | 2 + .../src/test/resources/keystore.jks | Bin 0 -> 3697 bytes .../main/config/modules/alpn-impl/alpn-8.mod | 26 +++ .../main/config/modules/alpn-impl/alpn-9.mod | 5 + .../src/main/config/modules/alpn.mod | 31 +-- .../server/ALPNServerConnectionFactory.java | 31 ++- jetty-alpn/pom.xml | 16 +- jetty-cdi/test-cdi-webapp/pom.xml | 1 - jetty-distribution/pom.xml | 29 ++- .../proxy/DrupalHTTP2FastCGIProxyServer.java | 2 - .../WordPressHTTP2FastCGIProxyServer.java | 2 - jetty-http2/http2-alpn-tests/pom.xml | 99 +++++---- .../http2-http-client-transport/pom.xml | 72 +++--- jetty-infinispan/pom.xml | 8 - .../eclipse/jetty/io/ssl/ALPNProcessor.java | 52 +++++ .../io/ssl/SslClientConnectionFactory.java | 4 +- .../eclipse/jetty/io/ssl/SslConnection.java | 3 +- jetty-osgi/jetty-osgi-boot-jsp/pom.xml | 6 - jetty-osgi/jetty-osgi-boot-warurl/pom.xml | 10 +- jetty-osgi/jetty-osgi-boot/pom.xml | 6 - jetty-osgi/jetty-osgi-httpservice/pom.xml | 6 - jetty-osgi/pom.xml | 25 ++- jetty-osgi/test-jetty-osgi-context/pom.xml | 22 +- jetty-osgi/test-jetty-osgi-fragment/pom.xml | 18 +- jetty-osgi/test-jetty-osgi-webapp/pom.xml | 32 ++- .../NegotiatingServerConnectionFactory.java | 25 ++- .../org/eclipse/jetty/start/JavaVersion.java | 153 +++++++++++++ .../org/eclipse/jetty/start/StartArgs.java | 22 +- .../eclipse/jetty/start/TestBadUseCases.java | 2 +- jetty-websocket/websocket-common/pom.xml | 1 - pom.xml | 209 +++++++++--------- tests/test-http-client-transport/pom.xml | 89 ++++---- .../jetty/TestTransparentProxyServer.java | 2 - .../test-container-initializer/pom.xml | 8 - 46 files changed, 1056 insertions(+), 397 deletions(-) create mode 100644 jetty-alpn/jetty-alpn-java-client/pom.xml create mode 100644 jetty-alpn/jetty-alpn-java-client/src/main/java/org/eclipse/jetty/alpn/java/client/JDK9ClientALPNProcessor.java create mode 100644 jetty-alpn/jetty-alpn-java-client/src/main/resources/META-INF/services/org.eclipse.jetty.io.ssl.ALPNProcessor$Client create mode 100644 jetty-alpn/jetty-alpn-java-client/src/test/java/org/eclipse/jetty/alpn/java/client/JDK9HTTP2Client.java create mode 100644 jetty-alpn/jetty-alpn-java-client/src/test/resources/jetty-logging.properties create mode 100644 jetty-alpn/jetty-alpn-java-server/pom.xml create mode 100644 jetty-alpn/jetty-alpn-java-server/src/main/java/org/eclipse/jetty/alpn/java/server/JDK9ServerALPNProcessor.java create mode 100644 jetty-alpn/jetty-alpn-java-server/src/main/resources/META-INF/services/org.eclipse.jetty.io.ssl.ALPNProcessor$Server create mode 100644 jetty-alpn/jetty-alpn-java-server/src/test/java/org/eclipse/jetty/alpn/java/server/JDK9HTTP2Server.java create mode 100644 jetty-alpn/jetty-alpn-java-server/src/test/resources/jetty-logging.properties create mode 100644 jetty-alpn/jetty-alpn-java-server/src/test/resources/keystore.jks create mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-8.mod create mode 100644 jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-9.mod create mode 100644 jetty-io/src/main/java/org/eclipse/jetty/io/ssl/ALPNProcessor.java create mode 100644 jetty-start/src/main/java/org/eclipse/jetty/start/JavaVersion.java diff --git a/apache-jsp/pom.xml b/apache-jsp/pom.xml index 9a2cf1eb196..9bd0da91306 100644 --- a/apache-jsp/pom.xml +++ b/apache-jsp/pom.xml @@ -34,12 +34,6 @@ org.apache.maven.plugins maven-jar-plugin - - artifact-jar - - jar - - test-jar diff --git a/examples/embedded/src/main/java/org/eclipse/jetty/embedded/Http2Server.java b/examples/embedded/src/main/java/org/eclipse/jetty/embedded/Http2Server.java index 0502fb2f65c..bf18c00f92e 100644 --- a/examples/embedded/src/main/java/org/eclipse/jetty/embedded/Http2Server.java +++ b/examples/embedded/src/main/java/org/eclipse/jetty/embedded/Http2Server.java @@ -46,7 +46,6 @@ import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory; import org.eclipse.jetty.jmx.MBeanContainer; import org.eclipse.jetty.server.HttpConfiguration; import org.eclipse.jetty.server.HttpConnectionFactory; -import org.eclipse.jetty.server.NegotiatingServerConnectionFactory; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.SecureRequestCustomizer; import org.eclipse.jetty.server.Server; @@ -56,7 +55,6 @@ import org.eclipse.jetty.servlet.DefaultServlet; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.eclipse.jetty.servlets.PushCacheFilter; -import org.eclipse.jetty.servlets.PushSessionCacheFilter; import org.eclipse.jetty.util.ssl.SslContextFactory; @@ -109,7 +107,6 @@ public class Http2Server // HTTP/2 Connection Factory HTTP2ServerConnectionFactory h2 = new HTTP2ServerConnectionFactory(https_config); - NegotiatingServerConnectionFactory.checkProtocolNegotiationAvailable(); ALPNServerConnectionFactory alpn = new ALPNServerConnectionFactory(); alpn.setDefaultProtocol(http.getDefaultProtocol()); diff --git a/jetty-alpn/jetty-alpn-client/src/main/java/org/eclipse/jetty/alpn/client/ALPNClientConnectionFactory.java b/jetty-alpn/jetty-alpn-client/src/main/java/org/eclipse/jetty/alpn/client/ALPNClientConnectionFactory.java index a83012d9327..68922a42dbd 100644 --- a/jetty-alpn/jetty-alpn-client/src/main/java/org/eclipse/jetty/alpn/client/ALPNClientConnectionFactory.java +++ b/jetty-alpn/jetty-alpn-client/src/main/java/org/eclipse/jetty/alpn/client/ALPNClientConnectionFactory.java @@ -19,8 +19,10 @@ package org.eclipse.jetty.alpn.client; import java.io.IOException; +import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.ServiceLoader; import java.util.concurrent.Executor; import javax.net.ssl.SSLEngine; @@ -29,27 +31,58 @@ import org.eclipse.jetty.io.ClientConnectionFactory; import org.eclipse.jetty.io.Connection; import org.eclipse.jetty.io.EndPoint; import org.eclipse.jetty.io.NegotiatingClientConnectionFactory; +import org.eclipse.jetty.io.ssl.ALPNProcessor; import org.eclipse.jetty.io.ssl.SslClientConnectionFactory; +import org.eclipse.jetty.io.ssl.SslHandshakeListener; +import org.eclipse.jetty.util.component.ContainerLifeCycle; -public class ALPNClientConnectionFactory extends NegotiatingClientConnectionFactory +public class ALPNClientConnectionFactory extends NegotiatingClientConnectionFactory implements SslHandshakeListener { + private final SslHandshakeListener alpnListener = new ALPNListener(); private final Executor executor; private final List protocols; + private final ALPNProcessor.Client alpnProcessor; public ALPNClientConnectionFactory(Executor executor, ClientConnectionFactory connectionFactory, List protocols) { super(connectionFactory); - this.executor = executor; - this.protocols = protocols; if (protocols.isEmpty()) throw new IllegalArgumentException("ALPN protocol list cannot be empty"); + this.executor = executor; + this.protocols = protocols; + Iterator processors = ServiceLoader.load(ALPNProcessor.Client.class).iterator(); + alpnProcessor = processors.hasNext() ? processors.next() : ALPNProcessor.Client.NOOP; + } + + public ALPNProcessor.Client getALPNProcessor() + { + return alpnProcessor; } @Override public Connection newConnection(EndPoint endPoint, Map context) throws IOException { + SSLEngine sslEngine = (SSLEngine)context.get(SslClientConnectionFactory.SSL_ENGINE_CONTEXT_KEY); + getALPNProcessor().configure(sslEngine, protocols); + ContainerLifeCycle connector = (ContainerLifeCycle)context.get(ClientConnectionFactory.CONNECTOR_CONTEXT_KEY); + // Method addBean() has set semantic, so the listener is added only once. + connector.addBean(alpnListener); ALPNClientConnection connection = new ALPNClientConnection(endPoint, executor, getClientConnectionFactory(), - (SSLEngine)context.get(SslClientConnectionFactory.SSL_ENGINE_CONTEXT_KEY), context, protocols); + sslEngine, context, protocols); return customize(connection, context); } + + private class ALPNListener implements SslHandshakeListener + { + @Override + public void handshakeSucceeded(Event event) + { + getALPNProcessor().process(event.getSSLEngine()); + } + + @Override + public void handshakeFailed(Event event, Throwable failure) + { + } + } } diff --git a/jetty-alpn/jetty-alpn-java-client/pom.xml b/jetty-alpn/jetty-alpn-java-client/pom.xml new file mode 100644 index 00000000000..72f202fb273 --- /dev/null +++ b/jetty-alpn/jetty-alpn-java-client/pom.xml @@ -0,0 +1,53 @@ + + + + + org.eclipse.jetty + jetty-alpn-parent + 9.3.16-SNAPSHOT + + + 4.0.0 + jetty-alpn-java-client + Jetty :: ALPN :: JDK9 Client Implementation + + + ${project.groupId}.alpn.java.client + + + + + + maven-compiler-plugin + + 1.9 + 1.9 + + + + + + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + + + + org.eclipse.jetty.http2 + http2-client + ${project.version} + test + + + + + diff --git a/jetty-alpn/jetty-alpn-java-client/src/main/java/org/eclipse/jetty/alpn/java/client/JDK9ClientALPNProcessor.java b/jetty-alpn/jetty-alpn-java-client/src/main/java/org/eclipse/jetty/alpn/java/client/JDK9ClientALPNProcessor.java new file mode 100644 index 00000000000..fff7072b959 --- /dev/null +++ b/jetty-alpn/jetty-alpn-java-client/src/main/java/org/eclipse/jetty/alpn/java/client/JDK9ClientALPNProcessor.java @@ -0,0 +1,54 @@ +// +// ======================================================================== +// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.alpn.java.client; + +import java.io.UncheckedIOException; +import java.util.List; + +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLException; +import javax.net.ssl.SSLParameters; + +import org.eclipse.jetty.alpn.ALPN; +import org.eclipse.jetty.io.ssl.ALPNProcessor; + +public class JDK9ClientALPNProcessor implements ALPNProcessor.Client +{ + @Override + public void configure(SSLEngine sslEngine, List protocols) + { + SSLParameters sslParameters = sslEngine.getSSLParameters(); + sslParameters.setApplicationProtocols(protocols.toArray(new String[0])); + sslEngine.setSSLParameters(sslParameters); + } + + @Override + public void process(SSLEngine sslEngine) + { + try + { + ALPN.ClientProvider provider = (ALPN.ClientProvider)ALPN.get(sslEngine); + provider.selected(sslEngine.getApplicationProtocol()); + } + catch (SSLException x) + { + throw new UncheckedIOException(x); + } + } +} diff --git a/jetty-alpn/jetty-alpn-java-client/src/main/resources/META-INF/services/org.eclipse.jetty.io.ssl.ALPNProcessor$Client b/jetty-alpn/jetty-alpn-java-client/src/main/resources/META-INF/services/org.eclipse.jetty.io.ssl.ALPNProcessor$Client new file mode 100644 index 00000000000..29d8e8b29be --- /dev/null +++ b/jetty-alpn/jetty-alpn-java-client/src/main/resources/META-INF/services/org.eclipse.jetty.io.ssl.ALPNProcessor$Client @@ -0,0 +1 @@ +org.eclipse.jetty.alpn.java.client.JDK9ClientALPNProcessor diff --git a/jetty-alpn/jetty-alpn-java-client/src/test/java/org/eclipse/jetty/alpn/java/client/JDK9HTTP2Client.java b/jetty-alpn/jetty-alpn-java-client/src/test/java/org/eclipse/jetty/alpn/java/client/JDK9HTTP2Client.java new file mode 100644 index 00000000000..d8a85871bc8 --- /dev/null +++ b/jetty-alpn/jetty-alpn-java-client/src/test/java/org/eclipse/jetty/alpn/java/client/JDK9HTTP2Client.java @@ -0,0 +1,85 @@ +// +// ======================================================================== +// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.alpn.java.client; + +import java.net.InetSocketAddress; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +import org.eclipse.jetty.http.HttpFields; +import org.eclipse.jetty.http.HttpURI; +import org.eclipse.jetty.http.HttpVersion; +import org.eclipse.jetty.http.MetaData; +import org.eclipse.jetty.http2.api.Session; +import org.eclipse.jetty.http2.api.Stream; +import org.eclipse.jetty.http2.client.HTTP2Client; +import org.eclipse.jetty.http2.frames.DataFrame; +import org.eclipse.jetty.http2.frames.HeadersFrame; +import org.eclipse.jetty.util.Callback; +import org.eclipse.jetty.util.FuturePromise; +import org.eclipse.jetty.util.Jetty; +import org.eclipse.jetty.util.Promise; +import org.eclipse.jetty.util.ssl.SslContextFactory; + +public class JDK9HTTP2Client +{ + public static void main(String[] args) throws Exception + { + HTTP2Client client = new HTTP2Client(); + SslContextFactory sslContextFactory = new SslContextFactory(true); + client.addBean(sslContextFactory); + client.start(); + + String host = "localhost"; + int port = 8443; + + FuturePromise sessionPromise = new FuturePromise<>(); + client.connect(sslContextFactory, new InetSocketAddress(host, port), new Session.Listener.Adapter(), sessionPromise); + Session session = sessionPromise.get(555, TimeUnit.SECONDS); + + HttpFields requestFields = new HttpFields(); + requestFields.put("User-Agent", client.getClass().getName() + "/" + Jetty.VERSION); + MetaData.Request metaData = new MetaData.Request("GET", new HttpURI("https://" + host + ":" + port + "/"), HttpVersion.HTTP_2, requestFields); + HeadersFrame headersFrame = new HeadersFrame(metaData, null, true); + CountDownLatch latch = new CountDownLatch(1); + session.newStream(headersFrame, new Promise.Adapter<>(), new Stream.Listener.Adapter() + { + @Override + public void onHeaders(Stream stream, HeadersFrame frame) + { + System.err.println(frame); + if (frame.isEndStream()) + latch.countDown(); + } + + @Override + public void onData(Stream stream, DataFrame frame, Callback callback) + { + System.err.println(frame); + callback.succeeded(); + if (frame.isEndStream()) + latch.countDown(); + } + }); + + latch.await(5, TimeUnit.SECONDS); + + client.stop(); + } +} diff --git a/jetty-alpn/jetty-alpn-java-client/src/test/resources/jetty-logging.properties b/jetty-alpn/jetty-alpn-java-client/src/test/resources/jetty-logging.properties new file mode 100644 index 00000000000..d96a696f82e --- /dev/null +++ b/jetty-alpn/jetty-alpn-java-client/src/test/resources/jetty-logging.properties @@ -0,0 +1,2 @@ +org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog +#org.eclipse.jetty.LEVEL=DEBUG diff --git a/jetty-alpn/jetty-alpn-java-server/pom.xml b/jetty-alpn/jetty-alpn-java-server/pom.xml new file mode 100644 index 00000000000..bf4ea34c133 --- /dev/null +++ b/jetty-alpn/jetty-alpn-java-server/pom.xml @@ -0,0 +1,73 @@ + + + + org.eclipse.jetty + jetty-alpn-parent + 9.3.16-SNAPSHOT + + + 4.0.0 + jetty-alpn-java-server + Jetty :: ALPN :: JDK9 Server Implementation + + + ${project.groupId}.alpn.java.server + + + + + + maven-compiler-plugin + + 1.9 + 1.9 + + + + + + + + org.eclipse.jetty + jetty-io + ${project.version} + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + + + + org.eclipse.jetty + jetty-server + ${project.version} + test + + + org.eclipse.jetty.http2 + http2-server + ${project.version} + test + + + org.eclipse.jetty + jetty-alpn-server + ${project.version} + test + + + junit + junit + test + + + org.hamcrest + hamcrest-library + test + + + + diff --git a/jetty-alpn/jetty-alpn-java-server/src/main/java/org/eclipse/jetty/alpn/java/server/JDK9ServerALPNProcessor.java b/jetty-alpn/jetty-alpn-java-server/src/main/java/org/eclipse/jetty/alpn/java/server/JDK9ServerALPNProcessor.java new file mode 100644 index 00000000000..4788d3d229c --- /dev/null +++ b/jetty-alpn/jetty-alpn-java-server/src/main/java/org/eclipse/jetty/alpn/java/server/JDK9ServerALPNProcessor.java @@ -0,0 +1,49 @@ +// +// ======================================================================== +// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.alpn.java.server; + +import java.util.List; + +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLException; + +import org.eclipse.jetty.alpn.ALPN; +import org.eclipse.jetty.io.ssl.ALPNProcessor; + +public class JDK9ServerALPNProcessor implements ALPNProcessor.Server +{ + @Override + public void configure(SSLEngine sslEngine) + { + sslEngine.setHandshakeApplicationProtocolSelector(this::process); + } + + private String process(SSLEngine sslEngine, List protocols) + { + try + { + ALPN.ServerProvider provider = (ALPN.ServerProvider)ALPN.get(sslEngine); + return provider.select(protocols); + } + catch (SSLException x) + { + return null; + } + } +} diff --git a/jetty-alpn/jetty-alpn-java-server/src/main/resources/META-INF/services/org.eclipse.jetty.io.ssl.ALPNProcessor$Server b/jetty-alpn/jetty-alpn-java-server/src/main/resources/META-INF/services/org.eclipse.jetty.io.ssl.ALPNProcessor$Server new file mode 100644 index 00000000000..51e198cb82c --- /dev/null +++ b/jetty-alpn/jetty-alpn-java-server/src/main/resources/META-INF/services/org.eclipse.jetty.io.ssl.ALPNProcessor$Server @@ -0,0 +1 @@ +org.eclipse.jetty.alpn.java.server.JDK9ServerALPNProcessor diff --git a/jetty-alpn/jetty-alpn-java-server/src/test/java/org/eclipse/jetty/alpn/java/server/JDK9HTTP2Server.java b/jetty-alpn/jetty-alpn-java-server/src/test/java/org/eclipse/jetty/alpn/java/server/JDK9HTTP2Server.java new file mode 100644 index 00000000000..524785d2c5c --- /dev/null +++ b/jetty-alpn/jetty-alpn-java-server/src/test/java/org/eclipse/jetty/alpn/java/server/JDK9HTTP2Server.java @@ -0,0 +1,66 @@ +// +// ======================================================================== +// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.alpn.java.server; + +import org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory; +import org.eclipse.jetty.http2.HTTP2Cipher; +import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory; +import org.eclipse.jetty.server.HttpConfiguration; +import org.eclipse.jetty.server.HttpConnectionFactory; +import org.eclipse.jetty.server.SecureRequestCustomizer; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.ServerConnector; +import org.eclipse.jetty.server.SslConnectionFactory; +import org.eclipse.jetty.util.ssl.SslContextFactory; + +/** + * Test server that verifies that the JDK 9 ALPN mechanism works. + */ +public class JDK9HTTP2Server +{ + public static void main(String... args) throws Exception + { + Server server = new Server(); + + HttpConfiguration httpsConfig = new HttpConfiguration(); + httpsConfig.setSecureScheme("https"); + httpsConfig.setSecurePort(8443); + httpsConfig.setSendXPoweredBy(true); + httpsConfig.setSendServerVersion(true); + httpsConfig.addCustomizer(new SecureRequestCustomizer()); + + SslContextFactory sslContextFactory = new SslContextFactory(); + sslContextFactory.setKeyStorePath("src/test/resources/keystore.jks"); + sslContextFactory.setKeyStorePassword("OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4"); + sslContextFactory.setKeyManagerPassword("OBF:1u2u1wml1z7s1z7a1wnl1u2g"); + sslContextFactory.setCipherComparator(HTTP2Cipher.COMPARATOR); + + HttpConnectionFactory http = new HttpConnectionFactory(httpsConfig); + HTTP2ServerConnectionFactory h2 = new HTTP2ServerConnectionFactory(httpsConfig); + ALPNServerConnectionFactory alpn = new ALPNServerConnectionFactory(); + alpn.setDefaultProtocol(http.getProtocol()); + SslConnectionFactory ssl = new SslConnectionFactory(sslContextFactory, alpn.getProtocol()); + + ServerConnector http2Connector = new ServerConnector(server, ssl, alpn, h2, http); + http2Connector.setPort(8443); + server.addConnector(http2Connector); + + server.start(); + } +} diff --git a/jetty-alpn/jetty-alpn-java-server/src/test/resources/jetty-logging.properties b/jetty-alpn/jetty-alpn-java-server/src/test/resources/jetty-logging.properties new file mode 100644 index 00000000000..d96a696f82e --- /dev/null +++ b/jetty-alpn/jetty-alpn-java-server/src/test/resources/jetty-logging.properties @@ -0,0 +1,2 @@ +org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog +#org.eclipse.jetty.LEVEL=DEBUG diff --git a/jetty-alpn/jetty-alpn-java-server/src/test/resources/keystore.jks b/jetty-alpn/jetty-alpn-java-server/src/test/resources/keystore.jks new file mode 100644 index 0000000000000000000000000000000000000000..d6592f95ee93575d659f28e1c2ebb81191484986 GIT binary patch literal 3697 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 literal 0 HcmV?d00001 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 new file mode 100644 index 00000000000..f03851eca2b --- /dev/null +++ b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-8.mod @@ -0,0 +1,26 @@ +# ALPN is provided via a -Xbootclasspath that modifies the secure connections +# in java to support the ALPN layer needed for HTTP/2. +# +# 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). +# +# The alpn 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 alpn-boot can be found at +# http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/ + +[depend] +alpn-impl/alpn-${java.version} + +[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. +http://github.com/jetty-project/jetty-alpn +http://openjdk.java.net/legal/gplv2+ce.html diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-9.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-9.mod new file mode 100644 index 00000000000..731b744e8fe --- /dev/null +++ b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn-impl/alpn-9.mod @@ -0,0 +1,5 @@ +# Provides support for ALPN based on JDK 9. + +[lib] +lib/jetty-alpn-java-server-${jetty.version}.jar +lib/alpn-api-*.jar diff --git a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn.mod b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn.mod index 7928e649280..cb3f0837612 100644 --- a/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn.mod +++ b/jetty-alpn/jetty-alpn-server/src/main/config/modules/alpn.mod @@ -1,27 +1,6 @@ -# ALPN is provided via a -Xbootclasspath that modifies the secure connections -# in java to support the ALPN layer needed for HTTP/2. -# -# 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). -# -# The alpn 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 alpn-boot can be found at -# http://central.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/ - -[name] -alpn - [depend] ssl -alpn-impl/alpn-${java.version} +alpn-impl/alpn-${java.version.platform} [lib] lib/jetty-alpn-client-${jetty.version}.jar @@ -38,16 +17,10 @@ lib/alpn/ ## Overrides the order protocols are chosen by the server. ## The default order is that specified by the order of the ## modules declared in start.ini. -# jetty.alpn.protocols=h2-16,http/1.1 +# jetty.alpn.protocols=h2,http/1.1 ## Specifies what protocol to use when negotiation fails. # jetty.alpn.defaultProtocol=http/1.1 ## ALPN debug logging on System.err # jetty.alpn.debug=false - -[license] -ALPN is a hosted at github under the GPL v2 with ClassPath Exception. -ALPN replaces/modifies OpenJDK classes in the java.sun.security.ssl package. -http://github.com/jetty-project/jetty-alpn -http://openjdk.java.net/legal/gplv2+ce.html diff --git a/jetty-alpn/jetty-alpn-server/src/main/java/org/eclipse/jetty/alpn/server/ALPNServerConnectionFactory.java b/jetty-alpn/jetty-alpn-server/src/main/java/org/eclipse/jetty/alpn/server/ALPNServerConnectionFactory.java index 3608b45727c..057c41c16e1 100644 --- a/jetty-alpn/jetty-alpn-server/src/main/java/org/eclipse/jetty/alpn/server/ALPNServerConnectionFactory.java +++ b/jetty-alpn/jetty-alpn-server/src/main/java/org/eclipse/jetty/alpn/server/ALPNServerConnectionFactory.java @@ -18,22 +18,22 @@ package org.eclipse.jetty.alpn.server; +import java.util.Iterator; import java.util.List; +import java.util.ServiceLoader; import javax.net.ssl.SSLEngine; -import org.eclipse.jetty.alpn.ALPN; import org.eclipse.jetty.io.AbstractConnection; import org.eclipse.jetty.io.EndPoint; +import org.eclipse.jetty.io.ssl.ALPNProcessor; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.NegotiatingServerConnectionFactory; import org.eclipse.jetty.util.annotation.Name; -import org.eclipse.jetty.util.log.Log; -import org.eclipse.jetty.util.log.Logger; public class ALPNServerConnectionFactory extends NegotiatingServerConnectionFactory { - private static final Logger LOG = Log.getLogger(ALPNServerConnectionFactory.class); + private final ALPNProcessor.Server alpnProcessor; public ALPNServerConnectionFactory(String protocols) { @@ -43,25 +43,20 @@ public class ALPNServerConnectionFactory extends NegotiatingServerConnectionFact public ALPNServerConnectionFactory(@Name("protocols") String... protocols) { super("alpn", protocols); - try - { - ClassLoader alpnClassLoader = ALPN.class.getClassLoader(); - if (alpnClassLoader != null) - { - LOG.warn("ALPN must be in the boot classloader, not in: " + alpnClassLoader); - throw new IllegalStateException("ALPN must be in the boot classloader"); - } - } - catch (Throwable x) - { - LOG.warn("ALPN not available", x); - throw new IllegalStateException("ALPN not available", x); - } + checkProtocolNegotiationAvailable(); + Iterator processors = ServiceLoader.load(ALPNProcessor.Server.class).iterator(); + alpnProcessor = processors.hasNext() ? processors.next() : ALPNProcessor.Server.NOOP; + } + + public ALPNProcessor.Server getALPNProcessor() + { + return alpnProcessor; } @Override protected AbstractConnection newServerConnection(Connector connector, EndPoint endPoint, SSLEngine engine, List protocols, String defaultProtocol) { + getALPNProcessor().configure(engine); return new ALPNServerConnection(connector, endPoint, engine, protocols, defaultProtocol); } } diff --git a/jetty-alpn/pom.xml b/jetty-alpn/pom.xml index 9789c330012..4074f313d46 100644 --- a/jetty-alpn/pom.xml +++ b/jetty-alpn/pom.xml @@ -1,4 +1,6 @@ - + org.eclipse.jetty jetty-project @@ -12,4 +14,16 @@ jetty-alpn-server jetty-alpn-client + + + jdk9 + + [1.9,) + + + jetty-alpn-java-client + jetty-alpn-java-server + + + diff --git a/jetty-cdi/test-cdi-webapp/pom.xml b/jetty-cdi/test-cdi-webapp/pom.xml index f0a9379ca65..99b43d11ea0 100644 --- a/jetty-cdi/test-cdi-webapp/pom.xml +++ b/jetty-cdi/test-cdi-webapp/pom.xml @@ -69,7 +69,6 @@ org.apache.maven.plugins maven-assembly-plugin - 2.5.3 with-weld diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml index 8ee6dc5e4ae..7653919c131 100644 --- a/jetty-distribution/pom.xml +++ b/jetty-distribution/pom.xml @@ -1,18 +1,21 @@ - - 4.0.0 + org.eclipse.jetty jetty-project 9.3.16-SNAPSHOT + 4.0.0 jetty-distribution Jetty :: Distribution Assemblies - http://www.eclipse.org/jetty pom + ${basedir}/target/distribution 1.0.3 + @@ -54,7 +57,7 @@ - removeKeystore + removeKeystore process-resources run @@ -633,6 +636,7 @@ + @@ -841,4 +845,21 @@ zip + + + + jdk9 + + [1.9,) + + + + org.eclipse.jetty + jetty-alpn-java-server + ${project.version} + + + + + diff --git a/jetty-fcgi/fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/proxy/DrupalHTTP2FastCGIProxyServer.java b/jetty-fcgi/fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/proxy/DrupalHTTP2FastCGIProxyServer.java index 7dad0ee7662..ac0e181d574 100644 --- a/jetty-fcgi/fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/proxy/DrupalHTTP2FastCGIProxyServer.java +++ b/jetty-fcgi/fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/proxy/DrupalHTTP2FastCGIProxyServer.java @@ -23,7 +23,6 @@ import org.eclipse.jetty.http2.HTTP2Cipher; import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory; import org.eclipse.jetty.server.HttpConfiguration; import org.eclipse.jetty.server.HttpConnectionFactory; -import org.eclipse.jetty.server.NegotiatingServerConnectionFactory; import org.eclipse.jetty.server.SecureRequestCustomizer; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; @@ -54,7 +53,6 @@ public class DrupalHTTP2FastCGIProxyServer // HTTP2 factory HTTP2ServerConnectionFactory h2 = new HTTP2ServerConnectionFactory(https_config); - NegotiatingServerConnectionFactory.checkProtocolNegotiationAvailable(); ALPNServerConnectionFactory alpn = new ALPNServerConnectionFactory(); alpn.setDefaultProtocol(h2.getProtocol()); diff --git a/jetty-fcgi/fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/proxy/WordPressHTTP2FastCGIProxyServer.java b/jetty-fcgi/fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/proxy/WordPressHTTP2FastCGIProxyServer.java index b8c14dd0293..f2bb1705de4 100644 --- a/jetty-fcgi/fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/proxy/WordPressHTTP2FastCGIProxyServer.java +++ b/jetty-fcgi/fcgi-server/src/test/java/org/eclipse/jetty/fcgi/server/proxy/WordPressHTTP2FastCGIProxyServer.java @@ -27,7 +27,6 @@ import org.eclipse.jetty.http2.HTTP2Cipher; import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory; import org.eclipse.jetty.server.HttpConfiguration; import org.eclipse.jetty.server.HttpConnectionFactory; -import org.eclipse.jetty.server.NegotiatingServerConnectionFactory; import org.eclipse.jetty.server.SecureRequestCustomizer; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; @@ -61,7 +60,6 @@ public class WordPressHTTP2FastCGIProxyServer // HTTP2 factory HTTP2ServerConnectionFactory h2 = new HTTP2ServerConnectionFactory(https_config); - NegotiatingServerConnectionFactory.checkProtocolNegotiationAvailable(); ALPNServerConnectionFactory alpn = new ALPNServerConnectionFactory(); alpn.setDefaultProtocol(h2.getProtocol()); diff --git a/jetty-http2/http2-alpn-tests/pom.xml b/jetty-http2/http2-alpn-tests/pom.xml index af7b0e9036b..2c11e6007d9 100644 --- a/jetty-http2/http2-alpn-tests/pom.xml +++ b/jetty-http2/http2-alpn-tests/pom.xml @@ -14,48 +14,71 @@ ${project.groupId}.alpn.tests - - - - maven-dependency-plugin - - - copy - generate-resources - - copy - + + + jdk8 + + [1.8,1.9) + + + + + maven-dependency-plugin + + + copy + generate-resources + + copy + + + + + org.mortbay.jetty.alpn + alpn-boot + ${alpn.version} + jar + false + ${project.build.directory}/alpn + + + + + + + + maven-surefire-plugin - - - org.mortbay.jetty.alpn - alpn-boot - ${alpn.version} - jar - false - ${project.build.directory}/alpn - - + -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar - - - - - maven-surefire-plugin - - -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar - - - - + + + + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + provided + + + + + jdk9 + + [1.9,) + + + + org.eclipse.jetty.alpn + alpn-api + ${alpn.api.version} + + + + - - org.eclipse.jetty.alpn - alpn-api - ${alpn.api.version} - provided - org.eclipse.jetty jetty-alpn-server diff --git a/jetty-http2/http2-http-client-transport/pom.xml b/jetty-http2/http2-http-client-transport/pom.xml index 9a476f6b644..5f13c29a894 100644 --- a/jetty-http2/http2-http-client-transport/pom.xml +++ b/jetty-http2/http2-http-client-transport/pom.xml @@ -14,40 +14,48 @@ ${project.groupId}.client.http - - - - maven-dependency-plugin - - - copy - generate-resources - - copy - + + + jdk8 + + [1.8,1.9) + + + + + maven-dependency-plugin + + + copy + generate-resources + + copy + + + + + org.mortbay.jetty.alpn + alpn-boot + ${alpn.version} + jar + false + ${project.build.directory}/alpn + + + + + + + + maven-surefire-plugin - - - org.mortbay.jetty.alpn - alpn-boot - ${alpn.version} - jar - false - ${project.build.directory}/alpn - - + -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar - - - - - maven-surefire-plugin - - -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar - - - - + + + + + diff --git a/jetty-infinispan/pom.xml b/jetty-infinispan/pom.xml index 4acbf13dd5e..757dc8a82c3 100644 --- a/jetty-infinispan/pom.xml +++ b/jetty-infinispan/pom.xml @@ -35,14 +35,6 @@ org.apache.maven.plugins maven-jar-plugin - - - artifact-jar - - jar - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/ALPNProcessor.java b/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/ALPNProcessor.java new file mode 100644 index 00000000000..b1559388b22 --- /dev/null +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/ALPNProcessor.java @@ -0,0 +1,52 @@ +// +// ======================================================================== +// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.io.ssl; + +import java.util.List; + +import javax.net.ssl.SSLEngine; + +public interface ALPNProcessor +{ + public interface Server + { + public static final ALPNProcessor.Server NOOP = new ALPNProcessor.Server() + { + }; + + public default void configure(SSLEngine sslEngine) + { + } + } + + public interface Client + { + public static final Client NOOP = new Client() + { + }; + + public default void configure(SSLEngine sslEngine, List protocols) + { + } + + public default void process(SSLEngine sslEngine) + { + } + } +} diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslClientConnectionFactory.java b/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslClientConnectionFactory.java index c49bc752a7c..53c90931b0a 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslClientConnectionFactory.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslClientConnectionFactory.java @@ -63,11 +63,11 @@ public class SslClientConnectionFactory implements ClientConnectionFactory SslConnection sslConnection = newSslConnection(byteBufferPool, executor, endPoint, engine); endPoint.setConnection(sslConnection); - customize(sslConnection, context); - EndPoint appEndPoint = sslConnection.getDecryptedEndPoint(); appEndPoint.setConnection(connectionFactory.newConnection(appEndPoint, context)); + customize(sslConnection, context); + return sslConnection; } diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java b/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java index 5ba743e9e2a..469d89f14f9 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java @@ -107,8 +107,7 @@ public class SslConnection extends AbstractConnection _decryptedEndPoint.getFillInterest().fillable(); } }; - - Callback _nonBlockingReadCallback = new Callback.NonBlocking() + private final Callback _nonBlockingReadCallback = new Callback.NonBlocking() { @Override public void succeeded() diff --git a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml index 59d9f138bde..69794120650 100644 --- a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml +++ b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml @@ -50,12 +50,6 @@ org.apache.maven.plugins maven-jar-plugin - - artifact-jar - - jar - - test-jar diff --git a/jetty-osgi/jetty-osgi-boot-warurl/pom.xml b/jetty-osgi/jetty-osgi-boot-warurl/pom.xml index 4a16be2b299..cc3eaf707a9 100644 --- a/jetty-osgi/jetty-osgi-boot-warurl/pom.xml +++ b/jetty-osgi/jetty-osgi-boot-warurl/pom.xml @@ -19,8 +19,8 @@ jetty-util - org.eclipse.osgi - org.eclipse.osgi + org.eclipse.osgi + org.eclipse.osgi @@ -30,12 +30,6 @@ org.apache.maven.plugins maven-jar-plugin - - artifact-jar - - jar - - test-jar diff --git a/jetty-osgi/jetty-osgi-boot/pom.xml b/jetty-osgi/jetty-osgi-boot/pom.xml index 763ca5703f3..d2330f44343 100644 --- a/jetty-osgi/jetty-osgi-boot/pom.xml +++ b/jetty-osgi/jetty-osgi-boot/pom.xml @@ -66,12 +66,6 @@ org.apache.maven.plugins maven-jar-plugin - - artifact-jar - - jar - - test-jar diff --git a/jetty-osgi/jetty-osgi-httpservice/pom.xml b/jetty-osgi/jetty-osgi-httpservice/pom.xml index 1cdfe59d7e1..405bf2f0064 100644 --- a/jetty-osgi/jetty-osgi-httpservice/pom.xml +++ b/jetty-osgi/jetty-osgi-httpservice/pom.xml @@ -60,12 +60,6 @@ org.apache.maven.plugins maven-jar-plugin - - artifact-jar - - jar - - test-jar diff --git a/jetty-osgi/pom.xml b/jetty-osgi/pom.xml index 0b3f7f3165e..b1b7ff5671b 100644 --- a/jetty-osgi/pom.xml +++ b/jetty-osgi/pom.xml @@ -1,15 +1,19 @@ - - 4.0.0 + org.eclipse.jetty jetty-project 9.3.16-SNAPSHOT + + 4.0.0 org.eclipse.jetty.osgi jetty-osgi-project Jetty :: OSGi http://www.eclipse.org/jetty pom + 3.6.0.v20100517 3.2.100.v20100503 @@ -18,6 +22,7 @@ 0.9.29 1.6.1 + jetty-osgi-boot jetty-osgi-boot-jsp @@ -27,8 +32,20 @@ test-jetty-osgi-context test-jetty-osgi-fragment jetty-osgi-alpn - test-jetty-osgi + + + + jdk9 + + [1.8,1.9) + + + test-jetty-osgi + + + + @@ -79,6 +96,7 @@ + @@ -180,4 +198,5 @@ + diff --git a/jetty-osgi/test-jetty-osgi-context/pom.xml b/jetty-osgi/test-jetty-osgi-context/pom.xml index f48bcc10274..1e73477cc51 100644 --- a/jetty-osgi/test-jetty-osgi-context/pom.xml +++ b/jetty-osgi/test-jetty-osgi-context/pom.xml @@ -19,18 +19,18 @@ ${project.version} - org.eclipse.osgi - org.eclipse.osgi - provided + org.eclipse.osgi + org.eclipse.osgi + provided - org.eclipse.osgi - org.eclipse.osgi.services - provided + org.eclipse.osgi + org.eclipse.osgi.services + provided - org.eclipse.jetty.toolchain - jetty-schemas + org.eclipse.jetty.toolchain + jetty-schemas @@ -57,12 +57,6 @@ org.apache.maven.plugins maven-jar-plugin - - artifact-jar - - jar - - test-jar diff --git a/jetty-osgi/test-jetty-osgi-fragment/pom.xml b/jetty-osgi/test-jetty-osgi-fragment/pom.xml index 9cff0fba8a9..286c22dd5fe 100644 --- a/jetty-osgi/test-jetty-osgi-fragment/pom.xml +++ b/jetty-osgi/test-jetty-osgi-fragment/pom.xml @@ -19,14 +19,14 @@ jetty-webapp - org.eclipse.osgi - org.eclipse.osgi - provided + org.eclipse.osgi + org.eclipse.osgi + provided - org.eclipse.osgi - org.eclipse.osgi.services - provided + org.eclipse.osgi + org.eclipse.osgi.services + provided @@ -50,12 +50,6 @@ org.apache.maven.plugins maven-jar-plugin - - artifact-jar - - jar - - test-jar diff --git a/jetty-osgi/test-jetty-osgi-webapp/pom.xml b/jetty-osgi/test-jetty-osgi-webapp/pom.xml index ae8b8626f67..244505cccf0 100644 --- a/jetty-osgi/test-jetty-osgi-webapp/pom.xml +++ b/jetty-osgi/test-jetty-osgi-webapp/pom.xml @@ -19,18 +19,18 @@ jetty-webapp - org.eclipse.osgi - org.eclipse.osgi - provided + org.eclipse.osgi + org.eclipse.osgi + provided - org.eclipse.osgi - org.eclipse.osgi.services - provided + org.eclipse.osgi + org.eclipse.osgi.services + provided - + src/main/resources @@ -45,19 +45,13 @@ true - + - org.apache.maven.plugins - maven-jar-plugin + org.apache.maven.plugins + maven-jar-plugin - artifact-jar - - jar - - - - test-jar + test-jar test-jar @@ -65,7 +59,7 @@ - target/classes/META-INF/MANIFEST.MF + target/classes/META-INF/MANIFEST.MF @@ -81,7 +75,7 @@ J2SE-1.5 + compilation time. --> org.osgi.framework, org.osgi.service.cm;version="1.2.0", diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/NegotiatingServerConnectionFactory.java b/jetty-server/src/main/java/org/eclipse/jetty/server/NegotiatingServerConnectionFactory.java index 4ccc243de0f..a816607d7ef 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/NegotiatingServerConnectionFactory.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/NegotiatingServerConnectionFactory.java @@ -19,7 +19,6 @@ package org.eclipse.jetty.server; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; import java.util.stream.Collectors; @@ -34,23 +33,25 @@ import org.eclipse.jetty.io.ssl.SslConnection; public abstract class NegotiatingServerConnectionFactory extends AbstractConnectionFactory { public static void checkProtocolNegotiationAvailable() - { - if (!isAvailableInBootClassPath("org.eclipse.jetty.alpn.ALPN")) - throw new IllegalStateException("No ALPN classes available"); - } - - private static boolean isAvailableInBootClassPath(String className) { try { - Class klass = ClassLoader.getSystemClassLoader().loadClass(className); - if (klass.getClassLoader() != null) - throw new IllegalStateException(className + " must be on JVM boot classpath"); - return true; + String javaVersion = System.getProperty("java.version"); + String alpnClassName = "org.eclipse.jetty.alpn.ALPN"; + if (javaVersion.startsWith("1.")) + { + Class klass = ClassLoader.getSystemClassLoader().loadClass(alpnClassName); + if (klass.getClassLoader() != null) + throw new IllegalStateException(alpnClassName + " must be on JVM boot classpath"); + } + else + { + NegotiatingServerConnectionFactory.class.getClassLoader().loadClass(alpnClassName); + } } catch (ClassNotFoundException x) { - return false; + throw new IllegalStateException("No ALPN classes available"); } } diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/JavaVersion.java b/jetty-start/src/main/java/org/eclipse/jetty/start/JavaVersion.java new file mode 100644 index 00000000000..784b3a2cc5b --- /dev/null +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/JavaVersion.java @@ -0,0 +1,153 @@ +// +// ======================================================================== +// Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.start; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class JavaVersion +{ + private static final Pattern PRE_JDK9 = Pattern.compile("1\\.(\\d)(\\.(\\d+)(_(\\d+))?)?(-.+)?"); + // Regexp from JEP 223 (http://openjdk.java.net/jeps/223). + private static final Pattern JDK9 = Pattern.compile("(\\d+)(\\.(\\d+))?(\\.(\\d+))?((-.+)?(\\+(\\d+)?(-.+)?)?)"); + + public static JavaVersion parse(String version) + { + if (version.startsWith("1.")) + return parsePreJDK9(version); + return parseJDK9(version); + } + + private static JavaVersion parsePreJDK9(String version) + { + Matcher matcher = PRE_JDK9.matcher(version); + if (!matcher.matches()) + throw new IllegalArgumentException("Invalid Java version " + version); + int major = 1; + int minor = Integer.parseInt(matcher.group(1)); + String microGroup = matcher.group(3); + int micro = microGroup == null || microGroup.isEmpty() ? 0 : Integer.parseInt(microGroup); + String updateGroup = matcher.group(5); + int update = updateGroup == null || updateGroup.isEmpty() ? 0 : Integer.parseInt(updateGroup); + String suffix = matcher.group(6); + return new JavaVersion(version, minor, major, minor, micro, update, suffix); + } + + private static JavaVersion parseJDK9(String version) + { + Matcher matcher = JDK9.matcher(version); + if (!matcher.matches()) + throw new IllegalArgumentException("Invalid Java version " + version); + int major = Integer.parseInt(matcher.group(1)); + String minorGroup = matcher.group(3); + int minor = minorGroup == null || minorGroup.isEmpty() ? 0 : Integer.parseInt(minorGroup); + String microGroup = matcher.group(5); + int micro = microGroup == null || microGroup.isEmpty() ? 0 : Integer.parseInt(microGroup); + String suffix = matcher.group(6); + return new JavaVersion(version, major, major, minor, micro, 0, suffix); + } + + private final String version; + private final int platform; + private final int major; + private final int minor; + private final int micro; + private final int update; + private final String suffix; + + private JavaVersion(String version, int platform, int major, int minor, int micro, int update, String suffix) + { + this.version = version; + this.platform = platform; + this.major = major; + this.minor = minor; + this.micro = micro; + this.update = update; + this.suffix = suffix; + } + + /** + * @return the string from which this JavaVersion was created + */ + public String getVersion() + { + return version; + } + + /** + *

Returns the Java Platform version, such as {@code 8} for JDK 1.8.0_92 and {@code 9} for JDK 9.2.4.

+ * + * @return the Java Platform version + */ + public int getPlatform() + { + return platform; + } + + /** + *

Returns the major number version, such as {@code 1} for JDK 1.8.0_92 and {@code 9} for JDK 9.2.4.

+ * + * @return the major number version + */ + public int getMajor() + { + return major; + } + + /** + *

Returns the minor number version, such as {@code 8} for JDK 1.8.0_92 and {@code 2} for JDK 9.2.4.

+ * + * @return the minor number version + */ + public int getMinor() + { + return minor; + } + + /** + *

Returns the micro number version, such as {@code 0} for JDK 1.8.0_92 and {@code 4} for JDK 9.2.4.

+ * + * @return the micro number version + */ + public int getMicro() + { + return micro; + } + + /** + *

Returns the update number version, such as {@code 92} for JDK 1.8.0_92 and {@code 0} for JDK 9.2.4.

+ * + * @return the update number version + */ + public int getUpdate() + { + return update; + } + + /** + *

Returns the remaining string after the version numbers, such as {@code -internal} for + * JDK 1.8.0_92-internal and {@code -ea} for JDK 9-ea, or {@code +13} for JDK 9.2.4+13.

+ * + * @return the remaining string after the version numbers + */ + public String getSuffix() + { + return suffix; + } +} diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java index 74578d2be36..3e4c89928a4 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java @@ -25,7 +25,6 @@ import java.io.OutputStream; import java.net.URL; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -1166,13 +1165,20 @@ public class StartArgs properties.setProperty(key,value,source); if(key.equals("java.version")) { - Version ver = new Version(value); - - properties.setProperty("java.version",ver.toShortString(),source); - properties.setProperty("java.version.major",Integer.toString(ver.getLegacyMajor()),source); - properties.setProperty("java.version.minor",Integer.toString(ver.getMajor()),source); - properties.setProperty("java.version.revision",Integer.toString(ver.getRevision()),source); - properties.setProperty("java.version.update",Integer.toString(ver.getUpdate()),source); + try + { + JavaVersion ver = JavaVersion.parse(value); + properties.setProperty("java.version",ver.getVersion(),source); + properties.setProperty("java.version.platform",Integer.toString(ver.getPlatform()),source); + properties.setProperty("java.version.major",Integer.toString(ver.getMajor()),source); + properties.setProperty("java.version.minor",Integer.toString(ver.getMinor()),source); + properties.setProperty("java.version.micro",Integer.toString(ver.getMicro()),source); + properties.setProperty("java.version.update",Integer.toString(ver.getUpdate()),source); + } + catch (Throwable x) + { + throw new UsageException(UsageException.ERR_BAD_ARG, x.getMessage()); + } } } } diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/TestBadUseCases.java b/jetty-start/src/test/java/org/eclipse/jetty/start/TestBadUseCases.java index c21f13681be..ec567885fc5 100644 --- a/jetty-start/src/test/java/org/eclipse/jetty/start/TestBadUseCases.java +++ b/jetty-start/src/test/java/org/eclipse/jetty/start/TestBadUseCases.java @@ -46,7 +46,7 @@ public class TestBadUseCases List ret = new ArrayList<>(); ret.add(new Object[]{ "http2", - "Missing referenced dependency: alpn-impl/alpn-0.0.0_0", + "Invalid Java version", new String[]{"java.version=0.0.0_0"}}); ret.add(new Object[]{ "versioned-modules-too-new", diff --git a/jetty-websocket/websocket-common/pom.xml b/jetty-websocket/websocket-common/pom.xml index 4a2e63b33a7..057450a1f78 100644 --- a/jetty-websocket/websocket-common/pom.xml +++ b/jetty-websocket/websocket-common/pom.xml @@ -71,7 +71,6 @@ artifact-jars - jar test-jar diff --git a/pom.xml b/pom.xml index 37393481503..eba667ce321 100644 --- a/pom.xml +++ b/pom.xml @@ -1,15 +1,19 @@ - - 4.0.0 + org.eclipse.jetty jetty-parent 25 + + 4.0.0 jetty-project 9.3.16-SNAPSHOT Jetty :: Project http://www.eclipse.org/jetty pom + http://www.eclipse.org/jetty UTF-8 @@ -21,12 +25,14 @@ undefined + scm:git:https://github.com/eclipse/jetty.project.git scm:git:git@github.com:eclipse/jetty.project.git https://github.com/eclipse/jetty.project jetty-9.3.13.M0 + install @@ -176,7 +182,7 @@ org.jacoco jacoco-maven-plugin - 0.7.7.201606060606 + 0.7.8 @@ -313,14 +319,26 @@ - + - org.eclipse.jetty.toolchain - jetty-version-maven-plugin - 2.4 + org.apache.maven.plugins + maven-assembly-plugin + 3.0.0 + + + org.eclipse.jetty.toolchain + jetty-assembly-descriptors + 1.0 + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.0.0 org.apache.maven.plugins @@ -333,6 +351,7 @@ org.apache.maven.plugins maven-jar-plugin + 3.0.2 @@ -343,80 +362,6 @@ - - org.apache.maven.plugins - maven-surefire-plugin - 2.18.1 - - @{argLine} -showversion -Xmx1g -Xms1g -XX:+PrintGCDetails - false - 1 - - - - java.io.tmpdir - ${project.build.directory} - - - - - - org.apache.felix - maven-bundle-plugin - true - - - jar - maven-plugin - - - ${bundle-symbolic-name} - Jetty module for ${project.name} - JavaSE-1.8 - ${jetty.url} - Eclipse Jetty Project - . - ${bundle-symbolic-name}.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" - Copyright (c) 2008-2016 Mort Bay Consulting Pty. Ltd. - javax.servlet*;version="[2.6.0,3.2)",javax.transaction*;version="[1.1,1.3)",org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",* - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - org.eclipse.jetty.toolchain - jetty-assembly-descriptors - 1.0 - - - - - org.apache.maven.plugins - maven-dependency-plugin - 2.10 - - - org.codehaus.mojo - findbugs-maven-plugin - - true - true - Max - org.eclipse.jetty.* - - - - org.apache.maven.plugins - maven-jxr-plugin - org.apache.maven.plugins maven-javadoc-plugin @@ -504,25 +449,87 @@ + + org.apache.maven.plugins + maven-jxr-plugin + 2.5 + org.apache.maven.plugins maven-pmd-plugin - 3.4 + 3.7 + + + org.apache.maven.plugins + maven-surefire-plugin + 2.19.1 + + @{argLine} -showversion -Xmx1g -Xms1g -XX:+PrintGCDetails + false + 1 + + + java.io.tmpdir + ${project.build.directory} + + + + + + org.apache.maven.plugins + maven-war-plugin + 3.0.0 + + + org.eclipse.jetty.toolchain + jetty-version-maven-plugin + 2.4 + + + org.apache.felix + maven-bundle-plugin + true + + + jar + maven-plugin + + + ${bundle-symbolic-name} + Jetty module for ${project.name} + JavaSE-1.8 + ${jetty.url} + Eclipse Jetty Project + . + ${bundle-symbolic-name}.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + Copyright (c) 2008-2016 Mort Bay Consulting Pty. Ltd. + javax.servlet*;version="[2.6.0,3.2)",javax.transaction*;version="[1.1,1.3)",org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",* + + + + + org.codehaus.mojo + findbugs-maven-plugin + + true + true + Max + org.eclipse.jetty.* + + org.apache.maven.plugins maven-jxr-plugin - 2.1 org.apache.maven.plugins maven-javadoc-plugin - 2.8 512m true @@ -533,7 +540,6 @@ org.apache.maven.plugins maven-pmd-plugin - 2.7.1 1.7 @@ -544,10 +550,10 @@ org.codehaus.mojo findbugs-maven-plugin - 2.5.2 + jetty-ant jetty-util @@ -593,13 +599,11 @@ jetty-http-spi jetty-osgi jetty-alpn - jetty-documentation - - + + + @@ -653,12 +657,12 @@ 4.4.2 - - - org.apache.taglibs - taglibs-standard-impl - 1.2.5 - + + + org.apache.taglibs + taglibs-standard-impl + 1.2.5 + @@ -667,7 +671,6 @@ 1.2.5 - org.eclipse.jetty.orbit javax.activation @@ -688,7 +691,6 @@ provided - org.apache.maven @@ -910,6 +912,15 @@
+ + jdk8 + + [1.8,1.9) + + + jetty-documentation + + 8u00 diff --git a/tests/test-http-client-transport/pom.xml b/tests/test-http-client-transport/pom.xml index c5ca8c73a4e..1272b9ad734 100644 --- a/tests/test-http-client-transport/pom.xml +++ b/tests/test-http-client-transport/pom.xml @@ -15,48 +15,57 @@ ${project.groupId}.client.http - - - - maven-dependency-plugin - - - copy - generate-resources - - copy - + + + jdk8 + + [1.8,1.9) + + + + + maven-dependency-plugin + + + copy + generate-resources + + copy + + + + + org.mortbay.jetty.alpn + alpn-boot + ${alpn.version} + jar + false + ${project.build.directory}/alpn + + + + + + + + maven-surefire-plugin - - - org.mortbay.jetty.alpn - alpn-boot - ${alpn.version} - jar - false - ${project.build.directory}/alpn - - + -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar + - - - - - maven-surefire-plugin - - -Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar - - - - org.apache.maven.plugins - maven-deploy-plugin - - - true - - - - + + + org.apache.maven.plugins + maven-deploy-plugin + + + true + + + +
+ + diff --git a/tests/test-webapps/test-proxy-webapp/src/test/java/org/eclipse/jetty/TestTransparentProxyServer.java b/tests/test-webapps/test-proxy-webapp/src/test/java/org/eclipse/jetty/TestTransparentProxyServer.java index 22d2dbebc6a..528a6f39339 100644 --- a/tests/test-webapps/test-proxy-webapp/src/test/java/org/eclipse/jetty/TestTransparentProxyServer.java +++ b/tests/test-webapps/test-proxy-webapp/src/test/java/org/eclipse/jetty/TestTransparentProxyServer.java @@ -28,7 +28,6 @@ import org.eclipse.jetty.server.ForwardedRequestCustomizer; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.HttpConfiguration; import org.eclipse.jetty.server.HttpConnectionFactory; -import org.eclipse.jetty.server.NegotiatingServerConnectionFactory; import org.eclipse.jetty.server.SecureRequestCustomizer; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; @@ -106,7 +105,6 @@ public class TestTransparentProxyServer // HTTP2 factory HTTP2ServerConnectionFactory h2 = new HTTP2ServerConnectionFactory(https_config); - NegotiatingServerConnectionFactory.checkProtocolNegotiationAvailable(); ALPNServerConnectionFactory alpn = new ALPNServerConnectionFactory(); alpn.setDefaultProtocol(h2.getProtocol()); diff --git a/tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml b/tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml index bea730b5223..d1baac3b439 100644 --- a/tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml +++ b/tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml @@ -22,14 +22,6 @@ org.apache.maven.plugins maven-jar-plugin - - - artifact-jar - - jar - - - target/classes/META-INF/MANIFEST.MF