From 9ca71f2d8e9546ffe56611612d33451f80813264 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 7 Feb 2014 10:49:22 +0100 Subject: [PATCH] Adding ability to start spdy server/client using maven. --- example/pom.xml | 225 ++++++++++++++++++ .../netty/example/spdy/client/SpdyClient.java | 4 + .../example/spdy/client/package-info.java | 7 + .../netty/example/spdy/server/SpdyServer.java | 5 + .../example/spdy/server/package-info.java | 5 + 5 files changed, 246 insertions(+) diff --git a/example/pom.xml b/example/pom.xml index 8d5c7373a2..d0b20d3596 100644 --- a/example/pom.xml +++ b/example/pom.xml @@ -90,5 +90,230 @@ ${project.version} + + + + + 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 + 1.2.1 + + ${java.home}/bin/java + + -Xbootclasspath/p:${project.build.directory}/npn/npn-boot-${npn.version}.jar + -classpath + + io.netty.example.spdy.server.SpdyServer + + compile + + + io.netty.leakDetectionLevel + disabled + + + + + + + + + spdy-client + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + ${java.home}/bin/java + + -Xbootclasspath/p:${project.build.directory}/npn/npn-boot-${npn.version}.jar + -classpath + + io.netty.example.spdy.client.SpdyClient + + compile + + + io.netty.leakDetectionLevel + disabled + + + + + + + + + + + 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 + + + + 7u40 + + + java.version + 1.7.0_40 + + + + 1.1.6.v20130911 + + + + 7u45 + + + java.version + 1.7.0_45 + + + + 1.1.6.v20130911 + + + + 7u51 + + + java.version + 1.7.0_51 + + + + 1.1.6.v20130911 + + + diff --git a/example/src/main/java/io/netty/example/spdy/client/SpdyClient.java b/example/src/main/java/io/netty/example/spdy/client/SpdyClient.java index 812ea50343..e334cd4673 100644 --- a/example/src/main/java/io/netty/example/spdy/client/SpdyClient.java +++ b/example/src/main/java/io/netty/example/spdy/client/SpdyClient.java @@ -41,6 +41,10 @@ import static java.util.concurrent.TimeUnit.*; * coordinates org.mortbay.jetty.npn:npn-boot. Different versions applies to different OpenJDK versions. See * Jetty docs for more information. *

+ * You may also use maven to start the client from the command line: + *

+ *     mvn exec:exec -Pspdy-client
+ * 
*/ public class SpdyClient { diff --git a/example/src/main/java/io/netty/example/spdy/client/package-info.java b/example/src/main/java/io/netty/example/spdy/client/package-info.java index d2984da255..c9e8d44fec 100644 --- a/example/src/main/java/io/netty/example/spdy/client/package-info.java +++ b/example/src/main/java/io/netty/example/spdy/client/package-info.java @@ -32,5 +32,12 @@ *

* After that, you can run {@link io.netty.example.spdy.client.SpdyClient}, also settings the JVM parameter * mentioned above. + *

+ * You may also use maven to start the server and the client from the command line: + *

+ *     mvn exec:exec -Pspdy-server
+ * 
+ * Then start the client in a different terminal window: + * mvn exec:exec -Pspdy-client */ package io.netty.example.spdy.client; 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 45bab88c0c..abf1be2bb5 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 @@ -31,6 +31,11 @@ import io.netty.channel.socket.nio.NioServerSocketChannel; * See Jetty docs for more * information. *

+ * You may also use maven to start the server from the command line: + *

+ *     mvn exec:exec -Pspdy-server
+ * 
+ *

* Once started, you can test the server with your * SPDY enabled web browser by navigating * to https://localhost:8443/ diff --git a/example/src/main/java/io/netty/example/spdy/server/package-info.java b/example/src/main/java/io/netty/example/spdy/server/package-info.java index a5ba39dd74..ece1e7c9c7 100644 --- a/example/src/main/java/io/netty/example/spdy/server/package-info.java +++ b/example/src/main/java/io/netty/example/spdy/server/package-info.java @@ -28,6 +28,11 @@ * See Jetty docs for more * information. *

+ * You may also use maven to start the server from the command line: + *

+ *     mvn exec:exec -Pspdy-server
+ * 
+ *

* Once started, you can test the server with your * SPDY enabled web browser by navigating * to https://localhost:8443/