From bd0524c62d4af1a547de30f583eea83432e0fd91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Wed, 11 Oct 2023 14:56:22 +0300 Subject: [PATCH] Port to Jetty 12 --- tycho-core/pom.xml | 6 +++--- .../java/org/eclipse/tycho/test/util/HttpServer.java | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tycho-core/pom.xml b/tycho-core/pom.xml index 6d410a8630..0d21234b6d 100644 --- a/tycho-core/pom.xml +++ b/tycho-core/pom.xml @@ -23,7 +23,7 @@ Tycho Core Core Tycho components - 11.0.17 + 12.0.2 @@ -306,8 +306,8 @@ test - org.eclipse.jetty - jetty-servlet + org.eclipse.jetty.ee10 + jetty-ee10-servlet ${jetty.version} test diff --git a/tycho-core/src/test/java/org/eclipse/tycho/test/util/HttpServer.java b/tycho-core/src/test/java/org/eclipse/tycho/test/util/HttpServer.java index de38c7aa55..349435efe5 100644 --- a/tycho-core/src/test/java/org/eclipse/tycho/test/util/HttpServer.java +++ b/tycho-core/src/test/java/org/eclipse/tycho/test/util/HttpServer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Sonatype Inc. and others. + * Copyright (c) 2008, 2023 Sonatype Inc. and others. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -22,10 +22,10 @@ import java.util.Random; import java.util.concurrent.TimeUnit; +import org.eclipse.jetty.ee10.servlet.ServletContextHandler; +import org.eclipse.jetty.ee10.servlet.ServletHolder; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; import org.junit.rules.ExternalResource; public class HttpServer extends ExternalResource { @@ -97,8 +97,8 @@ private static RunningServer startServerOnPort(int port) throws Exception { connector.setPort(port); jetty.addConnector(connector); - ServletContextHandler context; - context = new ServletContextHandler(jetty, "/", 0); + ServletContextHandler context = new ServletContextHandler("/", 0); + jetty.setHandler(context); jetty.start(); return new RunningServer(port, jetty, context);