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 <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2020-03-03 15:16:20 +01:00
parent 32c9981529
commit 9bb92f81bd
97 changed files with 305 additions and 1208 deletions

View File

@ -171,7 +171,7 @@
<profile> <profile>
<id>jdk9</id> <id>jdk9</id>
<activation> <activation>
<jdk>[1.9,)</jdk> <jdk>[9,)</jdk>
</activation> </activation>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -20,8 +20,8 @@
<plugin> <plugin>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>1.9</source> <source>9</source>
<target>1.9</target> <target>9</target>
<release>9</release> <release>9</release>
</configuration> </configuration>
</plugin> </plugin>

View File

@ -19,8 +19,8 @@
<plugin> <plugin>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>1.9</source> <source>9</source>
<target>1.9</target> <target>9</target>
<release>9</release> <release>9</release>
</configuration> </configuration>
</plugin> </plugin>
@ -46,11 +46,6 @@
<artifactId>jetty-io</artifactId> <artifactId>jetty-io</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.alpn</groupId>
<artifactId>alpn-api</artifactId>
<version>${alpn.api.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-server</artifactId> <artifactId>jetty-alpn-server</artifactId>

View File

@ -25,6 +25,7 @@
<groupId>org.eclipse.jetty.alpn</groupId> <groupId>org.eclipse.jetty.alpn</groupId>
<artifactId>alpn-api</artifactId> <artifactId>alpn-api</artifactId>
<version>${alpn.api.version}</version> <version>${alpn.api.version}</version>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.http2</groupId> <groupId>org.eclipse.jetty.http2</groupId>

View File

@ -18,13 +18,20 @@
package org.eclipse.jetty.alpn.openjdk8.client; package org.eclipse.jetty.alpn.openjdk8.client;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List; import java.util.List;
import javax.net.ssl.SSLEngine; 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.ALPN;
import org.eclipse.jetty.alpn.client.ALPNClientConnection; import org.eclipse.jetty.alpn.client.ALPNClientConnection;
import org.eclipse.jetty.io.Connection; import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.ssl.ALPNProcessor; 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.JavaVersion;
import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger; 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 static final Logger LOG = Log.getLogger(OpenJDK8ClientALPNProcessor.class);
private Method alpnProtocols;
private Method alpnProtocol;
@Override @Override
public void init() public void init()
{ {
if (JavaVersion.VERSION.getPlatform() != 8) if (JavaVersion.VERSION.getPlatform() != 8)
throw new IllegalStateException(this + " not applicable for java " + JavaVersion.VERSION); 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) if (ALPN.class.getClassLoader() != null)
throw new IllegalStateException(ALPN.class.getName() + " must be on JVM boot classpath"); throw new IllegalStateException(ALPN.class.getName() + " must be on JVM boot classpath");
if (LOG.isDebugEnabled()) if (LOG.isDebugEnabled())
@ -53,14 +77,34 @@ public class OpenJDK8ClientALPNProcessor implements ALPNProcessor.Client
@Override @Override
public void configure(SSLEngine sslEngine, Connection connection) 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 final ALPNClientConnection alpnConnection;
private ALPNListener(ALPNClientConnection connection) private ALPNConnectionListener(ALPNClientConnection connection)
{ {
alpnConnection = connection; alpnConnection = connection;
} }
@ -102,4 +146,32 @@ public class OpenJDK8ClientALPNProcessor implements ALPNProcessor.Client
alpnConnection.selected(protocol); 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);
}
}
}
} }

View File

