From 026d46de13eb2321c18045469f27b065ba107ff5 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Sun, 5 May 2024 10:56:32 +0200 Subject: [PATCH] Bump jetty version to 12.0.9 and servlet-api to 6.0 Bug: jgit-41 Change-Id: Ib3e42581db2dd88043a1a67d606795501b8019f4 --- WORKSPACE | 43 ++++++++++------- lib/BUILD | 7 +++ .../META-INF/MANIFEST.MF | 4 +- .../META-INF/MANIFEST.MF | 32 +++++++------ org.eclipse.jgit.http.test/pom.xml | 9 +++- .../jgit/http/test/AdvertiseErrorTest.java | 4 +- .../jgit/http/test/AsIsServiceTest.java | 9 ++-- .../test/DefaultReceivePackFactoryTest.java | 10 ++-- .../test/DefaultUploadPackFactoryTest.java | 10 ++-- .../http/test/DumbClientDumbServerTest.java | 8 ++-- .../http/test/DumbClientSmartServerTest.java | 4 +- .../jgit/http/test/ErrorServletTest.java | 4 +- .../jgit/http/test/GitServletInitTest.java | 21 ++++---- .../http/test/GitServletResponseTests.java | 4 +- .../jgit/http/test/HookMessageTest.java | 4 +- .../jgit/http/test/HttpClientTests.java | 8 ++-- .../jgit/http/test/MeasurePackSizeTest.java | 4 +- .../jgit/http/test/ProtocolErrorTest.java | 4 +- .../jgit/http/test/RegexPipelineTest.java | 4 +- .../http/test/SetAdditionalHeadersTest.java | 8 ++-- .../test/SmartClientSmartServerSslTest.java | 6 +-- .../http/test/SmartClientSmartServerTest.java | 6 +-- org.eclipse.jgit.junit.http/BUILD | 2 + .../META-INF/MANIFEST.MF | 25 +++++----- org.eclipse.jgit.junit.http/pom.xml | 7 ++- .../eclipse/jgit/junit/http/AccessEvent.java | 46 +++++++++++------- .../eclipse/jgit/junit/http/AppServer.java | 18 +++---- .../eclipse/jgit/junit/http/HttpTestCase.java | 3 +- .../jgit/junit/http/SimpleHttpServer.java | 4 +- .../jgit/junit/http/TestRequestLog.java | 48 ++++++------------- .../META-INF/MANIFEST.MF | 28 +++++------ org.eclipse.jgit.lfs.server.test/pom.xml | 4 +- .../jgit/lfs/server/fs/LfsServerTest.java | 4 +- .../META-INF/MANIFEST.MF | 6 +-- .../org.eclipse.jgit.repository/category.xml | 4 +- .../org.eclipse.jgit.target/jgit-4.17.target | 26 ++++++---- .../org.eclipse.jgit.target/jgit-4.18.target | 26 ++++++---- .../org.eclipse.jgit.target/jgit-4.19.target | 26 ++++++---- .../org.eclipse.jgit.target/jgit-4.20.target | 26 ++++++---- .../org.eclipse.jgit.target/jgit-4.21.target | 26 ++++++---- .../org.eclipse.jgit.target/jgit-4.22.target | 26 ++++++---- .../org.eclipse.jgit.target/jgit-4.23.target | 26 ++++++---- .../org.eclipse.jgit.target/jgit-4.24.target | 26 ++++++---- .../org.eclipse.jgit.target/jgit-4.25.target | 26 ++++++---- .../org.eclipse.jgit.target/jgit-4.26.target | 26 ++++++---- .../org.eclipse.jgit.target/jgit-4.27.target | 26 ++++++---- .../org.eclipse.jgit.target/jgit-4.28.target | 26 ++++++---- .../org.eclipse.jgit.target/jgit-4.29.target | 26 ++++++---- .../org.eclipse.jgit.target/jgit-4.30.target | 26 ++++++---- .../org.eclipse.jgit.target/jgit-4.31.target | 26 ++++++---- .../maven/dependencies.tpd | 23 +++++---- org.eclipse.jgit.pgm/META-INF/MANIFEST.MF | 12 ++--- org.eclipse.jgit.pgm/pom.xml | 4 +- .../org/eclipse/jgit/pgm/debug/LfsStore.java | 4 +- pom.xml | 12 +++-- 55 files changed, 490 insertions(+), 367 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index a21e3f0b98..ab80a64da6 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -162,8 +162,8 @@ maven_jar( maven_jar( name = "servlet-api", - artifact = "jakarta.servlet:jakarta.servlet-api:5.0.0", - sha1 = "2e6b8ccde55522c879434ddec3714683ccae6867", + artifact = "jakarta.servlet:jakarta.servlet-api:6.0.0", + sha1 = "abecc699286e65035ebba9844c03931357a6a963", ) maven_jar( @@ -240,55 +240,62 @@ maven_jar( sha1 = "b3add478d4382b78ea20b1671390a858002feb6c", ) -JETTY_VER = "11.0.20" +JETTY_VER = "12.0.9" maven_jar( name = "jetty-servlet", - artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER, - sha1 = "a1d845eb6cec5d4667daffd0028a642fb3a9103c", - src_sha1 = "61ff906fa41d8fe313148c32ed7af4750bfed989", + artifact = "org.eclipse.jetty.ee10:jetty-ee10-servlet:" + JETTY_VER, + sha1 = "19e056d75741e7348411d677a9b26a54ea4b7d16", + src_sha1 = "d7fcb4e9d259c1dd8595c6163054be449072fe14", ) maven_jar( name = "jetty-security", artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER, - sha1 = "610df128b530f3edde46f784b42aa60bd46375c5", - src_sha1 = "21c82fbce2ddc9cf0e5bdd2de31e99312079b44c", + sha1 = "0c03a77f9d1a8b595cb4a83011cef735bd34bc95", + src_sha1 = "9fba93bbce1466ef9c77d7a75338abd479641721", ) maven_jar( name = "jetty-server", artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER, - sha1 = "4b42686cc172c2dc68014ae62800ba49cef1fc68", - src_sha1 = "9df80a893fa573e0b1d4d186bf73db6966f26f64", + sha1 = "87adc518dd68b674e08d7e4968d07b6dc73214f1", + src_sha1 = "5404f097aae0126b820b040b4e924f31fe4ff25b", +) + +maven_jar( + name = "jetty-session", + artifact = "org.eclipse.jetty:jetty-session:" + JETTY_VER, + sha1 = "628444f02dfbc4efbd1920a12e055580b227e86b", + src_sha1 = "2ac0ca2c84fa8e40655af1482a9c67d60d659ad2", ) maven_jar( name = "jetty-http", artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER, - sha1 = "1673815598a7932110813edbcd9b5be6f354937b", - src_sha1 = "d75c02dedd8bc91cc8ab5a175c7b4157d86d3996", + sha1 = "cb54f006b1484306bc4b24dc3802cff472a6ba82", + src_sha1 = "a1a6bc169e06007cabf6534fd7c7d1f2e91ab775", ) maven_jar( name = "jetty-io", artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER, - sha1 = "2095d70a6089a6af5ad22d3c8ea0887e3d56f776", - src_sha1 = "cfd54d4686deb71272af25f01f150f035cf7e206", + sha1 = "03e8f5b5c6d583ea591064671c23b8639c132052", + src_sha1 = "41b5752f3aa4c77f872649c215142aee1d6a3395", ) maven_jar( name = "jetty-util", artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER, - sha1 = "6b72e01745c0fa15037d034ae699b059180862d9", - src_sha1 = "7dfc8ca46ba4f92a14a74d20f7c5842122da797f", + sha1 = "996ebc69825af41d49e2edc6796eb714acdc3369", + src_sha1 = "fe3b4ecf5a176bfd3c0055e5e1490503d90965e8", ) maven_jar( name = "jetty-util-ajax", artifact = "org.eclipse.jetty:jetty-util-ajax:" + JETTY_VER, - sha1 = "2ca8b1f9ecf1f3c0d7456d6a7535df2c91f319ec", - src_sha1 = "b6166377c13014b299e69aa57af741d1fd4aaaa0", + sha1 = "634f67e811e0ad2acb32feaaf409927d80cd69ae", + src_sha1 = "192f1e1254f659af64c6cd1124807fa12bdfa721", ) BOUNCYCASTLE_VER = "1.77" diff --git a/lib/BUILD b/lib/BUILD index 8806217577..c2a8271bbe 100644 --- a/lib/BUILD +++ b/lib/BUILD @@ -152,6 +152,13 @@ java_library( exports = ["@jetty-security//jar"], ) +java_library( + name = "jetty-session", + # TODO: This should be testonly but org.eclipse.jgit.pgm depends on it. + visibility = ["//visibility:public"], + exports = ["@jetty-session//jar"], +) + java_library( name = "jetty-server", # TODO: This should be testonly but org.eclipse.jgit.pgm depends on it. diff --git a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF index 0738914bcf..124129d73d 100644 --- a/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.server/META-INF/MANIFEST.MF @@ -17,8 +17,8 @@ Export-Package: org.eclipse.jgit.http.server;version="7.0.0", org.eclipse.jgit.transport, Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-17 -Import-Package: jakarta.servlet;version="[5.0.0,6.0.0)", - jakarta.servlet.http;version="[5.0.0,6.0.0)", +Import-Package: jakarta.servlet;version="[6.0.0,7.0.0)", + jakarta.servlet.http;version="[6.0.0,7.0.0)", org.eclipse.jgit.annotations;version="[7.0.0,7.1.0)", org.eclipse.jgit.errors;version="[7.0.0,7.1.0)", org.eclipse.jgit.internal.storage.dfs;version="[7.0.0,7.1.0)", diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF index f21d553eaf..edce2d8d27 100644 --- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF @@ -9,25 +9,26 @@ Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-17 Require-Bundle: org.hamcrest.core;bundle-version="[1.3.0,2.0.0)", org.hamcrest.library;bundle-version="[1.3.0,2.0.0)" -Import-Package: jakarta.servlet;version="[5.0.0,6.0.0)", - jakarta.servlet.http;version="[5.0.0,6.0.0)", +Import-Package: jakarta.servlet;version="[6.0.0,7.0.0)", + jakarta.servlet.http;version="[6.0.0,7.0.0)", + net.bytebuddy.agent;version="[1.9.0,2.0.0)", + net.bytebuddy.dynamic.loading;version="[1.9.0,2.0.0)", org.apache.commons.codec;version="[1.6.0,2.0.0)", org.apache.commons.codec.binary;version="[1.6.0,2.0.0)", org.apache.http;version="[4.3.0,5.0.0)", org.apache.http.client;version="[4.4.0,5.0.0)", org.apache.http.message;version="[4.3.0,5.0.0)", - org.eclipse.jetty.http;version="[11.0.0,12.0.0)", - org.eclipse.jetty.io;version="[11.0.0,12.0.0)", - org.eclipse.jetty.security;version="[11.0.0,12.0.0)", - org.eclipse.jetty.security.authentication;version="[11.0.0,12.0.0)", - org.eclipse.jetty.server;version="[11.0.0,12.0.0)", - org.eclipse.jetty.server.handler;version="[11.0.0,12.0.0)", - org.eclipse.jetty.servlet;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util.component;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util.log;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util.security;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util.thread;version="[11.0.0,12.0.0)", + org.eclipse.jetty.ee10.servlet;version="[12.0.0,13.0.0)", + org.eclipse.jetty.http;version="[12.0.0,13.0.0)", + org.eclipse.jetty.io;version="[12.0.0,13.0.0)", + org.eclipse.jetty.security;version="[12.0.0,13.0.0)", + org.eclipse.jetty.security.authentication;version="[12.0.0,13.0.0)", + org.eclipse.jetty.server;version="[12.0.0,13.0.0)", + org.eclipse.jetty.server.handler;version="[12.0.0,13.0.0)", + org.eclipse.jetty.util;version="[12.0.0,13.0.0)", + org.eclipse.jetty.util.component;version="[12.0.0,13.0.0)", + org.eclipse.jetty.util.security;version="[12.0.0,13.0.0)", + org.eclipse.jetty.util.thread;version="[12.0.0,13.0.0)", org.eclipse.jgit.api;version="[7.0.0,7.1.0)", org.eclipse.jgit.errors;version="[7.0.0,7.1.0)", org.eclipse.jgit.http.server;version="[7.0.0,7.1.0)", @@ -51,4 +52,5 @@ Import-Package: jakarta.servlet;version="[5.0.0,6.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.rules;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)", - org.junit.runners;version="[4.13,5.0.0)" + org.junit.runners;version="[4.13,5.0.0)", + org.mockito;version="[5.4.0,6.0.0)" diff --git a/org.eclipse.jgit.http.test/pom.xml b/org.eclipse.jgit.http.test/pom.xml index 9187612b97..01ee7824ca 100644 --- a/org.eclipse.jgit.http.test/pom.xml +++ b/org.eclipse.jgit.http.test/pom.xml @@ -57,6 +57,11 @@ ${hamcrest-version} + + org.mockito + mockito-core + + org.eclipse.jgit org.eclipse.jgit.junit.http @@ -77,8 +82,8 @@ - org.eclipse.jetty - jetty-servlet + org.eclipse.jetty.ee10 + jetty-ee10-servlet diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AdvertiseErrorTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AdvertiseErrorTest.java index 5a12410279..fd78ba888c 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AdvertiseErrorTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AdvertiseErrorTest.java @@ -17,8 +17,8 @@ import java.util.Collections; import jakarta.servlet.http.HttpServletRequest; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.errors.RemoteRepositoryException; import org.eclipse.jgit.errors.RepositoryNotFoundException; import org.eclipse.jgit.http.server.GitServlet; diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AsIsServiceTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AsIsServiceTest.java index 062d6248c1..f5db80ba3d 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AsIsServiceTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AsIsServiceTest.java @@ -14,9 +14,6 @@ import static org.junit.Assert.fail; import java.io.IOException; -import jakarta.servlet.http.HttpServletRequestWrapper; - -import org.eclipse.jetty.server.Request; import org.eclipse.jgit.http.server.resolver.AsIsFileService; import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase; import org.eclipse.jgit.lib.Repository; @@ -25,6 +22,10 @@ import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException; import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException; import org.junit.Before; import org.junit.Test; +import org.mockito.Mockito; + +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequestWrapper; public class AsIsServiceTest extends LocalDiskRepositoryTestCase { private Repository db; @@ -101,7 +102,7 @@ public class AsIsServiceTest extends LocalDiskRepositoryTestCase { private final String host; R(String user, String host) { - super(new Request(null, null) /* can't pass null, sigh */); + super(Mockito.mock(HttpServletRequest.class)); this.user = user; this.host = host; } diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultReceivePackFactoryTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultReceivePackFactoryTest.java index 3042564276..62979129fc 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultReceivePackFactoryTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultReceivePackFactoryTest.java @@ -17,10 +17,6 @@ import static org.junit.Assert.fail; import java.io.IOException; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletRequestWrapper; - -import org.eclipse.jetty.server.Request; import org.eclipse.jgit.http.server.resolver.DefaultReceivePackFactory; import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase; import org.eclipse.jgit.lib.PersonIdent; @@ -32,6 +28,10 @@ import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException; import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException; import org.junit.Before; import org.junit.Test; +import org.mockito.Mockito; + +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequestWrapper; public class DefaultReceivePackFactoryTest extends LocalDiskRepositoryTestCase { private Repository db; @@ -173,7 +173,7 @@ public class DefaultReceivePackFactoryTest extends LocalDiskRepositoryTestCase { private final String host; R(String user, String host) { - super(new Request(null, null) /* can't pass null, sigh */); + super(Mockito.mock(HttpServletRequest.class)); this.user = user; this.host = host; } diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultUploadPackFactoryTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultUploadPackFactoryTest.java index c5007aabb7..90188be2c6 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultUploadPackFactoryTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultUploadPackFactoryTest.java @@ -16,10 +16,6 @@ import static org.junit.Assert.fail; import java.io.IOException; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletRequestWrapper; - -import org.eclipse.jetty.server.Request; import org.eclipse.jgit.http.server.resolver.DefaultUploadPackFactory; import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase; import org.eclipse.jgit.lib.Repository; @@ -30,6 +26,10 @@ import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException; import org.eclipse.jgit.transport.resolver.UploadPackFactory; import org.junit.Before; import org.junit.Test; +import org.mockito.Mockito; + +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequestWrapper; public class DefaultUploadPackFactoryTest extends LocalDiskRepositoryTestCase { private Repository db; @@ -129,7 +129,7 @@ public class DefaultUploadPackFactoryTest extends LocalDiskRepositoryTestCase { private final String host; R(String user, String host) { - super(new Request(null, null) /* can't pass null, sigh */); + super(Mockito.mock(HttpServletRequest.class)); this.user = user; this.host = host; } diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java index 8b28c4292c..7ccc0e5d9a 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java @@ -25,9 +25,9 @@ import java.net.URI; import java.util.List; import java.util.Map; -import org.eclipse.jetty.servlet.DefaultServlet; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.DefaultServlet; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.errors.NotSupportedException; import org.eclipse.jgit.junit.TestRepository; import org.eclipse.jgit.junit.http.AccessEvent; @@ -70,7 +70,7 @@ public class DumbClientDumbServerTest extends AllFactoriesHttpTestCase { final URI base = srcGit.getParentFile().toURI(); ServletContextHandler app = server.addContext("/git"); - app.setResourceBase(base.toString()); + app.setBaseResourceAsString(base.toString()); ServletHolder holder = app.addServlet(DefaultServlet.class, "/"); // The tmp directory is symlinked on OS X holder.setInitParameter("aliases", "true"); 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 986b5ca92b..9b9f6843de 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 @@ -25,8 +25,8 @@ import java.io.IOException; import java.util.List; import java.util.Map; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.errors.NotSupportedException; import org.eclipse.jgit.http.server.GitServlet; import org.eclipse.jgit.junit.TestRepository; diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/ErrorServletTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/ErrorServletTest.java index a837db06cd..9a610c6b73 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/ErrorServletTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/ErrorServletTest.java @@ -15,8 +15,8 @@ import static org.junit.Assert.assertEquals; import java.net.HttpURLConnection; import java.net.URI; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.http.server.glue.ErrorServlet; import org.eclipse.jgit.junit.http.AppServer; import org.junit.After; 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 4d51bec852..c8873606f3 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 @@ -13,13 +13,8 @@ package org.eclipse.jgit.http.test; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import java.util.List; - -import jakarta.servlet.ServletException; - -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; -import org.eclipse.jetty.util.MultiException; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.http.server.GitServlet; import org.eclipse.jgit.junit.http.AppServer; import org.eclipse.jgit.junit.http.MockServletConfig; @@ -27,6 +22,8 @@ import org.eclipse.jgit.junit.http.RecordingLogger; import org.junit.After; import org.junit.Test; +import jakarta.servlet.ServletException; + public class GitServletInitTest { private AppServer server; @@ -75,14 +72,14 @@ public class GitServletInitTest { server.setUp(); } catch (Exception e) { Throwable why = null; - if (e instanceof MultiException) { - MultiException multi = (MultiException) e; - List reasons = multi.getThrowables(); - why = reasons.get(0); + Throwable[] reasons = e.getSuppressed(); + if (reasons.length > 0) { + why = reasons[0]; assertTrue("Expected ServletException", why instanceof ServletException); - } else if (e instanceof ServletException) + } else if (e instanceof ServletException) { why = e; + } if (why != null) { assertTrue("Wanted base-path", diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java index 12bfac6ffe..9331efa603 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java @@ -17,8 +17,8 @@ import java.util.Collections; import jakarta.servlet.http.HttpServletRequest; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.errors.CorruptObjectException; import org.eclipse.jgit.errors.RepositoryNotFoundException; import org.eclipse.jgit.errors.TooLargePackException; diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java index 5bb6c45ab5..082d853f42 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HookMessageTest.java @@ -22,8 +22,8 @@ import java.util.List; import jakarta.servlet.http.HttpServletRequest; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.errors.RepositoryNotFoundException; import org.eclipse.jgit.http.server.GitServlet; import org.eclipse.jgit.http.server.resolver.DefaultReceivePackFactory; diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java index 8c0d7ecce7..3937627f53 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java @@ -30,9 +30,9 @@ import java.util.Set; import jakarta.servlet.http.HttpServletRequest; -import org.eclipse.jetty.servlet.DefaultServlet; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.DefaultServlet; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.errors.NoRemoteRepositoryException; import org.eclipse.jgit.errors.RepositoryNotFoundException; @@ -105,7 +105,7 @@ public class HttpClientTests extends AllFactoriesHttpTestCase { final URI base = srcGit.getParentFile().toURI(); ServletContextHandler ctx = server.addContext(path); - ctx.setResourceBase(base.toString()); + ctx.setBaseResourceAsString(base.toString()); ServletHolder holder = ctx.addServlet(DefaultServlet.class, "/"); // The tmp directory is symlinked on OS X holder.setInitParameter("aliases", "true"); diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java index 9030f51b30..183043b2d4 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/MeasurePackSizeTest.java @@ -16,8 +16,8 @@ import java.util.Collections; import jakarta.servlet.http.HttpServletRequest; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.errors.RepositoryNotFoundException; import org.eclipse.jgit.http.server.GitServlet; import org.eclipse.jgit.http.server.resolver.DefaultReceivePackFactory; diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/ProtocolErrorTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/ProtocolErrorTest.java index 9fa8584b3f..74028d762d 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/ProtocolErrorTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/ProtocolErrorTest.java @@ -22,8 +22,8 @@ import java.net.URL; import jakarta.servlet.http.HttpServletRequest; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.errors.RepositoryNotFoundException; import org.eclipse.jgit.http.server.GitServlet; import org.eclipse.jgit.http.server.GitSmartHttpTools; diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RegexPipelineTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RegexPipelineTest.java index e30212de88..dfdb975ef6 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RegexPipelineTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RegexPipelineTest.java @@ -59,8 +59,8 @@ import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.http.server.glue.MetaServlet; import org.eclipse.jgit.http.server.glue.RegexGroupFilter; import org.eclipse.jgit.junit.http.AppServer; diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SetAdditionalHeadersTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SetAdditionalHeadersTest.java index cda2b32529..d569431684 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SetAdditionalHeadersTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SetAdditionalHeadersTest.java @@ -20,9 +20,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.eclipse.jetty.servlet.DefaultServlet; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.DefaultServlet; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.junit.TestRepository; import org.eclipse.jgit.junit.http.AccessEvent; import org.eclipse.jgit.lib.Repository; @@ -58,7 +58,7 @@ public class SetAdditionalHeadersTest extends AllFactoriesHttpTestCase { final URI base = srcGit.getParentFile().toURI(); ServletContextHandler app = server.addContext("/git"); - app.setResourceBase(base.toString()); + app.setBaseResourceAsString(base.toString()); ServletHolder holder = app.addServlet(DefaultServlet.class, "/"); // The tmp directory is symlinked on OS X holder.setInitParameter("aliases", "true"); diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerSslTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerSslTest.java index 19f6bcd463..13ed36cb8c 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerSslTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerSslTest.java @@ -29,9 +29,9 @@ import jakarta.servlet.ServletResponse; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; -import org.eclipse.jetty.servlet.FilterHolder; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.FilterHolder; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.errors.TransportException; import org.eclipse.jgit.errors.UnsupportedCredentialItem; import org.eclipse.jgit.http.server.GitServlet; 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 45ca6ba011..850e895790 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 @@ -52,9 +52,9 @@ import jakarta.servlet.ServletResponse; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; -import org.eclipse.jetty.servlet.FilterHolder; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.FilterHolder; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.TransportConfigCallback; import org.eclipse.jgit.errors.NoRemoteRepositoryException; diff --git a/org.eclipse.jgit.junit.http/BUILD b/org.eclipse.jgit.junit.http/BUILD index 8e6a5089c8..5ddd0c8d56 100644 --- a/org.eclipse.jgit.junit.http/BUILD +++ b/org.eclipse.jgit.junit.http/BUILD @@ -10,9 +10,11 @@ java_library( # TODO(davido): we want here provided deps deps = [ "//lib:jetty-http", + "//lib:jetty-io", "//lib:jetty-security", "//lib:jetty-server", "//lib:jetty-servlet", + "//lib:jetty-session", "//lib:jetty-util", "//lib:junit", "//lib:servlet-api", diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF index 15453f37dd..3e983511d5 100644 --- a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF @@ -8,19 +8,20 @@ Bundle-Localization: OSGI-INF/l10n/plugin Bundle-Vendor: %Bundle-Vendor Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-17 -Import-Package: jakarta.servlet;version="[5.0.0,6.0.0)", - jakarta.servlet.http;version="[5.0.0,6.0.0)", +Import-Package: jakarta.servlet;version="[6.0.0,7.0.0)", + jakarta.servlet.http;version="[6.0.0,7.0.0)", org.apache.commons.logging;version="[1.1.1,2.0.0)", - org.eclipse.jetty.http;version="[11.0.0,12.0.0)", - org.eclipse.jetty.security;version="[11.0.0,12.0.0)", - org.eclipse.jetty.security.authentication;version="[11.0.0,12.0.0)", - org.eclipse.jetty.server;version="[11.0.0,12.0.0)", - org.eclipse.jetty.server.handler;version="[11.0.0,12.0.0)", - org.eclipse.jetty.servlet;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util.component;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util.log;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util.security;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util.ssl;version="[11.0.0,12.0.0)", + org.eclipse.jetty.ee10.servlet;version="[12.0.0,13.0.0)", + org.eclipse.jetty.ee10.servlet.security;version="[12.0.0,13.0.0)", + org.eclipse.jetty.http;version="[12.0.0,13.0.0)", + org.eclipse.jetty.security;version="[12.0.0,13.0.0)", + org.eclipse.jetty.security.authentication;version="[12.0.0,13.0.0)", + org.eclipse.jetty.server;version="[12.0.0,13.0.0)", + org.eclipse.jetty.server.handler;version="[12.0.0,13.0.0)", + org.eclipse.jetty.util;version="[12.0.0,13.0.0)", + org.eclipse.jetty.util.component;version="[12.0.0,13.0.0)", + org.eclipse.jetty.util.security;version="[12.0.0,13.0.0)", + org.eclipse.jetty.util.ssl;version="[12.0.0,13.0.0)", org.eclipse.jgit.errors;version="[7.0.0,7.1.0)", org.eclipse.jgit.http.server;version="[7.0.0,7.1.0)", org.eclipse.jgit.internal.storage.file;version="[7.0.0,7.1.0)", diff --git a/org.eclipse.jgit.junit.http/pom.xml b/org.eclipse.jgit.junit.http/pom.xml index 05701bd243..67c82652cb 100644 --- a/org.eclipse.jgit.junit.http/pom.xml +++ b/org.eclipse.jgit.junit.http/pom.xml @@ -57,9 +57,14 @@ ${project.version} + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + + org.eclipse.jetty - jetty-servlet + jetty-session diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java index 3d4f379243..36da539e8d 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java @@ -11,12 +11,14 @@ package org.eclipse.jgit.junit.http; import java.util.Collections; -import java.util.Enumeration; import java.util.Map; import java.util.TreeMap; +import org.eclipse.jetty.http.HttpField; +import org.eclipse.jetty.http.HttpURI; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Response; +import org.eclipse.jetty.util.Fields; /** * A single request made through {@link org.eclipse.jgit.junit.http.AppServer}. @@ -24,7 +26,7 @@ import org.eclipse.jetty.server.Response; public class AccessEvent { private final String method; - private final String uri; + private final HttpURI uri; private final Map requestHeaders; @@ -36,9 +38,9 @@ public class AccessEvent { AccessEvent(Request req) { method = req.getMethod(); - uri = req.getRequestURI(); + uri = req.getHttpURI(); requestHeaders = cloneHeaders(req); - parameters = clone(req.getParameterMap()); + parameters = cloneParameters(req); } void setResponse(Response rsp) { @@ -48,11 +50,10 @@ public class AccessEvent { private static Map cloneHeaders(Request req) { Map r = new TreeMap<>(); - Enumeration hn = req.getHeaderNames(); - while (hn.hasMoreElements()) { - String key = (String) hn.nextElement(); + for (HttpField f : req.getHeaders()) { + String key = f.getName(); if (!r.containsKey(key)) { - r.put(key, req.getHeader(key)); + r.put(key, f.getValue()); } } return Collections.unmodifiableMap(r); @@ -60,20 +61,29 @@ public class AccessEvent { private static Map cloneHeaders(Response rsp) { Map r = new TreeMap<>(); - Enumeration hn = rsp.getHttpFields().getFieldNames(); - while (hn.hasMoreElements()) { - String key = hn.nextElement(); + for (HttpField f : rsp.getHeaders()) { + String key = f.getName(); if (!r.containsKey(key)) { - Enumeration v = rsp.getHttpFields().getValues(key); - r.put(key, v.nextElement()); + r.put(key, f.getValue()); } } return Collections.unmodifiableMap(r); } - @SuppressWarnings("unchecked") - private static Map clone(Map parameterMap) { - return new TreeMap<>(parameterMap); + private static Map cloneParameters(Request req) { + Map r = new TreeMap<>(); + + Fields fields; + try { + fields = Request.getParameters(req); + for (String n : fields.getNames()) { + r.put(n, fields.getValues(n).toArray(new String[0])); + } + } catch (Exception e) { + throw new RuntimeException("Failed to extract request parameters", + e); + } + return r; } /** @@ -91,7 +101,7 @@ public class AccessEvent { * @return path of the file on the server, e.g. {@code /git/HEAD}. */ public String getPath() { - return uri; + return uri.getPath(); } /** @@ -151,7 +161,7 @@ public class AccessEvent { StringBuilder b = new StringBuilder(); b.append(method); b.append(' '); - b.append(uri); + b.append(uri.getPath()); if (!parameters.isEmpty()) { b.append('?'); boolean first = true; 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 de4535ab52..76e437bc3d 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 @@ -27,10 +27,12 @@ import java.util.Locale; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.security.ConstraintMapping; +import org.eclipse.jetty.ee10.servlet.security.ConstraintSecurityHandler; 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.Constraint; import org.eclipse.jetty.security.RolePrincipal; import org.eclipse.jetty.security.UserPrincipal; import org.eclipse.jetty.security.authentication.BasicAuthenticator; @@ -42,8 +44,6 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.SslConnectionFactory; 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.Password; import org.eclipse.jetty.util.ssl.SslContextFactory; import org.eclipse.jgit.transport.URIish; @@ -243,6 +243,7 @@ public class AppServer { * path of the context; use "/" for the root context if binding * to the root is desired. * @return the context to add servlets into. + * @since 7.0 */ public ServletContextHandler addContext(String path) { assertNotYetSetUp(); @@ -264,6 +265,7 @@ public class AppServer { * @param methods * the methods * @return servlet context handler + * @since 7.0 */ public ServletContextHandler authBasic(ServletContextHandler ctx, String... methods) { @@ -305,10 +307,10 @@ public class AppServer { private ConstraintMapping createConstraintMapping() { ConstraintMapping cm = new ConstraintMapping(); - cm.setConstraint(new Constraint()); - cm.getConstraint().setAuthenticate(true); - cm.getConstraint().setDataConstraint(Constraint.DC_NONE); - cm.getConstraint().setRoles(new String[] { authRole }); + Constraint constraint = new Constraint.Builder() + .authorization(Constraint.Authorization.SPECIFIC_ROLE) + .roles(new String[] { authRole }).build(); + cm.setConstraint(constraint); cm.setPathSpec("/*"); return cm; } diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java index 8a4d363709..f399471b39 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java @@ -21,7 +21,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; import org.eclipse.jgit.internal.storage.file.FileRepository; import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase; import org.eclipse.jgit.junit.TestRepository; @@ -109,6 +109,7 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { * @return the warnings (if any) from the last execution * @throws URISyntaxException * if URI is invalid + * @since 7.0 */ protected URIish toURIish(ServletContextHandler app, String name) throws URISyntaxException { diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java index 790a6eb657..bce41383d1 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java @@ -15,8 +15,8 @@ import java.net.URISyntaxException; import jakarta.servlet.http.HttpServletRequest; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.errors.RepositoryNotFoundException; import org.eclipse.jgit.http.server.GitServlet; import org.eclipse.jgit.lib.Repository; 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 799decafa6..7a71951dbd 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 @@ -10,25 +10,22 @@ package org.eclipse.jgit.junit.http; -import java.io.IOException; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.concurrent.Semaphore; -import jakarta.servlet.DispatcherType; -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; - +import org.eclipse.jetty.server.Handler.Wrapper; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Response; -import org.eclipse.jetty.server.handler.HandlerWrapper; +import org.eclipse.jetty.util.Callback; /** Logs request made through {@link AppServer}. */ -class TestRequestLog extends HandlerWrapper { +class TestRequestLog extends Wrapper { private static final int MAX = 16; - private final List events = new ArrayList<>(); + private final List events = Collections + .synchronizedList(new ArrayList<>()); private final Semaphore active = new Semaphore(MAX, true); @@ -43,10 +40,7 @@ class TestRequestLog extends HandlerWrapper { continue; } } - - synchronized (events) { - events.clear(); - } + events.clear(); } finally { active.release(MAX); } @@ -63,19 +57,15 @@ class TestRequestLog extends HandlerWrapper { continue; } } - - synchronized (events) { - return events; - } + return Collections.unmodifiableList(new ArrayList<>(events)); } finally { active.release(MAX); } } @Override - public void handle(String target, Request baseRequest, - HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException { + public boolean handle(Request request, Response response, Callback callback) + throws Exception { try { for (;;) { try { @@ -86,21 +76,13 @@ class TestRequestLog extends HandlerWrapper { } } - AccessEvent event = null; - if (DispatcherType.REQUEST - .equals(baseRequest.getDispatcherType())) { - event = new AccessEvent((Request) request); - synchronized (events) { - events.add(event); - } - } + AccessEvent event = new AccessEvent(request); + events.add(event); - super.handle(target, baseRequest, request, response); - - if (event != null) { - event.setResponse((Response) response); - } + boolean result = super.handle(request, response, callback); + event.setResponse(response); + return result; } finally { active.release(); } diff --git a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF index 737ff3f14e..8e41ee3d28 100644 --- a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF @@ -7,25 +7,25 @@ Bundle-Version: 7.0.0.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-17 -Import-Package: jakarta.servlet;version="[5.0.0,6.0.0)", - jakarta.servlet.http;version="[5.0.0,6.0.0)", +Import-Package: jakarta.servlet;version="[6.0.0,7.0.0)", + jakarta.servlet.http;version="[6.0.0,7.0.0)", org.apache.http;version="[4.4.0,5.0.0)", org.apache.http.client;version="[4.4.0,5.0.0)", org.apache.http.client.methods;version="[4.4.0,5.0.0)", org.apache.http.entity;version="[4.4.0,5.0.0)", org.apache.http.impl.client;version="[4.4.0,5.0.0)", - org.eclipse.jetty.http;version="[11.0.0,12.0.0)", - org.eclipse.jetty.io;version="[11.0.0,12.0.0)", - org.eclipse.jetty.security;version="[11.0.0,12.0.0)", - org.eclipse.jetty.security.authentication;version="[11.0.0,12.0.0)", - org.eclipse.jetty.server;version="[11.0.0,12.0.0)", - org.eclipse.jetty.server.handler;version="[11.0.0,12.0.0)", - org.eclipse.jetty.servlet;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util.component;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util.log;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util.security;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util.thread;version="[11.0.0,12.0.0)", + org.eclipse.jetty.ee10.servlet;version="[12.0.0,13.0.0)", + org.eclipse.jetty.http;version="[12.0.0,13.0.0)", + org.eclipse.jetty.io;version="[12.0.0,13.0.0)", + org.eclipse.jetty.security;version="[12.0.0,13.0.0)", + org.eclipse.jetty.security.authentication;version="[12.0.0,13.0.0)", + org.eclipse.jetty.session;version="[12.0.0,13.0.0)", + org.eclipse.jetty.server;version="[12.0.0,13.0.0)", + org.eclipse.jetty.server.handler;version="[12.0.0,13.0.0)", + org.eclipse.jetty.util;version="[12.0.0,13.0.0)", + org.eclipse.jetty.util.component;version="[12.0.0,13.0.0)", + org.eclipse.jetty.util.security;version="[12.0.0,13.0.0)", + org.eclipse.jetty.util.thread;version="[12.0.0,13.0.0)", org.eclipse.jgit.api;version="[7.0.0,7.1.0)", org.eclipse.jgit.api.errors;version="[7.0.0,7.1.0)", org.eclipse.jgit.internal.storage.file;version="[7.0.0,7.1.0)", diff --git a/org.eclipse.jgit.lfs.server.test/pom.xml b/org.eclipse.jgit.lfs.server.test/pom.xml index 9cdd7a9f22..49c1023ef0 100644 --- a/org.eclipse.jgit.lfs.server.test/pom.xml +++ b/org.eclipse.jgit.lfs.server.test/pom.xml @@ -74,8 +74,8 @@ - org.eclipse.jetty - jetty-servlet + org.eclipse.jetty.ee10 + jetty-ee10-servlet test diff --git a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/LfsServerTest.java b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/LfsServerTest.java index b2b9ee010b..9a49023fcb 100644 --- a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/LfsServerTest.java +++ b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/LfsServerTest.java @@ -39,8 +39,8 @@ import org.apache.http.entity.InputStreamEntity; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.junit.MockSystemReader; import org.eclipse.jgit.junit.http.AppServer; import org.eclipse.jgit.lfs.errors.LfsException; diff --git a/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF index 7c521f93a6..a59c82ed1a 100644 --- a/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF @@ -20,9 +20,9 @@ Export-Package: org.eclipse.jgit.lfs.server;version="7.0.0"; org.eclipse.jgit.lfs.lib" Bundle-RequiredExecutionEnvironment: JavaSE-17 Import-Package: com.google.gson;version="[2.8.0,3.0.0)", - jakarta.servlet;version="[5.0.0,6.0.0)", - jakarta.servlet.annotation;version="[5.0.0,6.0.0)", - jakarta.servlet.http;version="[5.0.0,6.0.0)", + jakarta.servlet;version="[6.0.0,7.0.0)", + jakarta.servlet.annotation;version="[6.0.0,7.0.0)", + jakarta.servlet.http;version="[6.0.0,7.0.0)", org.apache.http;version="[4.3.0,5.0.0)", org.eclipse.jgit.annotations;version="[7.0.0,7.1.0)", org.eclipse.jgit.internal;version="[7.0.0,7.1.0)", diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml index e0c790ad90..f46e08dfdc 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml @@ -105,10 +105,10 @@ - + - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target index cd5f276e13..8899b518f0 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target @@ -1,7 +1,7 @@ - + @@ -102,52 +102,58 @@ + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + 12.0.9 + jar + org.eclipse.jetty jetty-http - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-io - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-security - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-server - 11.0.20 + 12.0.9 jar org.eclipse.jetty - jetty-servlet - 11.0.20 + jetty-session + 12.0.9 jar org.eclipse.jetty jetty-util - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-util-ajax - 11.0.20 + 12.0.9 jar jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.0.0 jar diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target index 2abd522dbe..ee56a72584 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target @@ -1,7 +1,7 @@ - + @@ -102,52 +102,58 @@ + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + 12.0.9 + jar + org.eclipse.jetty jetty-http - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-io - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-security - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-server - 11.0.20 + 12.0.9 jar org.eclipse.jetty - jetty-servlet - 11.0.20 + jetty-session + 12.0.9 jar org.eclipse.jetty jetty-util - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-util-ajax - 11.0.20 + 12.0.9 jar jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.0.0 jar diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target index 3c2a565d94..ad35e58e3f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target @@ -1,7 +1,7 @@ - + @@ -102,52 +102,58 @@ + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + 12.0.9 + jar + org.eclipse.jetty jetty-http - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-io - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-security - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-server - 11.0.20 + 12.0.9 jar org.eclipse.jetty - jetty-servlet - 11.0.20 + jetty-session + 12.0.9 jar org.eclipse.jetty jetty-util - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-util-ajax - 11.0.20 + 12.0.9 jar jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.0.0 jar diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target index 5a61cc440c..4031c045dc 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target @@ -1,7 +1,7 @@ - + @@ -102,52 +102,58 @@ + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + 12.0.9 + jar + org.eclipse.jetty jetty-http - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-io - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-security - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-server - 11.0.20 + 12.0.9 jar org.eclipse.jetty - jetty-servlet - 11.0.20 + jetty-session + 12.0.9 jar org.eclipse.jetty jetty-util - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-util-ajax - 11.0.20 + 12.0.9 jar jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.0.0 jar diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target index d4933c5dfa..1a119f2f7e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target @@ -1,7 +1,7 @@ - + @@ -102,52 +102,58 @@ + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + 12.0.9 + jar + org.eclipse.jetty jetty-http - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-io - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-security - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-server - 11.0.20 + 12.0.9 jar org.eclipse.jetty - jetty-servlet - 11.0.20 + jetty-session + 12.0.9 jar org.eclipse.jetty jetty-util - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-util-ajax - 11.0.20 + 12.0.9 jar jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.0.0 jar diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target index c95554a529..1f6ee4eaac 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target @@ -1,7 +1,7 @@ - + @@ -102,52 +102,58 @@ + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + 12.0.9 + jar + org.eclipse.jetty jetty-http - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-io - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-security - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-server - 11.0.20 + 12.0.9 jar org.eclipse.jetty - jetty-servlet - 11.0.20 + jetty-session + 12.0.9 jar org.eclipse.jetty jetty-util - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-util-ajax - 11.0.20 + 12.0.9 jar jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.0.0 jar diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target index 66d6f3a6ac..d0a04209b3 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target @@ -1,7 +1,7 @@ - + @@ -102,52 +102,58 @@ + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + 12.0.9 + jar + org.eclipse.jetty jetty-http - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-io - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-security - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-server - 11.0.20 + 12.0.9 jar org.eclipse.jetty - jetty-servlet - 11.0.20 + jetty-session + 12.0.9 jar org.eclipse.jetty jetty-util - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-util-ajax - 11.0.20 + 12.0.9 jar jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.0.0 jar diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target index e758183147..dc9e090a23 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target @@ -1,7 +1,7 @@ - + @@ -102,52 +102,58 @@ + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + 12.0.9 + jar + org.eclipse.jetty jetty-http - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-io - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-security - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-server - 11.0.20 + 12.0.9 jar org.eclipse.jetty - jetty-servlet - 11.0.20 + jetty-session + 12.0.9 jar org.eclipse.jetty jetty-util - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-util-ajax - 11.0.20 + 12.0.9 jar jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.0.0 jar diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.target index 71cc409674..53dcb36667 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.25.target @@ -1,7 +1,7 @@ - + @@ -102,52 +102,58 @@ + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + 12.0.9 + jar + org.eclipse.jetty jetty-http - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-io - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-security - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-server - 11.0.20 + 12.0.9 jar org.eclipse.jetty - jetty-servlet - 11.0.20 + jetty-session + 12.0.9 jar org.eclipse.jetty jetty-util - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-util-ajax - 11.0.20 + 12.0.9 jar jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.0.0 jar diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.target index acfae9b7a8..822c7cf41e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.26.target @@ -1,7 +1,7 @@ - + @@ -102,52 +102,58 @@ + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + 12.0.9 + jar + org.eclipse.jetty jetty-http - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-io - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-security - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-server - 11.0.20 + 12.0.9 jar org.eclipse.jetty - jetty-servlet - 11.0.20 + jetty-session + 12.0.9 jar org.eclipse.jetty jetty-util - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-util-ajax - 11.0.20 + 12.0.9 jar jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.0.0 jar diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.target index 1d7bdde508..9a0cab4248 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.27.target @@ -1,7 +1,7 @@ - + @@ -102,52 +102,58 @@ + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + 12.0.9 + jar + org.eclipse.jetty jetty-http - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-io - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-security - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-server - 11.0.20 + 12.0.9 jar org.eclipse.jetty - jetty-servlet - 11.0.20 + jetty-session + 12.0.9 jar org.eclipse.jetty jetty-util - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-util-ajax - 11.0.20 + 12.0.9 jar jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.0.0 jar diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.target index 42af665453..22aa30e607 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.28.target @@ -1,7 +1,7 @@ - + @@ -102,52 +102,58 @@ + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + 12.0.9 + jar + org.eclipse.jetty jetty-http - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-io - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-security - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-server - 11.0.20 + 12.0.9 jar org.eclipse.jetty - jetty-servlet - 11.0.20 + jetty-session + 12.0.9 jar org.eclipse.jetty jetty-util - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-util-ajax - 11.0.20 + 12.0.9 jar jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.0.0 jar diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.29.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.29.target index f171138a61..f7fb7c9e58 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.29.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.29.target @@ -1,7 +1,7 @@ - + @@ -102,52 +102,58 @@ + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + 12.0.9 + jar + org.eclipse.jetty jetty-http - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-io - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-security - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-server - 11.0.20 + 12.0.9 jar org.eclipse.jetty - jetty-servlet - 11.0.20 + jetty-session + 12.0.9 jar org.eclipse.jetty jetty-util - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-util-ajax - 11.0.20 + 12.0.9 jar jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.0.0 jar diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.30.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.30.target index c226209579..733559d660 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.30.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.30.target @@ -1,7 +1,7 @@ - + @@ -102,52 +102,58 @@ + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + 12.0.9 + jar + org.eclipse.jetty jetty-http - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-io - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-security - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-server - 11.0.20 + 12.0.9 jar org.eclipse.jetty - jetty-servlet - 11.0.20 + jetty-session + 12.0.9 jar org.eclipse.jetty jetty-util - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-util-ajax - 11.0.20 + 12.0.9 jar jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.0.0 jar diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.31.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.31.target index 8e7706e07c..78ef16818c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.31.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.31.target @@ -1,7 +1,7 @@ - + @@ -102,52 +102,58 @@ + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + 12.0.9 + jar + org.eclipse.jetty jetty-http - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-io - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-security - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-server - 11.0.20 + 12.0.9 jar org.eclipse.jetty - jetty-servlet - 11.0.20 + jetty-session + 12.0.9 jar org.eclipse.jetty jetty-util - 11.0.20 + 12.0.9 jar org.eclipse.jetty jetty-util-ajax - 11.0.20 + 12.0.9 jar jakarta.servlet jakarta.servlet-api - 5.0.0 + 6.0.0 jar diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/maven/dependencies.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/maven/dependencies.tpd index 59fdbba3a0..a25f9c9650 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/maven/dependencies.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/maven/dependencies.tpd @@ -146,45 +146,50 @@ maven jetty missingManifest = error includeSources { + dependency { + groupId = "org.eclipse.jetty.ee10" + artifactId = "jetty-ee10-servlet" + version = "12.0.9" + } dependency { groupId = "org.eclipse.jetty" artifactId = "jetty-http" - version = "11.0.20" + version = "12.0.9" } dependency { groupId = "org.eclipse.jetty" artifactId = "jetty-io" - version = "11.0.20" + version = "12.0.9" } dependency { groupId = "org.eclipse.jetty" artifactId = "jetty-security" - version = "11.0.20" + version = "12.0.9" } dependency { groupId = "org.eclipse.jetty" artifactId = "jetty-server" - version = "11.0.20" + version = "12.0.9" } dependency { groupId = "org.eclipse.jetty" - artifactId = "jetty-servlet" - version = "11.0.20" + artifactId = "jetty-session" + version = "12.0.9" } dependency { groupId = "org.eclipse.jetty" artifactId = "jetty-util" - version = "11.0.20" + version = "12.0.9" } dependency { groupId = "org.eclipse.jetty" artifactId = "jetty-util-ajax" - version = "11.0.20" + version = "12.0.9" } dependency { groupId = "jakarta.servlet" artifactId = "jakarta.servlet-api" - version = "5.0.0" + version = "6.0.0" } } diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF index da6ab235f5..bb0c23dd72 100644 --- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF @@ -7,13 +7,13 @@ Bundle-Version: 7.0.0.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: OSGI-INF/l10n/plugin Bundle-RequiredExecutionEnvironment: JavaSE-17 -Import-Package: jakarta.servlet;version="[5.0.0,6.0.0)", +Import-Package: jakarta.servlet;version="[6.0.0,7.0.0)", org.apache.commons.logging;version="[1.2,2.0)", - org.eclipse.jetty.server;version="[11.0.0,12.0.0)", - org.eclipse.jetty.server.handler;version="[11.0.0,12.0.0)", - org.eclipse.jetty.servlet;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util;version="[11.0.0,12.0.0)", - org.eclipse.jetty.util.component;version="[11.0.0,12.0.0)", + org.eclipse.jetty.ee10.servlet;version="[12.0.0,13.0.0)", + org.eclipse.jetty.server;version="[12.0.0,13.0.0)", + org.eclipse.jetty.server.handler;version="[12.0.0,13.0.0)", + org.eclipse.jetty.util;version="[12.0.0,13.0.0)", + org.eclipse.jetty.util.component;version="[12.0.0,13.0.0)", org.eclipse.jgit.api;version="[7.0.0,7.1.0)", org.eclipse.jgit.api.errors;version="[7.0.0,7.1.0)", org.eclipse.jgit.archive;version="[7.0.0,7.1.0)", diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml index a33dcbaca1..7cd76c3011 100644 --- a/org.eclipse.jgit.pgm/pom.xml +++ b/org.eclipse.jgit.pgm/pom.xml @@ -107,8 +107,8 @@ - org.eclipse.jetty - jetty-servlet + org.eclipse.jetty.ee10 + jetty-ee10-servlet diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java index 653530d11a..757c435722 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java @@ -26,8 +26,8 @@ import org.eclipse.jetty.server.HttpConnectionFactory; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.handler.ContextHandlerCollection; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.lfs.server.LargeFileRepository; import org.eclipse.jgit.lfs.server.LfsProtocolServlet; diff --git a/pom.xml b/pom.xml index 86bf9bf502..590dffa7c5 100644 --- a/pom.xml +++ b/pom.xml @@ -129,8 +129,8 @@ 2.33 1.26.0 6.0.0 - 5.0.0 - 11.0.20 + 6.0.0 + 12.0.9 0.18.5 4.5.14 4.4.16 @@ -896,9 +896,15 @@ true + + org.eclipse.jetty.ee10 + jetty-ee10-servlet + ${jetty-version} + + org.eclipse.jetty - jetty-servlet + jetty-session ${jetty-version} -- 2.39.5