From da6fa14fd180ddeb6c678118ffaae0211bbe9a57 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Fri, 31 Mar 2017 14:49:30 +0900 Subject: [PATCH] Revert "Update Jetty to 9.4.1.v20170120" This reverts commit e05caf91f1df86a95d3e0454000d345bb90a415e. Change-Id: Ia4287f130034a790759b5035505a093b4616a05a --- .../http/test/DumbClientSmartServerTest.java | 4 +-- .../http/test/SmartClientSmartServerTest.java | 4 +-- .../META-INF/MANIFEST.MF | 3 +- org.eclipse.jgit.junit.http/pom.xml | 5 --- .../eclipse/jgit/junit/http/AppServer.java | 32 ++++++++++------- .../jgit/junit/http/RecordingLogger.java | 4 +-- .../org.eclipse.jgit.target/jgit-4.5.target | 36 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.5.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.6.target | 36 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.6.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.7.target | 36 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.7.tpd | 2 +- .../projects/jetty-9.2.13.tpd | 20 +++++++++++ .../projects/jetty-9.4.1.tpd | 20 ----------- pom.xml | 14 +------- 15 files changed, 103 insertions(+), 117 deletions(-) create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.2.13.tpd delete mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.1.tpd diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java index bce44f9bf..da3a09809 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java @@ -199,7 +199,7 @@ public class DumbClientSmartServerTest extends HttpTestCase { .startsWith("JGit/")); assertEquals("*/*", info.getRequestHeader(HDR_ACCEPT)); assertEquals(200, info.getStatus()); - assertEquals("text/plain;charset=utf-8", + assertEquals("text/plain; charset=UTF-8", info .getResponseHeader(HDR_CONTENT_TYPE)); @@ -269,7 +269,7 @@ public class DumbClientSmartServerTest extends HttpTestCase { assertEquals("GET", req.get(0).getMethod()); assertEquals(0, req.get(0).getParameters().size()); assertEquals(200, req.get(0).getStatus()); - assertEquals("text/plain;charset=utf-8", + assertEquals("text/plain; charset=UTF-8", req.get(0).getResponseHeader( HDR_CONTENT_TYPE)); } 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 3e882719b..2b9105cfe 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 @@ -454,7 +454,7 @@ public class SmartClientSmartServerTest extends HttpTestCase { } catch (TransportException err) { String exp = brokenURI + ": expected" + " Content-Type application/x-git-upload-pack-result;" - + " received Content-Type text/plain;charset=utf-8"; + + " received Content-Type text/plain; charset=UTF-8"; assertEquals(exp, err.getMessage()); } } @@ -476,7 +476,7 @@ public class SmartClientSmartServerTest extends HttpTestCase { assertEquals(join(brokenURI, "git-upload-pack"), service.getPath()); assertEquals(0, service.getParameters().size()); assertEquals(200, service.getStatus()); - assertEquals("text/plain;charset=utf-8", + assertEquals("text/plain; charset=UTF-8", service.getResponseHeader(HDR_CONTENT_TYPE)); } diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF index df6668c12..e8b4d06e6 100644 --- a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF @@ -28,8 +28,7 @@ Import-Package: javax.servlet;version="[2.5.0,3.2.0)", org.eclipse.jgit.revwalk;version="[4.6.2,4.7.0)", org.eclipse.jgit.transport;version="[4.6.2,4.7.0)", org.eclipse.jgit.transport.resolver;version="[4.6.2,4.7.0)", - org.junit;version="[4.0.0,5.0.0)", - org.slf4j.helpers;version="[1.7.2,2.0.0)" + org.junit;version="[4.0.0,5.0.0)" Export-Package: org.eclipse.jgit.junit.http;version="4.6.2"; uses:="org.eclipse.jgit.transport, org.eclipse.jgit.junit, diff --git a/org.eclipse.jgit.junit.http/pom.xml b/org.eclipse.jgit.junit.http/pom.xml index 1c32f7d16..ced9c2c14 100644 --- a/org.eclipse.jgit.junit.http/pom.xml +++ b/org.eclipse.jgit.junit.http/pom.xml @@ -93,11 +93,6 @@ org.eclipse.jetty jetty-servlet - - - org.eclipse.jetty - jetty-security - 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 09754317e..44c197717 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 @@ -46,6 +46,7 @@ package org.eclipse.jgit.junit.http; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import java.io.IOException; import java.net.InetAddress; import java.net.URI; import java.net.URISyntaxException; @@ -53,21 +54,21 @@ import java.net.UnknownHostException; import java.util.ArrayList; import java.util.List; -import org.eclipse.jetty.security.AbstractLoginService; import org.eclipse.jetty.security.Authenticator; import org.eclipse.jetty.security.ConstraintMapping; import org.eclipse.jetty.security.ConstraintSecurityHandler; +import org.eclipse.jetty.security.MappedLoginService; import org.eclipse.jetty.security.authentication.BasicAuthenticator; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.HttpConfiguration; import org.eclipse.jetty.server.HttpConnectionFactory; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; +import org.eclipse.jetty.server.UserIdentity; import org.eclipse.jetty.server.handler.ContextHandlerCollection; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.util.security.Constraint; -import org.eclipse.jetty.util.security.Credential; -import org.eclipse.jetty.util.security.Credential.Crypt; +import org.eclipse.jetty.util.security.Password; import org.eclipse.jgit.transport.URIish; /** @@ -167,30 +168,36 @@ public class AppServer { return ctx; } - static class TestLoginService extends AbstractLoginService { - + static class TestMappedLoginService extends MappedLoginService { private String role; - TestLoginService(String role) { + TestMappedLoginService(String role) { this.role = role; } + @Override - protected String[] loadRoleInfo(UserPrincipal user) { - return new String[] { role }; + protected UserIdentity loadUser(String who) { + return null; } @Override - protected UserPrincipal loadUserInfo(String name) { - return new UserPrincipal(username, - Credential.getCredential(Crypt.crypt(username, password))); + protected void loadUsers() throws IOException { + putUser(username, new Password(password), new String[] { role }); } + protected String[] loadRoleInfo(KnownUser user) { + return null; + } + + protected KnownUser loadUserInfo(String usrname) { + return null; + } } private void auth(ServletContextHandler ctx, Authenticator authType) { final String role = "can-access"; - TestLoginService users = new TestLoginService(role); + MappedLoginService users = new TestMappedLoginService(role); ConstraintMapping cm = new ConstraintMapping(); cm.setConstraint(new Constraint()); cm.getConstraint().setAuthenticate(true); @@ -230,7 +237,6 @@ public class AppServer { public void tearDown() throws Exception { RecordingLogger.clear(); log.clear(); - server.setStopTimeout(0); server.stop(); } diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java index c7545a94b..7600843d2 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java @@ -49,7 +49,6 @@ import java.util.Collections; import java.util.List; import org.eclipse.jetty.util.log.Logger; -import org.slf4j.helpers.MessageFormatter; /** Logs warnings into an array for later inspection. */ public class RecordingLogger implements Logger { @@ -155,8 +154,7 @@ public class RecordingLogger implements Logger { public void warn(String msg, Object... args) { synchronized (warnings) { - warnings.add(new Warning( - MessageFormatter.format(msg, args).getMessage())); + warnings.add(new Warning(MessageFormat.format(msg, args))); } } diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.target index 040b638ed..f30bc2fa7 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.target @@ -1,26 +1,26 @@ - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.tpd index 61b720308..ba7a694b4 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.5.tpd @@ -1,6 +1,6 @@ target "jgit-4.5" with source configurePhase -include "projects/jetty-9.4.1.tpd" +include "projects/jetty-9.2.13.tpd" include "orbit/R20160221192158-Mars.tpd" include "orbit/S20170120205402-Oxygen.tpd" diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target index 9582bf3fe..163ab2c26 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target @@ -1,26 +1,26 @@ - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd index 4ffadff5f..d07687815 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd @@ -1,6 +1,6 @@ target "jgit-4.6" with source configurePhase -include "projects/jetty-9.4.1.tpd" +include "projects/jetty-9.2.13.tpd" include "orbit/S20170120205402-Oxygen.tpd" location "http://download.eclipse.org/releases/neon/" { diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target index 55a816245..fa173e7b2 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target @@ -1,26 +1,26 @@ - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd index 426f935b5..4cd9e2b74 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd @@ -1,6 +1,6 @@ target "jgit-4.7" with source configurePhase -include "projects/jetty-9.4.1.tpd" +include "projects/jetty-9.2.13.tpd" include "orbit/S20170120205402-Oxygen.tpd" location "http://download.eclipse.org/releases/oxygen/" { diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.2.13.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.2.13.tpd new file mode 100644 index 000000000..289a73d2a --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.2.13.tpd @@ -0,0 +1,20 @@ +target "jetty-9.2.13" with source configurePhase + +location jetty-9.2.13 "http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.2.13.v20150730/" { + org.eclipse.jetty.client [9.2.13.v20150730,9.2.13.v20150730] + org.eclipse.jetty.client.source [9.2.13.v20150730,9.2.13.v20150730] + org.eclipse.jetty.continuation [9.2.13.v20150730,9.2.13.v20150730] + org.eclipse.jetty.continuation.source [9.2.13.v20150730,9.2.13.v20150730] + org.eclipse.jetty.http [9.2.13.v20150730,9.2.13.v20150730] + org.eclipse.jetty.http.source [9.2.13.v20150730,9.2.13.v20150730] + org.eclipse.jetty.io [9.2.13.v20150730,9.2.13.v20150730] + org.eclipse.jetty.io.source [9.2.13.v20150730,9.2.13.v20150730] + org.eclipse.jetty.security [9.2.13.v20150730,9.2.13.v20150730] + org.eclipse.jetty.security.source [9.2.13.v20150730,9.2.13.v20150730] + org.eclipse.jetty.server [9.2.13.v20150730,9.2.13.v20150730] + org.eclipse.jetty.server.source [9.2.13.v20150730,9.2.13.v20150730] + org.eclipse.jetty.servlet [9.2.13.v20150730,9.2.13.v20150730] + org.eclipse.jetty.servlet.source [9.2.13.v20150730,9.2.13.v20150730] + org.eclipse.jetty.util [9.2.13.v20150730,9.2.13.v20150730] + org.eclipse.jetty.util.source [9.2.13.v20150730,9.2.13.v20150730] +} diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.1.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.1.tpd deleted file mode 100644 index 33ff29dd4..000000000 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.1.tpd +++ /dev/null @@ -1,20 +0,0 @@ -target "jetty-9.4.1" with source configurePhase - -location jetty-9.4.1 "http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.1.v20170120/" { - org.eclipse.jetty.client [9.4.1.v20170120,9.4.1.v20170120] - org.eclipse.jetty.client.source [9.4.1.v20170120,9.4.1.v20170120] - org.eclipse.jetty.continuation [9.4.1.v20170120,9.4.1.v20170120] - org.eclipse.jetty.continuation.source [9.4.1.v20170120,9.4.1.v20170120] - org.eclipse.jetty.http [9.4.1.v20170120,9.4.1.v20170120] - org.eclipse.jetty.http.source [9.4.1.v20170120,9.4.1.v20170120] - org.eclipse.jetty.io [9.4.1.v20170120,9.4.1.v20170120] - org.eclipse.jetty.io.source [9.4.1.v20170120,9.4.1.v20170120] - org.eclipse.jetty.security [9.4.1.v20170120,9.4.1.v20170120] - org.eclipse.jetty.security.source [9.4.1.v20170120,9.4.1.v20170120] - org.eclipse.jetty.server [9.4.1.v20170120,9.4.1.v20170120] - org.eclipse.jetty.server.source [9.4.1.v20170120,9.4.1.v20170120] - org.eclipse.jetty.servlet [9.4.1.v20170120,9.4.1.v20170120] - org.eclipse.jetty.servlet.source [9.4.1.v20170120,9.4.1.v20170120] - org.eclipse.jetty.util [9.4.1.v20170120,9.4.1.v20170120] - org.eclipse.jetty.util.source [9.4.1.v20170120,9.4.1.v20170120] -} diff --git a/pom.xml b/pom.xml index 7d81a38d5..98816444b 100644 --- a/pom.xml +++ b/pom.xml @@ -200,7 +200,7 @@ 1.6 4.3.1 3.1.0 - 9.4.1.v20170120 + 9.2.13.v20150730 0.5.3 4.3.6 1.7.2 @@ -633,18 +633,6 @@ ${jetty-version} - - org.eclipse.jetty - jetty-security - ${jetty-version} - - - - org.eclipse.jetty - jetty-util - ${jetty-version} - - org.osgi org.osgi.core