Upgrade embedded Jetty to 8.1.7.v20120910
Bug: issue 1619 Change-Id: Ica04d0c19306da9afcadf3919581632f7df93483
This commit is contained in:
parent
f121c1bff1
commit
ea48b3c250
@ -248,7 +248,7 @@ public final class GerritLauncher {
|
||||
move(jars, "javax.inject-1.jar", extapi);
|
||||
move(jars, "aopalliance-1.0.jar", extapi);
|
||||
move(jars, "guice-servlet-", extapi);
|
||||
move(jars, "servlet-api-", extapi);
|
||||
move(jars, "tomcat-servlet-api-", extapi);
|
||||
|
||||
ClassLoader parent = ClassLoader.getSystemClassLoader();
|
||||
if (!extapi.isEmpty()) {
|
||||
|
@ -65,6 +65,12 @@ limitations under the License.
|
||||
<groupId>com.google.gerrit</groupId>
|
||||
<artifactId>gerrit-server</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -92,7 +98,7 @@ limitations under the License.
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<artifactId>tomcat-servlet-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -42,10 +42,10 @@ import org.eclipse.jetty.server.session.SessionHandler;
|
||||
import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
|
||||
import org.eclipse.jetty.servlet.DefaultServlet;
|
||||
import org.eclipse.jetty.servlet.FilterHolder;
|
||||
import org.eclipse.jetty.servlet.FilterMapping;
|
||||
import org.eclipse.jetty.servlet.ServletContextHandler;
|
||||
import org.eclipse.jetty.servlet.ServletHolder;
|
||||
import org.eclipse.jetty.util.resource.Resource;
|
||||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
import org.eclipse.jetty.util.thread.QueuedThreadPool;
|
||||
import org.eclipse.jetty.util.thread.ThreadPool;
|
||||
import org.eclipse.jgit.lib.Config;
|
||||
@ -60,6 +60,7 @@ import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@ -67,6 +68,8 @@ import java.util.Set;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import javax.servlet.DispatcherType;
|
||||
|
||||
@Singleton
|
||||
public class JettyServer {
|
||||
static class Lifecycle implements LifecycleListener {
|
||||
@ -161,23 +164,23 @@ public class JettyServer {
|
||||
defaultPort = 80;
|
||||
c = new SelectChannelConnector();
|
||||
} else if ("https".equals(u.getScheme())) {
|
||||
final SslSelectChannelConnector ssl = new SslSelectChannelConnector();
|
||||
SslContextFactory ssl = new SslContextFactory();
|
||||
final File keystore = getFile(cfg, "sslkeystore", "etc/keystore");
|
||||
String password = cfg.getString("httpd", null, "sslkeypassword");
|
||||
if (password == null) {
|
||||
password = "gerrit";
|
||||
}
|
||||
ssl.setKeystore(keystore.getAbsolutePath());
|
||||
ssl.setTruststore(keystore.getAbsolutePath());
|
||||
ssl.setKeyPassword(password);
|
||||
ssl.setTrustPassword(password);
|
||||
ssl.setKeyStorePath(keystore.getAbsolutePath());
|
||||
ssl.setTrustStore(keystore.getAbsolutePath());
|
||||
ssl.setKeyStorePassword(password);
|
||||
ssl.setTrustStorePassword(password);
|
||||
|
||||
if (AuthType.CLIENT_SSL_CERT_LDAP.equals(authType)) {
|
||||
ssl.setNeedClientAuth(true);
|
||||
}
|
||||
|
||||
defaultPort = 443;
|
||||
c = ssl;
|
||||
c = new SslSelectChannelConnector(ssl);
|
||||
|
||||
} else if ("proxy-http".equals(u.getScheme())) {
|
||||
defaultPort = 8080;
|
||||
@ -336,7 +339,9 @@ public class JettyServer {
|
||||
// already have built.
|
||||
//
|
||||
GuiceFilter filter = env.webInjector.getInstance(GuiceFilter.class);
|
||||
app.addFilter(new FilterHolder(filter), "/*", FilterMapping.DEFAULT);
|
||||
app.addFilter(new FilterHolder(filter), "/*", EnumSet.of(
|
||||
DispatcherType.REQUEST,
|
||||
DispatcherType.ASYNC));
|
||||
app.addEventListener(new GuiceServletContextListener() {
|
||||
@Override
|
||||
protected Injector getInjector() {
|
||||
|
@ -37,8 +37,7 @@ limitations under the License.
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<!-- compile, not provided. our embedded Jetty needs this -->
|
||||
<scope>compile</scope>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
12
pom.xml
12
pom.xml
@ -54,7 +54,7 @@ limitations under the License.
|
||||
<bouncyCastleVersion>140</bouncyCastleVersion>
|
||||
<slf4jVersion>1.6.1</slf4jVersion>
|
||||
<guiceVersion>3.0</guiceVersion>
|
||||
<jettyVersion>7.2.1.v20101111</jettyVersion>
|
||||
<jettyVersion>8.1.7.v20120910</jettyVersion>
|
||||
|
||||
<gwt.compileReport>false</gwt.compileReport>
|
||||
|
||||
@ -786,8 +786,8 @@ limitations under the License.
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<!-- use Apache javax.servlet not CDDL -->
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.servlet</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
@ -804,6 +804,12 @@ limitations under the License.
|
||||
<version>6.0.29</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
<artifactId>tomcat-servlet-api</artifactId>
|
||||
<version>7.0.32</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-servlet</artifactId>
|
||||
|
Loading…
Reference in New Issue
Block a user