org.eclipse.jgit.http.server.resolver;version="2.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: javax.servlet;version="[2.5.0,3.0.0)",
- javax.servlet.http;version="[2.5.0,3.0.0)",
+Import-Package: javax.servlet;version="[3.0.0,4.0.0)",
+ javax.servlet.http;version="[3.0.0,4.0.0)",
org.eclipse.jgit.errors;version="[2.0.0,2.1.0)",
org.eclipse.jgit.lib;version="[2.0.0,2.1.0)",
org.eclipse.jgit.nls;version="[2.0.0,2.1.0)",
<dependency>
<groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
+ <artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
Bundle-Vendor: %provider_name
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: javax.servlet;version="[2.5.0,3.0.0)",
- javax.servlet.http;version="[2.5.0,3.0.0)",
- org.eclipse.jetty.continuation;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.http;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.http.security;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.io;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.security;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.security.authentication;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.server;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.server.handler;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.server.nio;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.servlet;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.util.component;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.util.log;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.util.thread;version="[7.1.0,7.6.0)",
+Import-Package: javax.servlet;version="[3.0.0,4.0.0)",
+ javax.servlet.http;version="[3.0.0,4.0.0)",
+ org.eclipse.jetty.continuation;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.client.security;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.http;version="[8.1.0,9)",
+ org.eclipse.jetty.http.ssl;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.io;version="[8.1.0,9)",
+ org.eclipse.jetty.server.handler;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.servlet;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.util;version="[8.1.0,9.0.0)",
org.eclipse.jgit.errors;version="[2.0.0,2.1.0)",
org.eclipse.jgit.http.server;version="[2.0.0,2.1.0)",
org.eclipse.jgit.http.server.glue;version="[2.0.0,2.1.0)",
org.eclipse.jgit.util;version="[2.0.0,2.1.0)",
org.hamcrest.core;version="[1.1.0,2.0.0)",
org.junit;version="[4.0.0,5.0.0)"
+Require-Bundle: org.eclipse.jetty.server;bundle-version="[8.1.0,9.0.0)"
package org.eclipse.jgit.http.test;
-import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
+import org.eclipse.jetty.util.MultiException;
import org.eclipse.jgit.http.server.GitServlet;
import org.eclipse.jgit.junit.http.AppServer;
import org.eclipse.jgit.junit.http.MockServletConfig;
ServletContextHandler app = server.addContext("/");
ServletHolder s = app.addServlet(GitServlet.class, "/git");
s.setInitOrder(1);
+ s.getServletHandler().setStartWithUnavailable(false);
- server.setUp();
-
- List<RecordingLogger.Warning> events = RecordingLogger.getWarnings();
- assertFalse("Servlet started without base-path", events.isEmpty());
-
- Throwable why = events.get(0).getCause();
- assertTrue("Caught ServletException", why instanceof ServletException);
- assertTrue("Wanted base-path", why.getMessage().contains("base-path"));
+ try {
+ server.setUp();
+ } catch (Exception e) {
+ Throwable why = null;
+ if (e instanceof MultiException) {
+ MultiException multi = (MultiException) e;
+ List<Throwable> reasons = multi.getThrowables();
+ why = reasons.get(0);
+ assertTrue("Expected ServletException",
+ why instanceof ServletException);
+ } else if (e instanceof ServletException)
+ why = e;
+
+ if (why != null) {
+ assertTrue("Wanted base-path",
+ why.getMessage().contains("base-path"));
+ return;
+ }
+ }
+ fail("Expected ServletException complaining about unset base-path");
}
@Test
import java.io.PrintWriter;
import java.net.URISyntaxException;
import java.util.Collections;
+import java.util.EnumSet;
import java.util.List;
import java.util.Map;
+import javax.servlet.DispatcherType;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.http.HttpServletResponse;
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.jgit.errors.RemoteRepositoryException;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevBlob;
import org.eclipse.jgit.revwalk.RevCommit;
-import org.eclipse.jgit.storage.file.ReflogEntry;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.storage.file.FileRepository;
+import org.eclipse.jgit.storage.file.ReflogEntry;
import org.eclipse.jgit.storage.file.ReflogReader;
import org.eclipse.jgit.transport.FetchConnection;
import org.eclipse.jgit.transport.HttpTransport;
public void destroy() {
//
}
- }), "/" + srcName + "/git-upload-pack", FilterMapping.DEFAULT);
+ }), "/" + srcName + "/git-upload-pack", EnumSet
+ .of(DispatcherType.REQUEST));
broken.addServlet(new ServletHolder(gs), "/*");
server.setUp();
Bundle-Vendor: %provider_name
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: javax.servlet;version="[2.5.0,3.0.0)",
- javax.servlet.http;version="[2.5.0,3.0.0)",
- org.eclipse.jetty.continuation;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.http;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.http.security;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.io;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.security;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.security.authentication;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.server;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.server.handler;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.server.nio;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.servlet;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.util.component;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.util.log;version="[7.1.0,7.6.0)",
- org.eclipse.jetty.util.thread;version="[7.1.0,7.6.0)",
+Import-Package: javax.servlet;version="[3.0.0,4.0.0)",
+ javax.servlet.http;version="[3.0.0,4.0.0)",
+ org.eclipse.jetty.client.security;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.http;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.http.ssl;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.io;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.security;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.security.authentication;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.server.handler;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.servlet;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.util;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.util.component;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.util.log;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.util.security;version="[8.1.0,9.0.0)",
+ org.eclipse.jetty.util.thread;version="[8.1.0,9.0.0)",
org.eclipse.jgit.errors;version="[2.0.0,2.1.0)",
org.eclipse.jgit.http.server;version="[2.0.0,2.1.0)",
org.eclipse.jgit.http.server.resolver;version="[2.0.0,2.1.0)",
org.eclipse.jgit.transport.resolver;version="[2.0.0,2.1.0)",
org.junit;version="[4.0.0,5.0.0)"
Export-Package: org.eclipse.jgit.junit.http;version="2.0.0"
+Require-Bundle: org.eclipse.jetty.server;bundle-version="[8.1.0,9.0.0)"
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.jetty.http.security.Constraint;
-import org.eclipse.jetty.http.security.Password;
import org.eclipse.jetty.security.Authenticator;
import org.eclipse.jetty.security.ConstraintMapping;
import org.eclipse.jetty.security.ConstraintSecurityHandler;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.jetty.util.security.Constraint;
+import org.eclipse.jetty.util.security.Password;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.eclipse.jgit.transport.URIish;
import java.util.List;
import java.util.concurrent.Semaphore;
+import javax.servlet.DispatcherType;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.eclipse.jetty.server.DispatcherType;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Response;
import org.eclipse.jetty.server.handler.HandlerWrapper;
<artifactId>org.eclipse.jgit.http.server</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>${servlet-api-version}</version>
+ </dependency>
</dependencies>
</project>
<artifactId>org.eclipse.jgit.http.server</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>${servlet-api-version}</version>
+ </dependency>
</dependencies>
<build>
<properties>
<tycho-version>0.14.1</tycho-version>
<eclipse-site>http://download.eclipse.org/releases/indigo</eclipse-site>
+ <jetty-version>8.1.3.v20120416</jetty-version>
+ <servlet-api-version>3.0.1</servlet-api-version>
</properties>
<modules>
<repositories>
<repository>
- <id>indigo</id>
+ <id>eclipse</id>
<layout>p2</layout>
<url>${eclipse-site}</url>
</repository>
+ <repository>
+ <id>jetty</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/jetty/updates/jetty-bundles-8.x/${jetty-version}/</url>
+ </repository>
</repositories>
<dependencies>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86</arch>
+ </environment>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<jsch-version>0.1.44-1</jsch-version>
<junit-version>4.5</junit-version>
<args4j-version>2.0.12</args4j-version>
- <servlet-api-version>2.5</servlet-api-version>
- <jetty-version>7.1.6.v20100715</jetty-version>
+ <servlet-api-version>3.0.1</servlet-api-version>
+ <jetty-version>8.1.3.v20120416</jetty-version>
<protobuf-version>2.4.0a</protobuf-version>
<clirr-version>2.3</clirr-version>
</properties>
<id>jgit-repository</id>
<url>http://download.eclipse.org/jgit/maven</url>
</repository>
+ <repository>
+ <id>jetty-repository</id>
+ <url>http://download.eclipse.org/jetty/updates/jetty-bundles-8.x/${jetty-version}/</url>
+ </repository>
</repositories>
<build>
<dependency>
<groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
+ <artifactId>javax.servlet-api</artifactId>
<version>${servlet-api-version}</version>
</dependency>