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