@ -18,15 +18,19 @@
package org.eclipse.jetty.alpn.openjdk8.server; package org.eclipse.jetty.alpn.openjdk8.server;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.function.BiFunction;
import javax.net.ssl.SSLEngine; import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLException;
import org.eclipse.jetty.alpn.ALPN; import org.eclipse.jetty.alpn.ALPN;
import org.eclipse.jetty.alpn.server.ALPNServerConnection; import org.eclipse.jetty.alpn.server.ALPNServerConnection;
import org.eclipse.jetty.io.Connection; import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.ssl.ALPNProcessor; 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.JavaVersion;
import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger; 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 static final Logger LOG = Log.getLogger(OpenJDK8ServerALPNProcessor.class);
private Method alpnSelector;
@Override @Override
public void init() public void init()
{ {
if (JavaVersion.VERSION.getPlatform() != 8) if (JavaVersion.VERSION.getPlatform() != 8)
throw new IllegalStateException(this + " not applicable for java " + JavaVersion.VERSION); 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) if (ALPN.class.getClassLoader() != null)
throw new IllegalStateException(ALPN.class.getName() + " must be on JVM boot classpath"); throw new IllegalStateException(ALPN.class.getName() + " must be on JVM boot classpath");
if (LOG.isDebugEnabled()) if (LOG.isDebugEnabled())
@ -55,10 +74,26 @@ public class OpenJDK8ServerALPNProcessor implements ALPNProcessor.Server
@Override @Override
public void configure(SSLEngine sslEngine, Connection connection) 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; private final ALPNServerConnection alpnConnection;
@ -92,7 +127,7 @@ public class OpenJDK8ServerALPNProcessor implements ALPNProcessor.Server
} }
@Override @Override
public String select(List<String> protocols) throws SSLException public String select(List<String> protocols)
{ {
if (LOG.isDebugEnabled()) if (LOG.isDebugEnabled())
LOG.debug("select {} {}", alpnConnection, protocols); LOG.debug("select {} {}", alpnConnection, protocols);
@ -100,4 +135,50 @@ public class OpenJDK8ServerALPNProcessor implements ALPNProcessor.Server
return alpnConnection.getProtocol(); return alpnConnection.getProtocol();
} }
} }
private static class ALPNCallback implements BiFunction<SSLEngine, List<String>, 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<String> 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);
}
}
} }

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,33 +1,22 @@
DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[description] [description]
Provides ALPN support for JDK 8, modifying the sun.security.ssl Provides ALPN support for JDK 8, using the Jetty ALPN Agent.
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
[files] [files]
lib/ lib/
lib/alpn/ 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] [license]
ALPN is a hosted at github under the GPL v2 with ClassPath Exception. The ALPN implementation for Java 8u242 and earlier replaces/modifies OpenJDK classes
ALPN replaces/modifies OpenJDK classes in the sun.security.ssl package. 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://github.com/jetty-project/jetty-alpn
http://openjdk.java.net/legal/gplv2+ce.html http://openjdk.java.net/legal/gplv2+ce.html
[exec]
-javaagent:lib/alpn/jetty-alpn-agent-2.0.10.jar

View File

@ -21,7 +21,7 @@
<profile> <profile>
<id>jdk9</id> <id>jdk9</id>
<activation> <activation>
<jdk>[1.9,)</jdk> <jdk>[9,)</jdk>
</activation> </activation>
<modules> <modules>
<module>jetty-alpn-java-client</module> <module>jetty-alpn-java-client</module>

View File

