From 24a0f47e32ab7cdf20c2201d7100599ea057f8a3 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Wed, 23 May 2012 22:21:58 +0200 Subject: [PATCH] Update Jetty to 8.1.3.v20120416 Jetty 8.1.3 comes with Juno M7 and this version can be installed from http://download.eclipse.org/jetty/updates/jetty-bundles-8.x/8.1.3.v20120416/ Change-Id: Ifc4bfbb3efbab0f5bfbde74f0b2ddc5a2f9ee6a5 Signed-off-by: Matthias Sohn --- .../META-INF/MANIFEST.MF | 4 +-- org.eclipse.jgit.http.server/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 26 +++++++--------- .../jgit/http/test/GitServletInitTest.java | 31 +++++++++++++------ .../http/test/SmartClientSmartServerTest.java | 8 +++-- .../META-INF/MANIFEST.MF | 31 ++++++++++--------- .../eclipse/jgit/junit/http/AppServer.java | 4 +-- .../jgit/junit/http/TestRequestLog.java | 2 +- .../org.eclipse.jgit.junit.feature/pom.xml | 5 +++ .../org.eclipse.jgit.repository/pom.xml | 5 +++ org.eclipse.jgit.packaging/pom.xml | 14 ++++++++- pom.xml | 10 ++++-- 12 files changed, 90 insertions(+), 52 deletions(-) diff --git a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF index 6c53e59446..8588fd4741 100644 --- a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF @@ -11,8 +11,8 @@ Export-Package: 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)", diff --git a/org.eclipse.jgit.http.server/pom.xml b/org.eclipse.jgit.http.server/pom.xml index ec2bfc2718..d82ecc0c8f 100644 --- a/org.eclipse.jgit.http.server/pom.xml +++ b/org.eclipse.jgit.http.server/pom.xml @@ -75,7 +75,7 @@ javax.servlet - servlet-api + javax.servlet-api provided diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF index f015d7b24a..e348924968 100644 --- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF @@ -6,21 +6,16 @@ Bundle-Version: 2.0.0.qualifier 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)", @@ -37,3 +32,4 @@ Import-Package: javax.servlet;version="[2.5.0,3.0.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)" diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletInitTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletInitTest.java index 78db5747f7..9dfb199425 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletInitTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletInitTest.java @@ -43,7 +43,6 @@ package org.eclipse.jgit.http.test; -import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -53,6 +52,7 @@ import javax.servlet.ServletException; 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; @@ -100,15 +100,28 @@ public class GitServletInitTest { ServletContextHandler app = server.addContext("/"); ServletHolder s = app.addServlet(GitServlet.class, "/git"); s.setInitOrder(1); + s.getServletHandler().setStartWithUnavailable(false); - server.setUp(); - - List 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 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 diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java index 2a39c9f39c..4db7430ba9 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java @@ -57,9 +57,11 @@ import java.io.IOException; 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; @@ -70,7 +72,6 @@ import javax.servlet.http.HttpServletRequest; 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; @@ -89,9 +90,9 @@ import org.eclipse.jgit.lib.Ref; 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; @@ -160,7 +161,8 @@ public class SmartClientSmartServerTest extends HttpTestCase { public void destroy() { // } - }), "/" + srcName + "/git-upload-pack", FilterMapping.DEFAULT); + }), "/" + srcName + "/git-upload-pack", EnumSet + .of(DispatcherType.REQUEST)); broken.addServlet(new ServletHolder(gs), "/*"); server.setUp(); diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF index 5257d7f9fd..e46a449435 100644 --- a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF @@ -7,21 +7,21 @@ Bundle-Localization: plugin 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)", @@ -33,3 +33,4 @@ Import-Package: javax.servlet;version="[2.5.0,3.0.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)" diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java index 1e7a6e79aa..04ccc14add 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java @@ -54,8 +54,6 @@ import java.net.UnknownHostException; 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; @@ -67,6 +65,8 @@ import org.eclipse.jetty.server.UserIdentity; 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; diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java index f71bc9350f..14ea03a921 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java @@ -48,11 +48,11 @@ import java.util.ArrayList; 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; diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml index b811608a2e..cfdc3cf549 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/pom.xml @@ -75,6 +75,11 @@ org.eclipse.jgit.http.server 2.0.0-SNAPSHOT + + javax.servlet + javax.servlet-api + ${servlet-api-version} + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml index f088af1953..c001a56e55 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml @@ -81,6 +81,11 @@ org.eclipse.jgit.http.server 2.0.0-SNAPSHOT + + javax.servlet + javax.servlet-api + ${servlet-api-version} + diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml index 3fb354e915..c59f0a0348 100644 --- a/org.eclipse.jgit.packaging/pom.xml +++ b/org.eclipse.jgit.packaging/pom.xml @@ -61,6 +61,8 @@ 0.14.1 http://download.eclipse.org/releases/indigo + 8.1.3.v20120416 + 3.0.1 @@ -72,10 +74,15 @@ - indigo + eclipse p2 ${eclipse-site} + + jetty + p2 + http://download.eclipse.org/jetty/updates/jetty-bundles-8.x/${jetty-version}/ + @@ -151,6 +158,11 @@ win32 x86_64 + + macosx + cocoa + x86 + macosx cocoa diff --git a/pom.xml b/pom.xml index 390ddb95ff..60db93505a 100644 --- a/pom.xml +++ b/pom.xml @@ -172,8 +172,8 @@ 0.1.44-1 4.5 2.0.12 - 2.5 - 7.1.6.v20100715 + 3.0.1 + 8.1.3.v20120416 2.4.0a 2.3 @@ -183,6 +183,10 @@ jgit-repository http://download.eclipse.org/jgit/maven + + jetty-repository + http://download.eclipse.org/jetty/updates/jetty-bundles-8.x/${jetty-version}/ + @@ -397,7 +401,7 @@ javax.servlet - servlet-api + javax.servlet-api ${servlet-api-version} -- 2.39.5