Skip to content

Commit

Permalink
[#1802] Switch samples-whiteboard from javax to jakarta
Browse files Browse the repository at this point in the history
  • Loading branch information
grgrzybek committed Jun 21, 2023
1 parent b03892b commit 103c058
Show file tree
Hide file tree
Showing 61 changed files with 312 additions and 281 deletions.
2 changes: 1 addition & 1 deletion samples/samples-whiteboard/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<module>whiteboard-blueprint</module>
<module>whiteboard-scopes</module>
<module>whiteboard-extended</module>
<module>whiteboard-ds-jaxrs</module>
<!-- <module>whiteboard-ds-jaxrs</module>-->
<module>whiteboard-1</module>
<module>whiteboard-2</module>
<module>whiteboard-3</module>
Expand Down
12 changes: 6 additions & 6 deletions samples/samples-whiteboard/whiteboard-1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@
<instructions>
<Bundle-Activator>org.ops4j.pax.web.extender.samples.whiteboard.internal.Activator</Bundle-Activator>
<Import-Package>
<!-- ranges indicate Servlet API 3.1+ (JavaEE 7+) -->
javax.servlet;version="[3.1,5)",
javax.servlet.http;version="[3.1,5)",
<!-- ranges indicate Servlet API 3.1+ (JakartaEE 7+) -->
jakarta.servlet;version="[3.1,5)",
jakarta.servlet.http;version="[3.1,5)",

<!-- ranges indicate we can work with OSGi Core R6+ -->
org.osgi.framework;version="[1.8,2)",
org.osgi.util.tracker;version="[1.5,2)",

<!-- OSGi cmpn -->
org.osgi.service.http;version="[1.2,2)",
org.osgi.service.http.context;version="[1.1,2)",
org.osgi.service.servlet.context;version="[1.1,2)",

<!-- from pax-web -->
org.ops4j.pax.web.service.whiteboard,
Expand Down Expand Up @@ -91,11 +91,11 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
<artifactId>org.osgi.service.servlet</artifactId>
<scope>provided</scope>
</dependency>

<!-- JavaEE -->
<!-- JakartaEE -->

<dependency>
<groupId>jakarta.servlet</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

import java.util.Dictionary;
import java.util.Hashtable;
import javax.servlet.Servlet;
import jakarta.servlet.Servlet;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.http.context.ServletContextHelper;
import org.osgi.service.http.whiteboard.HttpWhiteboardConstants;
import org.osgi.service.servlet.context.ServletContextHelper;
import org.osgi.service.servlet.whiteboard.HttpWhiteboardConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

public class WhiteboardServlet extends HttpServlet {

Expand Down
12 changes: 6 additions & 6 deletions samples/samples-whiteboard/whiteboard-2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@
<instructions>
<Bundle-Activator>org.ops4j.pax.web.extender.samples.whiteboard.internal.Activator</Bundle-Activator>
<Import-Package>
<!-- ranges indicate Servlet API 3.1+ (JavaEE 7+) -->
javax.servlet;version="[3.1,5)",
javax.servlet.http;version="[3.1,5)",
<!-- ranges indicate Servlet API 3.1+ (JakartaEE 7+) -->
jakarta.servlet;version="[3.1,5)",
jakarta.servlet.http;version="[3.1,5)",

<!-- ranges indicate we can work with OSGi Core R6+ -->
org.osgi.framework;version="[1.8,2)",
org.osgi.util.tracker;version="[1.5,2)",

<!-- OSGi cmpn -->
org.osgi.service.http;version="[1.2,2)",
org.osgi.service.http.context;version="[1.1,2)",
org.osgi.service.servlet.context;version="[1.1,2)",

<!-- from pax-web -->
org.ops4j.pax.web.service.whiteboard,
Expand Down Expand Up @@ -91,11 +91,11 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
<artifactId>org.osgi.service.servlet</artifactId>
<scope>provided</scope>
</dependency>

<!-- JavaEE -->
<!-- JakartaEE -->

<dependency>
<groupId>jakarta.servlet</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.http.context.ServletContextHelper;
import org.osgi.service.http.whiteboard.HttpWhiteboardConstants;
import org.osgi.service.servlet.context.ServletContextHelper;
import org.osgi.service.servlet.whiteboard.HttpWhiteboardConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Dictionary;
import java.util.Hashtable;
Expand Down
12 changes: 6 additions & 6 deletions samples/samples-whiteboard/whiteboard-3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@
<instructions>
<Bundle-Activator>org.ops4j.pax.web.extender.samples.whiteboard.internal.Activator</Bundle-Activator>
<Import-Package>
<!-- ranges indicate Servlet API 3.1+ (JavaEE 7+) -->
javax.servlet;version="[3.1,5)",
javax.servlet.http;version="[3.1,5)",
<!-- ranges indicate Servlet API 3.1+ (JakartaEE 7+) -->
jakarta.servlet;version="[3.1,5)",
jakarta.servlet.http;version="[3.1,5)",

<!-- ranges indicate we can work with OSGi Core R6+ -->
org.osgi.framework;version="[1.8,2)",
org.osgi.util.tracker;version="[1.5,2)",

<!-- OSGi cmpn -->
org.osgi.service.http;version="[1.2,2)",
org.osgi.service.http.context;version="[1.1,2)",
org.osgi.service.servlet.context;version="[1.1,2)",

<!-- from pax-web -->
org.ops4j.pax.web.service.whiteboard,
Expand Down Expand Up @@ -91,11 +91,11 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
<artifactId>org.osgi.service.servlet</artifactId>
<scope>provided</scope>
</dependency>

<!-- JavaEE -->
<!-- JakartaEE -->

<dependency>
<groupId>jakarta.servlet</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.http.whiteboard.HttpWhiteboardConstants;
import org.osgi.service.servlet.whiteboard.HttpWhiteboardConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.Servlet;
import jakarta.servlet.Servlet;
import java.util.Dictionary;
import java.util.Hashtable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

public class WhiteboardServlet extends HttpServlet {

Expand Down
15 changes: 10 additions & 5 deletions samples/samples-whiteboard/whiteboard-annotated/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
<configuration>
<instructions>
<Import-Package>
<!-- ranges indicate Servlet API 3.1+ (JavaEE 7+) -->
javax.servlet;version="[3.1,5)",
javax.servlet.http;version="[3.1,5)",
<!-- ranges indicate Servlet API 3.1+ (JakartaEE 7+) -->
jakarta.servlet;version="[3.1,5)",
jakarta.servlet.http;version="[3.1,5)",

<!-- ranges indicate we can work with OSGi Core R6+ -->
org.osgi.framework;version="[1.8,2)",
Expand Down Expand Up @@ -90,11 +90,16 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
<artifactId>org.osgi.service.servlet</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.component.annotations</artifactId>
<scope>provided</scope>
</dependency>

<!-- JavaEE -->
<!-- JakartaEE -->

<dependency>
<groupId>jakarta.servlet</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package org.ops4j.pax.web.extender.samples.whiteboard.internal;

import org.osgi.service.component.annotations.Component;
import org.osgi.service.http.whiteboard.propertytypes.HttpWhiteboardResource;
import org.osgi.service.servlet.whiteboard.propertytypes.HttpWhiteboardResource;

@Component(service = WhiteboardResource.class)
@HttpWhiteboardResource(pattern = "/*", prefix = "/static")
Expand Down
10 changes: 5 additions & 5 deletions samples/samples-whiteboard/whiteboard-blueprint-jaxrs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
<configuration>
<instructions>
<Import-Package>
<!-- ranges indicate Servlet API 3.1+ (JavaEE 7+) -->
javax.servlet;version="[3.1,5)",
javax.servlet.http;version="[3.1,5)",
<!-- ranges indicate Servlet API 3.1+ (JakartaEE 7+) -->
jakarta.servlet;version="[3.1,5)",
jakarta.servlet.http;version="[3.1,5)",

javax.ws.rs,
javax.ws.rs.core,
Expand Down Expand Up @@ -86,11 +86,11 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
<artifactId>org.osgi.service.servlet</artifactId>
<scope>provided</scope>
</dependency>

<!-- JavaEE -->
<!-- JakartaEE -->

<dependency>
<groupId>jakarta.servlet</groupId>
Expand Down
10 changes: 5 additions & 5 deletions samples/samples-whiteboard/whiteboard-blueprint/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
<configuration>
<instructions>
<Import-Package>
<!-- ranges indicate Servlet API 3.1+ (JavaEE 7+) -->
javax.servlet;version="[3.1,5)",
javax.servlet.http;version="[3.1,5)",
<!-- ranges indicate Servlet API 3.1+ (JakartaEE 7+) -->
jakarta.servlet;version="[3.1,5)",
jakarta.servlet.http;version="[3.1,5)",

<!-- ranges indicate we can work with OSGi Core R6+ -->
org.osgi.framework;version="[1.8,2)",
Expand Down Expand Up @@ -89,11 +89,11 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
<artifactId>org.osgi.service.servlet</artifactId>
<scope>provided</scope>
</dependency>

<!-- JavaEE -->
<!-- JakartaEE -->

<dependency>
<groupId>jakarta.servlet</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

/**
* Servlet that either throws and exception if errorException request parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

import java.io.IOException;
import java.net.URL;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import org.osgi.service.http.HttpContext;
import org.ops4j.pax.web.service.http.HttpContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

import java.io.IOException;
import java.util.Date;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import jakarta.servlet.Filter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.FilterConfig;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.ops4j.pax.web.extender.samples.whiteboard.internal;

import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
import jakarta.servlet.ServletRequestEvent;
import jakarta.servlet.ServletRequestListener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
package org.ops4j.pax.web.extender.samples.whiteboard.internal;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

public class WhiteboardServlet extends HttpServlet {

Expand Down
Loading

0 comments on commit 103c058

Please sign in to comment.