@ -774,7 +774,7 @@
<profile> <profile>
<id>jdk9</id> <id>jdk9</id>
<activation> <activation>
<jdk>[1.9,)</jdk> <jdk>[9,)</jdk>
</activation> </activation>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -78,7 +78,7 @@
<profile> <profile>
<id>jdk9</id> <id>jdk9</id>
<activation> <activation>
<jdk>[1.9,)</jdk> <jdk>[9,)</jdk>
</activation> </activation>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -20,7 +20,7 @@
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<id>copy</id> <id>copy-alpn-agent</id>
<phase>generate-resources</phase> <phase>generate-resources</phase>
<goals> <goals>
<goal>copy</goal> <goal>copy</goal>
@ -29,8 +29,8 @@
<artifactItems> <artifactItems>
<artifactItem> <artifactItem>
<groupId>org.mortbay.jetty.alpn</groupId> <groupId>org.mortbay.jetty.alpn</groupId>
<artifactId>alpn-boot</artifactId> <artifactId>jetty-alpn-agent</artifactId>
<version>${alpn.version}</version> <version>${alpn.agent.version}</version>
<type>jar</type> <type>jar</type>
<overWrite>false</overWrite> <overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/alpn</outputDirectory> <outputDirectory>${project.build.directory}/alpn</outputDirectory>
@ -43,7 +43,7 @@
<plugin> <plugin>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<argLine>-Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar</argLine> <argLine>-javaagent:${project.build.directory}/alpn/jetty-alpn-agent-${alpn.agent.version}.jar=debug=true</argLine>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
@ -54,12 +54,6 @@
<groupId>org.eclipse.jetty.alpn</groupId> <groupId>org.eclipse.jetty.alpn</groupId>
<artifactId>alpn-api</artifactId> <artifactId>alpn-api</artifactId>
<version>${alpn.api.version}</version> <version>${alpn.api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-openjdk8-server</artifactId>
<version>${project.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -68,6 +62,18 @@
<version>${project.version}</version> <version>${project.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-server</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-openjdk8-server</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.http2</groupId> <groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-server</artifactId> <artifactId>http2-server</artifactId>
@ -81,21 +87,4 @@
</dependency> </dependency>
</dependencies> </dependencies>
<profiles>
<profile>
<id>jdk9</id>
<activation>
<jdk>[1.9,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-java-server</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project> </project>

View File

@ -18,7 +18,7 @@
<profile> <profile>
<id>jdk8</id> <id>jdk8</id>
<activation> <activation>
<jdk>[1.8,1.9)</jdk> <jdk>[1.8,9)</jdk>
</activation> </activation>
<build> <build>
<plugins> <plugins>
@ -26,7 +26,7 @@
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<id>copy</id> <id>copy-alpn-agent</id>
<phase>generate-resources</phase> <phase>generate-resources</phase>
<goals> <goals>
<goal>copy</goal> <goal>copy</goal>
@ -35,8 +35,8 @@
<artifactItems> <artifactItems>
<artifactItem> <artifactItem>
<groupId>org.mortbay.jetty.alpn</groupId> <groupId>org.mortbay.jetty.alpn</groupId>
<artifactId>alpn-boot</artifactId> <artifactId>jetty-alpn-agent</artifactId>
<version>${alpn.version}</version> <version>${alpn.agent.version}</version>
<type>jar</type> <type>jar</type>
<overWrite>false</overWrite> <overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/alpn</outputDirectory> <outputDirectory>${project.build.directory}/alpn</outputDirectory>
@ -49,16 +49,29 @@
<plugin> <plugin>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<argLine>-Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar</argLine> <argLine>-javaagent:${project.build.directory}/alpn/jetty-alpn-agent-${alpn.agent.version}.jar=debug=true</argLine>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.alpn</groupId>
<artifactId>alpn-api</artifactId>
<version>${alpn.api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-openjdk8-client</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile> </profile>
<profile> <profile>
<id>jdk9</id> <id>jdk9</id>
<activation> <activation>
<jdk>[1.9,)</jdk> <jdk>[9,)</jdk>
</activation> </activation>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -24,9 +24,10 @@
<profile> <profile>
<id>jdk8</id> <id>jdk8</id>
<activation> <activation>
<jdk>[1.8,1.9)</jdk> <jdk>[1.8,9)</jdk>
</activation> </activation>
<modules> <modules>
<!-- These tests can only be run in Java 8 -->
<module>http2-alpn-tests</module> <module>http2-alpn-tests</module>
</modules> </modules>
</profile> </profile>

View File

@ -129,7 +129,7 @@
<profile> <profile>
<id>jdk9+</id> <id>jdk9+</id>
<activation> <activation>
<jdk>[1.9,)</jdk> <jdk>[9,)</jdk>
</activation> </activation>
<build> <build>
<pluginManagement> <pluginManagement>

View File

@ -17,7 +17,6 @@
<exam.version>4.13.1</exam.version> <exam.version>4.13.1</exam.version>
<url.version>2.6.1</url.version> <url.version>2.6.1</url.version>
<injection.bundle.version>1.0</injection.bundle.version> <injection.bundle.version>1.0</injection.bundle.version>
<skipTests>true</skipTests>
</properties> </properties>
<dependencies> <dependencies>
<!-- Pax Exam Dependencies --> <!-- Pax Exam Dependencies -->
@ -446,7 +445,6 @@
<plugin> <plugin>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<skipTests>${skipTests}</skipTests>
<systemPropertyVariables> <systemPropertyVariables>
<mavenRepoPath>${settings.localRepository}</mavenRepoPath> <mavenRepoPath>${settings.localRepository}</mavenRepoPath>
<settingsFilePath>${env.GLOBAL_MVN_SETTINGS}</settingsFilePath> <settingsFilePath>${env.GLOBAL_MVN_SETTINGS}</settingsFilePath>
@ -541,20 +539,17 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<properties>
<skipTests>false</skipTests>
</properties>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<!-- No point defining -javaagent as the actual OSGi VM is run as a forked process by pax-exam -->
<!-- But we do pass the sys property of the jetty-alpn-agent jar so that it can be configured inside tests -->
<argLine>-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}</argLine>
<excludes> <excludes>
<exclude>**/TestJettyOSGiBootHTTP2JDK9*</exclude> <exclude>**/TestJettyOSGiBootHTTP2JDK9*</exclude>
</excludes> </excludes>
<!-- No point defining -Xbootclasspath as the actual OSGi VM is run as a forked process by pax-exam -->
<!-- But we do pass the sys property of the alpn-boot jar so that it can be configured inside tests -->
<argLine>-Dmortbay-alpn-boot=${settings.localRepository}/org/mortbay/jetty/alpn/alpn-boot/${alpn.version}/alpn-boot-${alpn.version}.jar -Dconscrypt-version=${conscrypt.version}</argLine>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
@ -591,15 +586,11 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<properties>
<skipTests>false</skipTests>
</properties>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<skipTests>${skipTests}</skipTests>
<excludes> <excludes>
<exclude>**/TestJettyOSGiBootHTTP2</exclude> <exclude>**/TestJettyOSGiBootHTTP2</exclude>
</excludes> </excludes>

View File

@ -47,7 +47,6 @@ import org.osgi.framework.ServiceReference;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle; import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.systemProperty; import static org.ops4j.pax.exam.CoreOptions.systemProperty;
@ -93,18 +92,13 @@ public class TestJettyOSGiBootHTTP2
List<Option> res = new ArrayList<>(); List<Option> res = new ArrayList<>();
res.add(CoreOptions.systemProperty("jetty.alpn.protocols").value("h2,http/1.1")); res.add(CoreOptions.systemProperty("jetty.alpn.protocols").value("h2,http/1.1"));
String alpnBoot = System.getProperty("mortbay-alpn-boot"); String alpnAgent = System.getProperty("mortbay-alpn-agent");
if (alpnBoot == null) if (alpnAgent == null)
{ throw new IllegalStateException("Define path to alpn agent jar as system property -Dmortbay-alpn-agent");
throw new IllegalStateException("Define path to alpn boot jar as system property -Dmortbay-alpn-boot"); File alpnAgentFile = new File(alpnAgent);
} if (!alpnAgentFile.exists())
File checkALPNBoot = new File(alpnBoot); throw new IllegalStateException("Unable to find the alpn agent jar here: " + alpnAgent);
if (!checkALPNBoot.exists()) res.add(CoreOptions.vmOptions("-javaagent:" + alpnAgentFile.getAbsolutePath() + "=debug=true"));
{
throw new IllegalStateException("Unable to find the alpn boot jar here: " + alpnBoot);
}
res.add(CoreOptions.vmOptions("-Xbootclasspath/p:" + checkALPNBoot.getAbsolutePath()));
res.add(mavenBundle().groupId("org.eclipse.jetty.osgi").artifactId("jetty-osgi-alpn").versionAsInProject().noStart()); res.add(mavenBundle().groupId("org.eclipse.jetty.osgi").artifactId("jetty-osgi-alpn").versionAsInProject().noStart());
res.add(mavenBundle().groupId("org.eclipse.jetty").artifactId("jetty-alpn-openjdk8-server").versionAsInProject().start()); res.add(mavenBundle().groupId("org.eclipse.jetty").artifactId("jetty-alpn-openjdk8-server").versionAsInProject().start());
@ -116,20 +110,13 @@ public class TestJettyOSGiBootHTTP2
return res; return res;
} }
public void checkALPNBootOnBootstrapClasspath() throws Exception
{
Class<?> alpn = Thread.currentThread().getContextClassLoader().loadClass("org.eclipse.jetty.alpn.ALPN");
assertNotNull(alpn);
assertNull(alpn.getClassLoader());
}
public void assertAllBundlesActiveOrResolved() public void assertAllBundlesActiveOrResolved()
{ {
TestOSGiUtil.debugBundles(bundleContext); TestOSGiUtil.debugBundles(bundleContext);
TestOSGiUtil.assertAllBundlesActiveOrResolved(bundleContext); TestOSGiUtil.assertAllBundlesActiveOrResolved(bundleContext);
Bundle openjdk8 = TestOSGiUtil.getBundle(bundleContext, "org.eclipse.jetty.alpn.openjdk8.server"); Bundle openjdk8 = TestOSGiUtil.getBundle(bundleContext, "org.eclipse.jetty.alpn.openjdk8.server");
assertNotNull(openjdk8); assertNotNull(openjdk8);
ServiceReference[] services = openjdk8.getRegisteredServices(); ServiceReference<?>[] services = openjdk8.getRegisteredServices();
assertNotNull(services); assertNotNull(services);
Bundle server = TestOSGiUtil.getBundle(bundleContext, "org.eclipse.jetty.alpn.server"); Bundle server = TestOSGiUtil.getBundle(bundleContext, "org.eclipse.jetty.alpn.server");
assertNotNull(server); assertNotNull(server);
@ -139,10 +126,7 @@ public class TestJettyOSGiBootHTTP2
public void testHTTP2() throws Exception public void testHTTP2() throws Exception
{ {
if (Boolean.getBoolean(TestOSGiUtil.BUNDLE_DEBUG)) if (Boolean.getBoolean(TestOSGiUtil.BUNDLE_DEBUG))
{
checkALPNBootOnBootstrapClasspath();
assertAllBundlesActiveOrResolved(); assertAllBundlesActiveOrResolved();
}
HttpClient httpClient = null; HttpClient httpClient = null;
HTTP2Client http2Client = null; HTTP2Client http2Client = null;
@ -151,7 +135,7 @@ public class TestJettyOSGiBootHTTP2
//get the port chosen for https //get the port chosen for https
String tmp = System.getProperty("boot.https.port"); String tmp = System.getProperty("boot.https.port");
assertNotNull(tmp); assertNotNull(tmp);
int port = Integer.valueOf(tmp.trim()); int port = Integer.parseInt(tmp.trim());
Path path = Paths.get("src", "test", "config"); Path path = Paths.get("src", "test", "config");
File keys = path.resolve("etc").resolve("keystore").toFile(); File keys = path.resolve("etc").resolve("keystore").toFile();

View File

@ -708,8 +708,16 @@ public class DetectorConnectionTest
sb.append("AAAA"); sb.append("AAAA");
} }
String request = sb.toString(); String request = sb.toString();
String response = getResponse(request);
assertThat(response, Matchers.nullValue()); try
{
String response = getResponse(request);
assertThat(response, Matchers.nullValue());
}
catch (SocketException expected)
{
// The test may fail writing the "request"
// bytes as the server sends back a TCP RST.
}
} }
} }

