Updated HTTP2 modules to be included in the distribution.
This commit is contained in:
parent
e6e68c5557
commit
a6329451a1
|
@ -301,7 +301,7 @@
|
|||
</goals>
|
||||
<configuration>
|
||||
<includeGroupIds>org.eclipse.jetty</includeGroupIds>
|
||||
<excludeGroupIds>org.eclipse.jetty.orbit,org.eclipse.jetty.spdy,org.eclipse.jetty.websocket,org.eclipse.jetty.fcgi,org.eclipse.jetty.toolchain,org.apache.taglibs</excludeGroupIds>
|
||||
<excludeGroupIds>org.eclipse.jetty.orbit,org.eclipse.jetty.http2,org.eclipse.jetty.spdy,org.eclipse.jetty.websocket,org.eclipse.jetty.fcgi,org.eclipse.jetty.toolchain,org.apache.taglibs</excludeGroupIds>
|
||||
<excludeArtifactIds>jetty-all,jetty-jsp,apache-jsp,jetty-start,jetty-monitor,jetty-spring</excludeArtifactIds>
|
||||
<includeTypes>jar</includeTypes>
|
||||
<outputDirectory>${assembly-directory}/lib</outputDirectory>
|
||||
|
@ -320,6 +320,19 @@
|
|||
<outputDirectory>${assembly-directory}/lib/websocket</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-lib-http2-deps</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeGroupIds>org.eclipse.jetty.http2</includeGroupIds>
|
||||
<includeArtifactIds>http2-hpack,http2-common,http2-server</includeArtifactIds>
|
||||
<includeTypes>jar</includeTypes>
|
||||
<outputDirectory>${assembly-directory}/lib/http2</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-lib-fcgi-deps</id>
|
||||
<phase>generate-resources</phase>
|
||||
|
@ -805,6 +818,11 @@
|
|||
<artifactId>jetty-rewrite</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.http2</groupId>
|
||||
<artifactId>http2-server</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.spdy</groupId>
|
||||
<artifactId>spdy-core</artifactId>
|
||||
|
|
|
@ -14,6 +14,23 @@
|
|||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>config</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
|
||||
|
||||
<!-- ============================================================= -->
|
||||
<!-- Configure a HTTP2 connector. -->
|
||||
<!-- ============================================================= -->
|
||||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||
|
||||
<Call id="http2Connector" name="addConnector">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.server.ServerConnector">
|
||||
<Arg name="server">
|
||||
<Ref refid="Server"/>
|
||||
</Arg>
|
||||
<Arg name="factories">
|
||||
<Array type="org.eclipse.jetty.server.ConnectionFactory">
|
||||
|
||||
<!-- SSL Connection factory with 'protonego' as next protocol -->
|
||||
<Item>
|
||||
<New class="org.eclipse.jetty.server.SslConnectionFactory">
|
||||
<Arg name="next"><Property name="protonego"/></Arg>
|
||||
<Arg name="sslContextFactory">
|
||||
<Ref refid="sslContextFactory"/>
|
||||
</Arg>
|
||||
</New>
|
||||
</Item>
|
||||
|
||||
<!-- Next Protocol Connection factory with HTTP/1.1 as default protocol -->
|
||||
<Item>
|
||||
<Ref refid="protonego"/>
|
||||
</Item>
|
||||
|
||||
<!-- HTTP/2 Connection factory -->
|
||||
<Item>
|
||||
<New class="org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory">
|
||||
<Arg name="config">
|
||||
<Ref refid="sslHttpConfig"/>
|
||||
</Arg>
|
||||
<Set name="maxConcurrentStreams"><Property name="http2.maxConcurrentStreams" default="1024"/></Set>
|
||||
</New>
|
||||
</Item>
|
||||
|
||||
<!-- HTTP/1.1 Connection factory -->
|
||||
<Item>
|
||||
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
|
||||
<Arg name="config">
|
||||
<Ref refid="sslHttpConfig"/>
|
||||
</Arg>
|
||||
</New>
|
||||
</Item>
|
||||
</Array>
|
||||
</Arg>
|
||||
|
||||
<Set name="host"><Property name="http2.host"/></Set>
|
||||
<Set name="port"><Property name="http2.port" default="443"/></Set>
|
||||
<Set name="idleTimeout"><Property name="http2.timeout" default="30000"/></Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
|
||||
</Configure>
|
|
@ -0,0 +1,23 @@
|
|||
#
|
||||
# HTTP2 Support Module
|
||||
#
|
||||
|
||||
[depend]
|
||||
ssl
|
||||
protonego
|
||||
|
||||
[lib]
|
||||
lib/http2/*.jar
|
||||
|
||||
[xml]
|
||||
etc/jetty-ssl.xml
|
||||
etc/jetty-http2.xml
|
||||
|
||||
[ini-template]
|
||||
## HTTP2 Configuration
|
||||
|
||||
# Port for HTTP2 connections
|
||||
http2.port=8443
|
||||
|
||||
# HTTP2 idle timeout in milliseconds
|
||||
http2.timeout=30000
|
|
@ -32,6 +32,7 @@ import org.eclipse.jetty.io.EndPoint;
|
|||
import org.eclipse.jetty.server.Connector;
|
||||
import org.eclipse.jetty.server.HttpConfiguration;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.annotation.Name;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
|
||||
|
@ -42,7 +43,7 @@ public class HTTP2ServerConnectionFactory extends AbstractHTTP2ServerConnectionF
|
|||
|
||||
private final HttpConfiguration httpConfiguration;
|
||||
|
||||
public HTTP2ServerConnectionFactory(HttpConfiguration httpConfiguration)
|
||||
public HTTP2ServerConnectionFactory(@Name("config") HttpConfiguration httpConfiguration)
|
||||
{
|
||||
this.httpConfiguration = httpConfiguration;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue