diff --git a/example/pom.xml b/example/pom.xml index 2a9380d1ec..5048bab2a1 100644 --- a/example/pom.xml +++ b/example/pom.xml @@ -29,9 +29,6 @@ Netty/Example - - 1.1.6.v20130911 - ${project.groupId} @@ -67,6 +64,10 @@ netty-tcnative ${os.detected.classifier} + + org.eclipse.jetty.npn + npn-api + com.jcraft jzlib @@ -77,10 +78,6 @@ javassist runtime - - org.eclipse.jetty.npn - npn-api - @@ -99,179 +96,39 @@ - - - - maven-dependency-plugin - - - copy - generate-resources - - copy - - - - - org.mortbay.jetty.npn - npn-boot - ${npn.version} - jar - false - ${project.build.directory}/npn - - - - - - - - - spdy-server - - - - org.codehaus.mojo - exec-maven-plugin - - ${java.home}/bin/java - - -Xbootclasspath/p:${project.build.directory}/npn/npn-boot-${npn.version}.jar - -classpath - - io.netty.example.spdy.server.SpdyServer - - runtime - - - - + + io.netty.example.spdy.server.SpdyServer + spdy-client - - - - org.codehaus.mojo - exec-maven-plugin - - ${java.home}/bin/java - - -Xbootclasspath/p:${project.build.directory}/npn/npn-boot-${npn.version}.jar - -classpath - - io.netty.example.spdy.client.SpdyClient - - runtime - - - - - - - - - 7u9 - - - java.version - 1.7.0_9 - - - 1.1.3.v20130313 - - - - 7u10 - - - java.version - 1.7.0_10 - - - - 1.1.3.v20130313 - - - - 7u11 - - - java.version - 1.7.0_11 - - - - 1.1.3.v20130313 - - - - 7u13 - - - java.version - 1.7.0_13 - - - - 1.1.4.v20130313 - - - - 7u15 - - - java.version - 1.7.0_15 - - - - 1.1.5.v20130313 - - - - 7u17 - - - java.version - 1.7.0_17 - - - - 1.1.5.v20130313 - - - - 7u21 - - - java.version - 1.7.0_21 - - - - 1.1.5.v20130313 - - - - 7u25 - - - java.version - 1.7.0_25 - - - - 1.1.5.v20130313 + io.netty.example.spdy.client.SpdyClient + + + + + org.codehaus.mojo + exec-maven-plugin + + ${java.home}/bin/java + + ${argLine.common} + ${argLine.leak} + ${argLine.coverage} + -classpath %classpath + ${exampleClass} + + runtime + + + + diff --git a/example/src/main/java/io/netty/example/spdy/server/SpdyServer.java b/example/src/main/java/io/netty/example/spdy/server/SpdyServer.java index bab9d2ab39..04ab1080ea 100644 --- a/example/src/main/java/io/netty/example/spdy/server/SpdyServer.java +++ b/example/src/main/java/io/netty/example/spdy/server/SpdyServer.java @@ -22,6 +22,7 @@ import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.handler.ssl.SslContext; +import io.netty.handler.ssl.SslProvider; import io.netty.handler.ssl.util.SelfSignedCertificate; /** @@ -84,7 +85,7 @@ public class SpdyServer { // Configure SSL. SelfSignedCertificate ssc = new SelfSignedCertificate(); - SslContext sslCtx = SslContext.newServerContext(ssc.certificate(), ssc.privateKey()); + SslContext sslCtx = SslContext.newServerContext(SslProvider.JDK, ssc.certificate(), ssc.privateKey()); new SpdyServer(sslCtx, port).run(); } } diff --git a/example/src/main/java/io/netty/example/spdy/server/SpdyServerInitializer.java b/example/src/main/java/io/netty/example/spdy/server/SpdyServerInitializer.java index 9c5ee4ccdb..9f3779a3cd 100644 --- a/example/src/main/java/io/netty/example/spdy/server/SpdyServerInitializer.java +++ b/example/src/main/java/io/netty/example/spdy/server/SpdyServerInitializer.java @@ -41,7 +41,7 @@ public class SpdyServerInitializer extends ChannelInitializer { SslHandler sslHandler = sslCtx.newHandler(ch.alloc()); SSLEngine engine = sslHandler.engine(); - p.addLast("ssl", new SslHandler(engine)); + p.addLast("ssl", sslHandler); // Setup NextProtoNego with our server provider NextProtoNego.put(engine, new SpdyServerProvider()); diff --git a/pom.xml b/pom.xml index 69d9358a56..4d4859c871 100644 --- a/pom.xml +++ b/pom.xml @@ -71,24 +71,13 @@ leak - - -server - -dsa -da -ea:io.netty... - -XX:+AggressiveOpts - -XX:+TieredCompilation - -XX:+UseBiasedLocking - -XX:+UseFastAccessorMethods - -XX:+OptimizeStringConcat - -XX:+HeapDumpOnOutOfMemoryError - -Dio.netty.leakDetectionLevel=3 - -verbose:gc - + -Dio.netty.leakDetectionLevel=paranoid coverage - ${jacoco.argLine} + ${jacoco.argLine} @@ -179,15 +168,154 @@ + + + + npn-7u9 + + + java.version + 1.7.0_9 + + + + 1.1.3.v20130313 + + + + npn-7u10 + + + java.version + 1.7.0_10 + + + + 1.1.3.v20130313 + + + + npn-7u11 + + + java.version + 1.7.0_11 + + + + 1.1.3.v20130313 + + + + npn-7u13 + + + java.version + 1.7.0_13 + + + + 1.1.4.v20130313 + + + + npn-7u15 + + + java.version + 1.7.0_15 + + + + 1.1.5.v20130313 + + + + npn-7u17 + + + java.version + 1.7.0_17 + + + + 1.1.5.v20130313 + + + + npn-7u21 + + + java.version + 1.7.0_21 + + + + 1.1.5.v20130313 + + + + npn-7u25 + + + java.version + 1.7.0_25 + + + + 1.1.5.v20130313 + + + + npn-7u40 + + + java.version + 1.7.0_40 + + + + 1.1.6.v20130911 + + + + npn-7u45 + + + java.version + 1.7.0_45 + + + + 1.1.6.v20130911 + + + + npn-7u51 + + + java.version + 1.7.0_51 + + + + 1.1.6.v20130911 + + UTF-8 UTF-8 1.3.18.GA - - - -server + 1.1.7.v20140316 + ${settings.localRepository}/org/mortbay/jetty/npn/npn-boot/${jetty.npn.version}/npn-boot-${jetty.npn.version}.jar + + -Xbootclasspath/p:${jetty.npn.path} + -server -dsa -da -ea:io.netty... -XX:+AggressiveOpts -XX:+TieredCompilation @@ -196,7 +324,9 @@ -XX:+OptimizeStringConcat -XX:+HeapDumpOnOutOfMemoryError -verbose:gc - + + -D_ + -D_ @@ -237,12 +367,17 @@ true - + org.eclipse.jetty.npn npn-api 1.1.0.v20120525 + + org.mortbay.jetty.npn + npn-boot + ${jetty.npn.version} + @@ -566,6 +701,24 @@ + + + maven-dependency-plugin + + + get-npn-boot + validate + + get + + + org.mortbay.jetty.npn + npn-boot + ${jetty.npn.version} + + + + maven-surefire-plugin @@ -578,7 +731,7 @@ **/TestUtil* random - ${test.jvm.argLine.coverage} ${test.jvm.argLine} + ${argLine.common} ${argLine.leak} ${argLine.coverage} @@ -906,7 +1059,7 @@ org.codehaus.mojo exec-maven-plugin - 1.2.1 + 1.3 org.fusesource.hawtjni diff --git a/run-example.sh b/run-example.sh new file mode 100755 index 0000000000..9bf40f64cb --- /dev/null +++ b/run-example.sh @@ -0,0 +1,15 @@ +#!/bin/bash -e +cd "`dirname "$0"`"/example +if [[ $# -ne 1 ]]; then + echo "Usage: $0 " >&2 + echo >&2 + echo "Available examples:" >&2 + grep -E '^ [-a-z0-9]*' pom.xml | sed -e 's#\(^.*\|.*$\)##g' | sed -e 's#^# #' >&2 + exit 1 +fi + +EXAMPLE_NAME="$1" + +echo "[INFO] Running: $EXAMPLE_NAME" +mvn -X -P "$EXAMPLE_NAME" compile exec:exec +