View File

@ -487,17 +487,19 @@ public class Modules implements Iterable<Module>
_modules.stream().filter(Module::isEnabled).forEach(m -> _modules.stream().filter(Module::isEnabled).forEach(m ->
{ {
// Check dependencies // Check dependencies
m.getDepends().forEach(d -> m.getDepends().stream()
{ .filter(Module::isRequiredDependency)
Set<Module> providers = getAvailableProviders(d); .forEach(d ->
if (providers.stream().filter(Module::isEnabled).count() == 0)
{ {
if (unsatisfied.length() > 0) Set<Module> providers = getAvailableProviders(d);
unsatisfied.append(','); if (providers.stream().noneMatch(Module::isEnabled))
unsatisfied.append(m.getName()); {
StartLog.error("Module %s requires a module providing %s from one of %s%n", m.getName(), d, providers); if (unsatisfied.length() > 0)
} unsatisfied.append(',');
}); unsatisfied.append(m.getName());
StartLog.error("Module %s requires a module providing %s from one of %s%n", m.getName(), d, providers);
}
});
}); });
if (unsatisfied.length() > 0) if (unsatisfied.length() > 0)

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,5 +0,0 @@
[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

View File

@ -1,5 +0,0 @@
[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

View File

@ -79,7 +79,7 @@
<profile> <profile>
<id>jdk9</id> <id>jdk9</id>
<activation> <activation>
<jdk>[1.9,)</jdk> <jdk>[9,)</jdk>
</activation> </activation>
<build> <build>
<plugins> <plugins>

561
pom.xml
View File

@ -26,8 +26,7 @@
<alpn.api.version>1.1.3.v20160715</alpn.api.version> <alpn.api.version>1.1.3.v20160715</alpn.api.version>
<jsp.version>8.5.49</jsp.version> <jsp.version>8.5.49</jsp.version>
<infinispan.version>9.4.8.Final</infinispan.version> <infinispan.version>9.4.8.Final</infinispan.version>
<!-- default values are unsupported, but required to be defined for reactor sanity reasons --> <alpn.agent.version>2.0.10</alpn.agent.version>
<alpn.version>undefined</alpn.version>
<conscrypt.version>2.1.0</conscrypt.version> <conscrypt.version>2.1.0</conscrypt.version>
<asm.version>7.2</asm.version> <asm.version>7.2</asm.version>
<jmh.version>1.21</jmh.version> <jmh.version>1.21</jmh.version>
@ -666,7 +665,7 @@
<configuration> <configuration>
<rerunFailingTestsCount>${surefire.rerunFailingTestsCount}</rerunFailingTestsCount> <rerunFailingTestsCount>${surefire.rerunFailingTestsCount}</rerunFailingTestsCount>
<forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds> <forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds>
<argLine>@{argLine} -Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US -showversion -Xmx1g -Xms1g -XX:+PrintGCDetails</argLine> <argLine>@{argLine} -Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US -showversion -Xmx4g -Xms4g -XX:+PrintGCDetails</argLine>
<failIfNoTests>false</failIfNoTests> <failIfNoTests>false</failIfNoTests>
<forkCount>1</forkCount> <forkCount>1</forkCount>
<reuseForks>true</reuseForks> <!-- to work around crash at https://github.com/junit-team/junit5/issues/801 --> <reuseForks>true</reuseForks> <!-- to work around crash at https://github.com/junit-team/junit5/issues/801 -->
@ -1223,7 +1222,7 @@
<profile> <profile>
<id>jdk8</id> <id>jdk8</id>
<activation> <activation>
<jdk>[1.8,1.9)</jdk> <jdk>[1.8,9)</jdk>
</activation> </activation>
<build> <build>
<pluginManagement> <pluginManagement>
@ -1495,562 +1494,10 @@
</plugins> </plugins>
</build> </build>
</profile> </profile>
<profile>
<id>8u00</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0</value>
</property>
</activation>
<properties>
<alpn.version>8.1.0.v20141016</alpn.version>
</properties>
</profile>
<profile>
<id>8u05</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_05</value>
</property>
</activation>
<properties>
<alpn.version>8.1.0.v20141016</alpn.version>
</properties>
</profile>
<profile>
<id>8u11</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_11</value>
</property>
</activation>
<properties>
<alpn.version>8.1.0.v20141016</alpn.version>
</properties>
</profile>
<profile>
<id>8u20</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_20</value>
</property>
</activation>
<properties>
<alpn.version>8.1.0.v20141016</alpn.version>
</properties>
</profile>
<profile>
<id>8u25</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_25</value>
</property>
</activation>
<properties>
<alpn.version>8.1.2.v20141202</alpn.version>
</properties>
</profile>
<profile>
<id>8u31</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_31</value>
</property>
</activation>
<properties>
<alpn.version>8.1.3.v20150130</alpn.version>
</properties>
</profile>
<profile>
<id>8u40</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_40</value>
</property>
</activation>
<properties>
<alpn.version>8.1.3.v20150130</alpn.version>
</properties>
</profile>
<profile>
<id>8u45</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_45</value>
</property>
</activation>
<properties>
<alpn.version>8.1.3.v20150130</alpn.version>
</properties>
</profile>
<profile>
<id>8u51</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_51</value>
</property>
</activation>
<properties>
<alpn.version>8.1.4.v20150727</alpn.version>
</properties>
</profile>
<profile>
<id>8u60</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_60</value>
</property>
</activation>
<properties>
<alpn.version>8.1.5.v20150921</alpn.version>
</properties>
</profile>
<profile>
<id>8u65</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_65</value>
</property>
</activation>
<properties>
<alpn.version>8.1.6.v20151105</alpn.version>
</properties>
</profile>
<profile>
<id>8u66</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_66</value>
</property>
</activation>
<properties>
<alpn.version>8.1.6.v20151105</alpn.version>
</properties>
</profile>
<profile>
<id>8u71</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_71</value>
</property>
</activation>
<properties>
<alpn.version>8.1.7.v20160121</alpn.version>
</properties>
</profile>
<profile>
<id>8u72</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_72</value>
</property>
</activation>
<properties>
<alpn.version>8.1.7.v20160121</alpn.version>
</properties>
</profile>
<profile>
<id>8u73</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_73</value>
</property>
</activation>
<properties>
<alpn.version>8.1.7.v20160121</alpn.version>
</properties>
</profile>
<profile>
<id>8u74</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_74</value>
</property>
</activation>
<properties>
<alpn.version>8.1.7.v20160121</alpn.version>
</properties>
</profile>
<profile>
<id>8u77</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_77</value>
</property>
</activation>
<properties>
<alpn.version>8.1.7.v20160121</alpn.version>
</properties>
</profile>
<profile>
<id>8u91</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_91</value>
</property>
</activation>
<properties>
<alpn.version>8.1.7.v20160121</alpn.version>
</properties>
</profile>
<profile>
<id>8u92</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_92</value>
</property>
</activation>
<properties>
<alpn.version>8.1.8.v20160420</alpn.version>
</properties>
</profile>
<profile>
<id>8u101</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_101</value>
</property>
</activation>
<properties>
<alpn.version>8.1.9.v20160720</alpn.version>
</properties>
</profile>
<profile>
<id>8u102</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_102</value>
</property>
</activation>
<properties>
<alpn.version>8.1.9.v20160720</alpn.version>
</properties>
</profile>
<profile>
<id>8u111</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_111</value>
</property>
</activation>
<properties>
<alpn.version>8.1.9.v20160720</alpn.version>
</properties>
</profile>
<profile>
<id>8u112</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_112</value>
</property>
</activation>
<properties>
<alpn.version>8.1.10.v20161026</alpn.version>
</properties>
</profile>
<profile>
<id>8u121</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_121</value>
</property>
</activation>
<properties>
<alpn.version>8.1.11.v20170118</alpn.version>
</properties>
</profile>
<profile>
<id>8u131</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_131</value>
</property>
</activation>
<properties>
<alpn.version>8.1.11.v20170118</alpn.version>
</properties>
</profile>
<profile>
<id>8u141</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_141</value>
</property>
</activation>
<properties>
<alpn.version>8.1.11.v20170118</alpn.version>
</properties>
</profile>
<profile>
<id>8u144</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_144</value>
</property>
</activation>
<properties>
<alpn.version>8.1.11.v20170118</alpn.version>
</properties>
</profile>
<profile>
<id>8u151</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_151</value>
</property>
</activation>
<properties>
<alpn.version>8.1.11.v20170118</alpn.version>
</properties>
</profile>
<profile>
<id>8u152</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_152</value>
</property>
</activation>
<properties>
<alpn.version>8.1.11.v20170118</alpn.version>
</properties>
</profile>
<profile>
<id>8u161</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_161</value>
</property>
</activation>
<properties>
<alpn.version>8.1.12.v20180117</alpn.version>
</properties>
</profile>
<profile>
<id>8u162</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_162</value>
</property>
</activation>
<properties>
<alpn.version>8.1.12.v20180117</alpn.version>
</properties>
</profile>
<profile>
<id>8u171</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_171</value>
</property>
</activation>
<properties>
<alpn.version>8.1.12.v20180117</alpn.version>
</properties>
</profile>
<profile>
<id>8u172</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_172</value>
</property>
</activation>
<properties>
<alpn.version>8.1.12.v20180117</alpn.version>
</properties>
</profile>
<profile>
<id>8u181</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_181</value>
</property>
</activation>
<properties>
<alpn.version>8.1.12.v20180117</alpn.version>
</properties>
</profile>
<profile>
<id>8u191</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_191</value>
</property>
</activation>
<properties>
<alpn.version>8.1.13.v20181017</alpn.version>
</properties>
</profile>
<profile>
<id>8u192</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_192</value>
</property>
</activation>
<properties>
<alpn.version>8.1.13.v20181017</alpn.version>
</properties>
</profile>
<profile>
<id>8u201</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_201</value>
</property>
</activation>
<properties>
<alpn.version>8.1.13.v20181017</alpn.version>
</properties>
</profile>
<profile>
<id>8u202</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_202</value>
</property>
</activation>
<properties>
<alpn.version>8.1.13.v20181017</alpn.version>
</properties>
</profile>
<profile>
<id>8u211</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_211</value>
</property>
</activation>
<properties>
<alpn.version>8.1.13.v20181017</alpn.version>
</properties>
</profile>
<profile>
<id>8u212</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_212</value>
</property>
</activation>
<properties>
<alpn.version>8.1.13.v20181017</alpn.version>
</properties>
</profile>
<profile>
<id>8u221</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_221</value>
</property>
</activation>
<properties>
<alpn.version>8.1.13.v20181017</alpn.version>
</properties>
</profile>
<profile>
<id>8u222</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_222</value>
</property>
</activation>
<properties>
<alpn.version>8.1.13.v20181017</alpn.version>
</properties>
</profile>
<profile>
<id>8u231</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_231</value>
</property>
</activation>
<properties>
<alpn.version>8.1.13.v20181017</alpn.version>
</properties>
</profile>
<profile>
<id>8u232</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_232</value>
</property>
</activation>
<properties>
<alpn.version>8.1.13.v20181017</alpn.version>
</properties>
</profile>
<profile>
<id>8u241</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_241</value>
</property>
</activation>
<properties>
<alpn.version>8.1.13.v20181017</alpn.version>
</properties>
</profile>
<profile>
<id>8u242</id>
<activation>
<property>
<name>java.version</name>
<value>1.8.0_242</value>
</property>
</activation>
<properties>
<alpn.version>8.1.13.v20181017</alpn.version>
</properties>
</profile>
<profile> <profile>
<id>jdk9</id> <id>jdk9</id>
<activation> <activation>
<jdk>[1.9,)</jdk> <jdk>[9,)</jdk>
</activation> </activation>
<build> <build>
<plugins> <plugins>

View File

@ -20,8 +20,42 @@
<profile> <profile>
<id>jdk8</id> <id>jdk8</id>
<activation> <activation>
<jdk>[1.8,1.9)</jdk> <jdk>[1.8,9)</jdk>
</activation> </activation>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-alpn-agent</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.mortbay.jetty.alpn</groupId>
<artifactId>jetty-alpn-agent</artifactId>
<version>${alpn.agent.version}</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/alpn</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-javaagent:${project.build.directory}/alpn/jetty-alpn-agent-${alpn.agent.version}.jar=debug=true</argLine>
</configuration>
</plugin>
</plugins>
</build>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
@ -36,45 +70,11 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.mortbay.jetty.alpn</groupId>
<artifactId>alpn-boot</artifactId>
<version>${alpn.version}</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/alpn</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile> </profile>
<profile> <profile>
<id>jdk9</id> <id>jdk9</id>
<activation> <activation>
<jdk>[1.9,)</jdk> <jdk>[9,)</jdk>
</activation> </activation>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -60,7 +60,7 @@
<profile> <profile>
<id>jdk8</id> <id>jdk8</id>
<activation> <activation>
<jdk>[1.8,1.9)</jdk> <jdk>[1.8,9)</jdk>
</activation> </activation>
<build> <build>
<plugins> <plugins>
@ -68,7 +68,7 @@
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<id>copy-alpn-boot</id> <id>copy-alpn-agent</id>
<phase>pre-integration-test</phase> <phase>pre-integration-test</phase>
<goals> <goals>
<goal>copy</goal> <goal>copy</goal>
@ -77,8 +77,8 @@
<artifactItems> <artifactItems>
<artifactItem> <artifactItem>
<groupId>org.mortbay.jetty.alpn</groupId> <groupId>org.mortbay.jetty.alpn</groupId>
<artifactId>alpn-boot</artifactId> <artifactId>jetty-alpn-agent</artifactId>
<version>${alpn.version}</version> <version>${alpn.agent.version}</version>
<type>jar</type> <type>jar</type>
<overWrite>false</overWrite> <overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/alpn</outputDirectory> <outputDirectory>${project.build.directory}/alpn</outputDirectory>
@ -89,25 +89,24 @@
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId> <artifactId>maven-failsafe-plugin</artifactId>
<configuration> <configuration>
<argLine>-Xbootclasspath/p:${project.build.directory}/alpn/alpn-boot-${alpn.version}.jar</argLine> <argLine>-javaagent:${project.build.directory}/alpn/jetty-alpn-agent-${alpn.agent.version}.jar=debug=true</argLine>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>
<dependency>
<groupId>org.eclipse.jetty.alpn</groupId>
<artifactId>alpn-api</artifactId>
<version>${alpn.api.version}</version>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-openjdk8-client</artifactId> <artifactId>jetty-alpn-openjdk8-client</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty.alpn</groupId>
<artifactId>alpn-api</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
@ -120,7 +119,7 @@
<profile> <profile>
<id>jdk9</id> <id>jdk9</id>
<activation> <activation>
<jdk>[1.9,)</jdk> <jdk>[9,)</jdk>
</activation> </activation>
<dependencies> <dependencies>
<dependency> <dependency>