From a286943a718210e8cf3fcbe699b719f88d57113f Mon Sep 17 00:00:00 2001 From: Grzegorz Grzybek Date: Wed, 21 Jun 2023 16:18:16 +0200 Subject: [PATCH] [#1802] Switch samples-config from javax to jakarta --- samples/samples-config/showcase/pom.xml | 24 +++++++++---------- .../config/commands/HttpServiceShowcase.java | 12 +++++----- .../config/commands/WhiteboardShowcase.java | 10 ++++---- .../config/commands/web/TestServlet.java | 8 +++---- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/samples/samples-config/showcase/pom.xml b/samples/samples-config/showcase/pom.xml index 62fa9a4904..5e9fc650bd 100644 --- a/samples/samples-config/showcase/pom.xml +++ b/samples/samples-config/showcase/pom.xml @@ -60,23 +60,23 @@ - - javax.servlet;version="[3.1,5)", - javax.servlet.http;version="[3.1,5)", + + jakarta.servlet;version="[6,7)", + jakarta.servlet.http;version="[6,7)", - - org.osgi.framework;version="[1.8,2)", + + org.osgi.framework;version="[1.10,2)", + org.osgi.framework.dto;version="[1.8,2)", org.osgi.util.tracker;version="[1.5,2)", - org.osgi.framework.dto, - org.osgi.service.http;version="[1.2,2)", - org.osgi.service.http.runtime, - org.osgi.service.http.runtime.dto, - org.osgi.service.http.context, + org.osgi.service.servlet.runtime, + org.osgi.service.servlet.runtime.dto, + org.osgi.service.servlet.context, org.ops4j.pax.web.service;version="${pax-web.osgi.version}", + org.ops4j.pax.web.service.http;version="${pax-web.osgi.version}", org.ops4j.pax.web.service.spi.model;version="${pax-web.osgi.version}", @@ -121,7 +121,7 @@ org.osgi - osgi.cmpn + org.osgi.service.servlet provided @@ -131,7 +131,7 @@ provided - + jakarta.servlet diff --git a/samples/samples-config/showcase/src/main/java/org/ops4j/pax/web/samples/config/commands/HttpServiceShowcase.java b/samples/samples-config/showcase/src/main/java/org/ops4j/pax/web/samples/config/commands/HttpServiceShowcase.java index 8976ebc256..3299d6632e 100644 --- a/samples/samples-config/showcase/src/main/java/org/ops4j/pax/web/samples/config/commands/HttpServiceShowcase.java +++ b/samples/samples-config/showcase/src/main/java/org/ops4j/pax/web/samples/config/commands/HttpServiceShowcase.java @@ -23,7 +23,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javax.servlet.ServletException; +import jakarta.servlet.ServletException; import org.apache.karaf.shell.api.action.Action; import org.apache.karaf.shell.api.action.Argument; @@ -38,11 +38,11 @@ import org.ops4j.pax.web.service.spi.model.ServerModel; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; -import org.osgi.service.http.HttpContext; -import org.osgi.service.http.HttpService; -import org.osgi.service.http.NamespaceException; -import org.osgi.service.http.runtime.HttpServiceRuntime; -import org.osgi.service.http.runtime.HttpServiceRuntimeConstants; +import org.ops4j.pax.web.service.http.HttpContext; +import org.ops4j.pax.web.service.http.HttpService; +import org.ops4j.pax.web.service.http.NamespaceException; +import org.osgi.service.servlet.runtime.HttpServiceRuntime; +import org.osgi.service.servlet.runtime.HttpServiceRuntimeConstants; @Command(scope = "sample", name = "hs", description = "Registration/Unregistration using pure HttpService") @Service diff --git a/samples/samples-config/showcase/src/main/java/org/ops4j/pax/web/samples/config/commands/WhiteboardShowcase.java b/samples/samples-config/showcase/src/main/java/org/ops4j/pax/web/samples/config/commands/WhiteboardShowcase.java index 164c6f72fb..eb75732ff2 100644 --- a/samples/samples-config/showcase/src/main/java/org/ops4j/pax/web/samples/config/commands/WhiteboardShowcase.java +++ b/samples/samples-config/showcase/src/main/java/org/ops4j/pax/web/samples/config/commands/WhiteboardShowcase.java @@ -26,7 +26,7 @@ import java.util.Set; import java.util.TreeSet; import java.util.regex.Pattern; -import javax.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServlet; import org.apache.karaf.shell.api.action.Action; import org.apache.karaf.shell.api.action.Argument; @@ -43,10 +43,10 @@ import org.osgi.framework.InvalidSyntaxException; import org.osgi.framework.ServiceReference; import org.osgi.framework.ServiceRegistration; -import org.osgi.service.http.context.ServletContextHelper; -import org.osgi.service.http.runtime.HttpServiceRuntime; -import org.osgi.service.http.runtime.HttpServiceRuntimeConstants; -import org.osgi.service.http.whiteboard.HttpWhiteboardConstants; +import org.osgi.service.servlet.context.ServletContextHelper; +import org.osgi.service.servlet.runtime.HttpServiceRuntime; +import org.osgi.service.servlet.runtime.HttpServiceRuntimeConstants; +import org.osgi.service.servlet.whiteboard.HttpWhiteboardConstants; @Command(scope = "sample", name = "whiteboard", description = "Registration/Unregistration using Whiteboard") @Service diff --git a/samples/samples-config/showcase/src/main/java/org/ops4j/pax/web/samples/config/commands/web/TestServlet.java b/samples/samples-config/showcase/src/main/java/org/ops4j/pax/web/samples/config/commands/web/TestServlet.java index 4239254be6..7a6a476259 100644 --- a/samples/samples-config/showcase/src/main/java/org/ops4j/pax/web/samples/config/commands/web/TestServlet.java +++ b/samples/samples-config/showcase/src/main/java/org/ops4j/pax/web/samples/config/commands/web/TestServlet.java @@ -17,10 +17,10 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletContext; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.ops4j.pax.web.service.spi.model.OsgiContextModel; import org.ops4j.pax.web.service.spi.servlet.OsgiScopedServletContext;