Remove Jersey 3.x incompatible extension modules Signed-off-by: Jan Supol <jan.supol@oracle.com>
diff --git a/examples/pom.xml b/examples/pom.xml index ba3e4c3..840bced 100644 --- a/examples/pom.xml +++ b/examples/pom.xml
@@ -78,8 +78,8 @@ <module>helloworld-pure-jax-rs</module> <module>helloworld-webapp</module> <module>helloworld-weld</module> - <module>helloworld-spring-webapp</module> - <module>helloworld-spring-annotations</module> +<!-- <module>helloworld-spring-webapp</module>--> +<!-- <module>helloworld-spring-annotations</module>--> <module>http-patch</module> <module>http-trace</module> <module>https-clientserver-grizzly</module> @@ -89,8 +89,8 @@ <module>jaxrs-types-injection</module> <module>jersey-ejb</module> <module>json-binding-webapp</module> - <module>json-jackson</module> - <module>json-jettison</module> +<!-- <module>json-jackson</module>--> +<!-- <module>json-jettison</module>--> <module>json-moxy</module> <!-- <module>json-processing-webapp</module> JSONP--> <module>json-with-padding</module>
diff --git a/ext/pom.xml b/ext/pom.xml index 2213741..7fe8970 100644 --- a/ext/pom.xml +++ b/ext/pom.xml
@@ -51,11 +51,14 @@ <module>mvc-mustache</module> <module>proxy-client</module> <module>rx</module> - <module>servlet-portability</module> + <!-- do not release spring 4 and spring 5 modules with Jersey 3.x <module>spring4</module> <module>spring5</module> + --> <module>wadl-doclet</module> + <!-- do not release MP modules with Jersey 3.x <module>microprofile</module> + --> </modules> <dependencies>
diff --git a/ext/servlet-portability/pom.xml b/ext/servlet-portability/pom.xml deleted file mode 100644 index bc2b4d5..0000000 --- a/ext/servlet-portability/pom.xml +++ /dev/null
@@ -1,77 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. - - This program and the accompanying materials are made available under the - terms of the Eclipse Public License v. 2.0, which is available at - http://www.eclipse.org/legal/epl-2.0. - - This Source Code may also be made available under the following Secondary - Licenses when the conditions for such availability set forth in the - Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - version 2 with the GNU Classpath Exception, which is available at - https://www.gnu.org/software/classpath/license.html. - - SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ---> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <artifactId>project</artifactId> - <groupId>org.glassfish.jersey.ext</groupId> - <version>3.0.0-SNAPSHOT</version> - </parent> - - <artifactId>jersey-servlet-portability</artifactId> - <packaging>jar</packaging> - <name>jersey-ext-servlet-portability</name> - - <description> - Library that enables writing web applications that run with both Jersey 1.x and Jersey 2.x servlet containers. - </description> - - <build> - <plugins> - <plugin> - <groupId>com.sun.istack</groupId> - <artifactId>istack-commons-maven-plugin</artifactId> - <inherited>true</inherited> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <inherited>true</inherited> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>jakarta.ws.rs</groupId> - <artifactId>jakarta.ws.rs-api</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-servlet</artifactId> - <version>${jersey1.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.glassfish.jersey.containers</groupId> - <artifactId>jersey-container-servlet-core</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>jakarta.servlet</groupId> - <artifactId>jakarta.servlet-api</artifactId> - <version>${servlet5.version}</version> - <scope>provided</scope> - </dependency> - </dependencies> -</project>
diff --git a/ext/servlet-portability/src/main/java/org/glassfish/jersey/servlet/portability/PortableServletContainer.java b/ext/servlet-portability/src/main/java/org/glassfish/jersey/servlet/portability/PortableServletContainer.java deleted file mode 100644 index c37cdf2..0000000 --- a/ext/servlet-portability/src/main/java/org/glassfish/jersey/servlet/portability/PortableServletContainer.java +++ /dev/null
@@ -1,228 +0,0 @@ -/* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.servlet.portability; - -import java.io.IOException; -import java.util.Collections; -import java.util.Enumeration; -import java.util.HashMap; - -import jakarta.servlet.Filter; -import jakarta.servlet.FilterChain; -import jakarta.servlet.FilterConfig; -import jakarta.servlet.Servlet; -import jakarta.servlet.ServletConfig; -import jakarta.servlet.ServletContext; -import jakarta.servlet.ServletException; -import jakarta.servlet.ServletRequest; -import jakarta.servlet.ServletResponse; - -/** - * Jersey Servlet/Filter class that can be referenced in web.xml instead of Jersey 1.x specific - * {@code com.sun.jersey.spi.container.servlet.ServletContainer} and Jersey 2.x specific - * {@link org.glassfish.jersey.servlet.ServletContainer} to enable web application portability between - * Jersey 1.x and Jersey 2.x servlet containers. - * <p> - * Since for some of the {@link org.glassfish.jersey.servlet.ServletProperties servlet init parameters} that can be - * specified in web.xml you may want different values depending on which version of Jersey container is present, - * You can prefix the init parameter name either with {@code jersey1#} or {@code jersey2#} to - * make it specific to a given version. For example, to specify different values for - * {@code jakarta.ws.rs.Application} init parameter depending on the version of Jersey used, you can include - * the following in your web.xml: - * <pre> - * <servlet> - * <servlet-name>Jersey Web Application</servlet-name> - * <servlet-class>org.glassfish.jersey.servlet.portability.PortableServletContainer</servlet-class> - * <init-param> - * <param-name>jersey1#jakarta.ws.rs.Application</param-name> - * <param-value>myapp.jersey1specific.Jersey1Application</param-value> - * </init-param> - * <init-param> - * <param-name>jersey2#jakarta.ws.rs.Application</param-name> - * <param-value>myapp.jersey2specific.Jersey2Application</param-value> - * </init-param> - * </servlet> - * </pre> - * </p> - * - * @author Martin Matula - */ -public class PortableServletContainer implements Filter, Servlet { - - private static final String JERSEY_1_PREFIX = "jersey1#"; - private static final String JERSEY_2_PREFIX = "jersey2#"; - - private final Servlet wrappedServlet; - private final Filter wrappedFilter; - private final String includePrefix; - private final String excludePrefix; - - /** - * Create a new servlet container. - */ - @SuppressWarnings("unchecked") - public PortableServletContainer() { - Class<Servlet> servletClass; - boolean isJersey1 = false; - try { - servletClass = (Class<Servlet>) Class.forName("com.sun.jersey.spi.container.servlet.ServletContainer"); - isJersey1 = true; - } catch (ClassNotFoundException e) { - // Jersey 1.x not present, try Jersey 2.x - try { - servletClass = (Class<Servlet>) Class.forName("org.glassfish.jersey.servlet.ServletContainer"); - } catch (ClassNotFoundException ex) { - throw new IllegalStateException(LocalizationMessages.JERSEY_NOT_AVAILABLE()); - } - } - - try { - wrappedServlet = servletClass.newInstance(); - wrappedFilter = (Filter) wrappedServlet; - } catch (Exception e) { - throw new RuntimeException(LocalizationMessages.JERSEY_CONTAINER_CANT_LOAD(), e); - } - includePrefix = isJersey1 ? JERSEY_1_PREFIX : JERSEY_2_PREFIX; - excludePrefix = isJersey1 ? JERSEY_2_PREFIX : JERSEY_1_PREFIX; - } - - @Override - public void init(final FilterConfig filterConfig) throws ServletException { - wrappedFilter.init(new FilterConfigWrapper(filterConfig)); - } - - @Override - public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) - throws IOException, ServletException { - wrappedFilter.doFilter(request, response, chain); - } - - @Override - public void init(ServletConfig config) throws ServletException { - wrappedServlet.init(new ServletConfigWrapper(config)); - } - - @Override - public ServletConfig getServletConfig() { - return wrappedServlet.getServletConfig(); - } - - @Override - public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException { - wrappedServlet.service(req, res); - } - - @Override - public String getServletInfo() { - return wrappedServlet.getServletInfo(); - } - - @Override - public void destroy() { - wrappedServlet.destroy(); - } - - private abstract class InitParamsWrapper { - - private final HashMap<String, String> filteredInitParams = new HashMap<String, String>(); - - void init() { - for (Enumeration e = getInitParamNames(); e.hasMoreElements(); ) { - String name = (String) e.nextElement(); - String value = getInitParamValue(name); - if (name.startsWith(includePrefix)) { - name = name.substring(includePrefix.length()); - } else if (name.startsWith(excludePrefix)) { - continue; - } - filteredInitParams.put(name, value); - } - } - - abstract String getInitParamValue(String name); - - abstract Enumeration getInitParamNames(); - - public String getInitParameter(String name) { - return filteredInitParams.get(name); - } - - public Enumeration getInitParameterNames() { - return Collections.enumeration(filteredInitParams.keySet()); - } - } - - private class FilterConfigWrapper extends InitParamsWrapper implements FilterConfig { - - private final FilterConfig wrapped; - - FilterConfigWrapper(FilterConfig wrapped) { - this.wrapped = wrapped; - init(); - } - - @Override - public String getFilterName() { - return wrapped.getFilterName(); - } - - @Override - public ServletContext getServletContext() { - return wrapped.getServletContext(); - } - - @Override - String getInitParamValue(String name) { - return wrapped.getInitParameter(name); - } - - @Override - Enumeration getInitParamNames() { - return wrapped.getInitParameterNames(); - } - } - - private class ServletConfigWrapper extends InitParamsWrapper implements ServletConfig { - - private final ServletConfig wrapped; - - ServletConfigWrapper(ServletConfig wrapped) { - this.wrapped = wrapped; - init(); - } - - @Override - String getInitParamValue(String name) { - return wrapped.getInitParameter(name); - } - - @Override - Enumeration getInitParamNames() { - return wrapped.getInitParameterNames(); - } - - @Override - public String getServletName() { - return wrapped.getServletName(); - } - - @Override - public ServletContext getServletContext() { - return wrapped.getServletContext(); - } - } -}
diff --git a/ext/servlet-portability/src/main/java/org/glassfish/jersey/servlet/portability/package-info.java b/ext/servlet-portability/src/main/java/org/glassfish/jersey/servlet/portability/package-info.java deleted file mode 100644 index 2629627..0000000 --- a/ext/servlet-portability/src/main/java/org/glassfish/jersey/servlet/portability/package-info.java +++ /dev/null
@@ -1,21 +0,0 @@ -/* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/** - * Package containing utility classes enabling web applications to be portable between different versions of Jersey - * runtime. - */ -package org.glassfish.jersey.servlet.portability;
diff --git a/ext/servlet-portability/src/main/resources/org.glassfish.jersey.servlet.portability/localization.properties b/ext/servlet-portability/src/main/resources/org.glassfish.jersey.servlet.portability/localization.properties deleted file mode 100644 index 03f03a4..0000000 --- a/ext/servlet-portability/src/main/resources/org.glassfish.jersey.servlet.portability/localization.properties +++ /dev/null
@@ -1,18 +0,0 @@ -# -# Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -jersey.container.cant.load=Unable to instantiate Jersey ServletContainer. -jersey.not.available=No Jersey runtime found on the application classpath.
diff --git a/ext/spring3/src/main/java/org/glassfish/jersey/server/spring/scope/JaxrsServletRequestAttributes.java b/ext/spring3/src/main/java/org/glassfish/jersey/server/spring/scope/JaxrsServletRequestAttributes.java deleted file mode 100644 index e09c3f8..0000000 --- a/ext/spring3/src/main/java/org/glassfish/jersey/server/spring/scope/JaxrsServletRequestAttributes.java +++ /dev/null
@@ -1,55 +0,0 @@ -/* - * Copyright (c) 2016, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.server.spring.scope; - -import jakarta.ws.rs.container.ContainerRequestContext; - -import javax.servlet.http.HttpServletRequest; - -import org.springframework.web.context.request.ServletRequestAttributes; - -/** - * JAX-RS based Spring RequestAttributes implementation for Servlet-based applications. - * - * @author Marek Potociar - */ -class JaxrsServletRequestAttributes extends ServletRequestAttributes { - - private final ContainerRequestContext requestContext; - - /** - * Create a new JAX-RS ServletRequestAttributes instance for the given request. - * - * @param request current HTTP request - * @param requestContext JAX-RS request context - */ - public JaxrsServletRequestAttributes(final HttpServletRequest request, final ContainerRequestContext requestContext) { - super(request); - this.requestContext = requestContext; - } - - @Override - public Object resolveReference(String key) { - if (REFERENCE_REQUEST.equals(key)) { - return this.requestContext; - } else if (REFERENCE_SESSION.equals(key)) { - return super.getSession(true); - } else { - return null; - } - } -}
diff --git a/tests/integration/pom.xml b/tests/integration/pom.xml index c989c1b..55a42c2 100644 --- a/tests/integration/pom.xml +++ b/tests/integration/pom.xml
@@ -87,9 +87,7 @@ <module>jersey-4321</module> <module>jersey-4507</module> <module>jetty-response-close</module> - <module>microprofile</module> -<!-- <module>portability-jersey-1</module>--> <!--TODO remove when Jakartified --> -<!-- <module>portability-jersey-2</module>--> +<!-- <module>microprofile</module> --> <!--TODO remove when Jakartified --> <module>property-check</module> <module>security-digest</module> <module>servlet-2.5-autodiscovery-1</module> @@ -129,8 +127,8 @@ <module>servlet-request-wrapper-binding</module> <module>servlet-tests</module> <module>sonar-test</module> - <module>spring4</module> - <module>spring5</module> +<!-- <module>spring4</module>--> +<!-- <module>spring5</module>--> <module>tracing-support</module> </modules>
diff --git a/tests/integration/portability-jersey-1/pom.xml b/tests/integration/portability-jersey-1/pom.xml deleted file mode 100644 index 9cddefa..0000000 --- a/tests/integration/portability-jersey-1/pom.xml +++ /dev/null
@@ -1,107 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. - - This program and the accompanying materials are made available under the - terms of the Eclipse Public License v. 2.0, which is available at - http://www.eclipse.org/legal/epl-2.0. - - This Source Code may also be made available under the following Secondary - Licenses when the conditions for such availability set forth in the - Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - version 2 with the GNU Classpath Exception, which is available at - https://www.gnu.org/software/classpath/license.html. - - SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ---> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.glassfish.jersey.tests.integration</groupId> - <artifactId>project</artifactId> - <version>3.0-SNAPSHOT</version> - </parent> - - <artifactId>portability-jersey-1</artifactId> - <packaging>war</packaging> - <name>jersey-tests-integration-portability-jersey-1</name> - - <description>Servlet portability test - testing co-bundling with Jersey 1</description> - - <dependencies> - <dependency> - <groupId>org.glassfish.jersey.ext</groupId> - <artifactId>jersey-servlet-portability</artifactId> - </dependency> - <dependency> - <groupId>com.sun.jersey.jersey-test-framework</groupId> - <artifactId>jersey-test-framework-external</artifactId> - <version>${jersey1.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.sun.jersey.jersey-test-framework</groupId> - <artifactId>jersey-test-framework-core</artifactId> - <version>${jersey1.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.glassfish.jersey.core</groupId> - <artifactId>jersey-server</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-servlet</artifactId> - <version>${jersey1.version}</version> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <configuration> - <classpathDependencyExcludes> <!-- this is to ensure only one Jersey version is present in the classpath --> - <classpathDependencyExclude>org.glassfish.jersey.core:jersey-common</classpathDependencyExclude> - <classpathDependencyExclude>org.glassfish.jersey.core:jersey-server</classpathDependencyExclude> - <classpathDependencyExclude>org.glassfish.jersey.core:jersey-client</classpathDependencyExclude> - </classpathDependencyExcludes> - </configuration> - </plugin> - <plugin> - <groupId>org.mortbay.jetty</groupId> - <artifactId>jetty-maven-plugin</artifactId> - </plugin> - </plugins> - </build> - <profiles> - <profile> - <id>jdk11+</id> - <activation> - <jdk>[11,)</jdk> - </activation> - <dependencies> - <dependency> - <groupId>jakarta.xml.bind</groupId> - <artifactId>jakarta.xml.bind-api</artifactId> - </dependency> - <dependency> - <groupId>com.sun.xml.bind</groupId> - <artifactId>jaxb-osgi</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - </profile> - </profiles> - -</project>
diff --git a/tests/integration/portability-jersey-1/src/main/java/org/glassfish/jersey/tests/integration/portability/HelloWorldResource.java b/tests/integration/portability-jersey-1/src/main/java/org/glassfish/jersey/tests/integration/portability/HelloWorldResource.java deleted file mode 100644 index 71345e5..0000000 --- a/tests/integration/portability-jersey-1/src/main/java/org/glassfish/jersey/tests/integration/portability/HelloWorldResource.java +++ /dev/null
@@ -1,33 +0,0 @@ -/* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.tests.integration.portability; - -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.Produces; - -/** - * @author Martin Matula - */ -@Path("helloworld") -public class HelloWorldResource { - @GET - @Produces("text/plain") - public String get() { - return "Hello World!"; - } -}
diff --git a/tests/integration/portability-jersey-1/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey1Application.java b/tests/integration/portability-jersey-1/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey1Application.java deleted file mode 100644 index c56b9fa..0000000 --- a/tests/integration/portability-jersey-1/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey1Application.java +++ /dev/null
@@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.tests.integration.portability; - -import com.sun.jersey.api.core.PackagesResourceConfig; - -/** - * @author Martin Matula - */ -public class Jersey1Application extends PackagesResourceConfig { - public Jersey1Application() { - // do the package scanning - super("org.glassfish.jersey.tests.integration.portability"); - - // explicitly add unannotated Jersey 1 specific resource - getExplicitRootResources().put("jersey", Jersey1Resource.class); - } -}
diff --git a/tests/integration/portability-jersey-1/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey1Resource.java b/tests/integration/portability-jersey-1/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey1Resource.java deleted file mode 100644 index 8b2c8a3..0000000 --- a/tests/integration/portability-jersey-1/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey1Resource.java +++ /dev/null
@@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.tests.integration.portability; - -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.MediaType; - -/** - * @author Martin Matula - */ -public class Jersey1Resource { - @GET - @Produces(MediaType.TEXT_PLAIN) - public String getJersey1() { - return "Using Jersey 1.x"; - } -}
diff --git a/tests/integration/portability-jersey-1/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey2Application.java b/tests/integration/portability-jersey-1/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey2Application.java deleted file mode 100644 index 91e0e1b..0000000 --- a/tests/integration/portability-jersey-1/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey2Application.java +++ /dev/null
@@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.tests.integration.portability; - -import org.glassfish.jersey.server.ResourceConfig; -import org.glassfish.jersey.server.model.Resource; - -/** - * @author Martin Matula - */ -public class Jersey2Application extends ResourceConfig { - - public Jersey2Application() { - // do the package scanning - packages("org.glassfish.jersey.tests.integration.portability"); - - // explicitly add unannotated Jersey 2 specific resource - Resource.Builder rb = Resource.builder(Jersey2Resource.class); - registerResources(rb.path("jersey").build()); - } -}
diff --git a/tests/integration/portability-jersey-1/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey2Resource.java b/tests/integration/portability-jersey-1/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey2Resource.java deleted file mode 100644 index 6fc84f1..0000000 --- a/tests/integration/portability-jersey-1/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey2Resource.java +++ /dev/null
@@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.tests.integration.portability; - -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.MediaType; - -/** - * @author Martin Matula - */ -public class Jersey2Resource { - @GET - @Produces(MediaType.TEXT_PLAIN) - public String getJersey2() { - return "Using Jersey 2.x"; - } -}
diff --git a/tests/integration/portability-jersey-1/src/main/webapp/WEB-INF/web.xml b/tests/integration/portability-jersey-1/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d2434ef..0000000 --- a/tests/integration/portability-jersey-1/src/main/webapp/WEB-INF/web.xml +++ /dev/null
@@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. - - This program and the accompanying materials are made available under the - terms of the Eclipse Public License v. 2.0, which is available at - http://www.eclipse.org/legal/epl-2.0. - - This Source Code may also be made available under the following Secondary - Licenses when the conditions for such availability set forth in the - Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - version 2 with the GNU Classpath Exception, which is available at - https://www.gnu.org/software/classpath/license.html. - - SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ---> - -<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> - <servlet> - <servlet-name>Jersey Web Application</servlet-name> - <servlet-class>org.glassfish.jersey.servlet.portability.PortableServletContainer</servlet-class> - <init-param> - <param-name>jersey1#com.sun.jersey.config.property.resourceConfigClass</param-name> - <param-value>org.glassfish.jersey.tests.integration.portability.Jersey1Application</param-value> - </init-param> - <init-param> - <param-name>jersey2#jakarta.ws.rs.Application</param-name> - <param-value>org.glassfish.jersey.tests.integration.portability.Jersey2Application</param-value> - </init-param> - <load-on-startup>1</load-on-startup> - </servlet> - <servlet-mapping> - <servlet-name>Jersey Web Application</servlet-name> - <url-pattern>/*</url-pattern> - </servlet-mapping> -</web-app>
diff --git a/tests/integration/portability-jersey-1/src/test/java/org/glassfish/jersey/tests/integration/portability/PortabilityITCase.java b/tests/integration/portability-jersey-1/src/test/java/org/glassfish/jersey/tests/integration/portability/PortabilityITCase.java deleted file mode 100644 index 8d805e8..0000000 --- a/tests/integration/portability-jersey-1/src/test/java/org/glassfish/jersey/tests/integration/portability/PortabilityITCase.java +++ /dev/null
@@ -1,89 +0,0 @@ -/* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.tests.integration.portability; - -import com.sun.jersey.api.client.ClientResponse; -import com.sun.jersey.test.framework.AppDescriptor; -import com.sun.jersey.test.framework.JerseyTest; -import com.sun.jersey.test.framework.WebAppDescriptor; -import com.sun.jersey.test.framework.spi.container.TestContainerException; -import com.sun.jersey.test.framework.spi.container.TestContainerFactory; -import com.sun.jersey.test.framework.spi.container.external.ExternalTestContainerFactory; - -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * @author Martin Matula - */ -public class PortabilityITCase extends JerseyTest { - - @Override - protected AppDescriptor configure() { - return new WebAppDescriptor.Builder().build(); - } - - @Override - protected TestContainerFactory getTestContainerFactory() throws TestContainerException { - return new ExternalTestContainerFactory(); - } - - @Test - public void testHelloWorld() throws Exception { - String s = resource().path("helloworld").get(String.class); - assertEquals("Hello World!", s); - } - - @Test - public void testJersey() { - ClientResponse r = resource().path("jersey").get(ClientResponse.class); - assertEquals(200, r.getStatus()); - assertEquals("Using Jersey 1.x", r.getEntity(String.class)); - } - - /** - * The whole project is setup for Jersey 2. Need to get the effective port number - * from Jersey 2 properties to make Hudson happy. - * - * @param defaultPort to use if no other configuration is available - * @return port number to use by the client - */ - @Override - protected int getPort(int defaultPort) { - - String port = System.getProperty("jersey.config.test.container.port"); - if (null != port) { - try { - return Integer.parseInt(port); - } catch (NumberFormatException e) { - throw new TestContainerException("jersey.config.test.container.port with a " - + "value of \"" + port + "\" is not a valid integer.", e); - } - } - - port = System.getProperty("JERSEY_TEST_PORT"); - if (null != port) { - try { - return Integer.parseInt(port); - } catch (NumberFormatException e) { - throw new TestContainerException("JERSEY_TEST_PORT with a " - + "value of \"" + port + "\" is not a valid integer.", e); - } - } - return defaultPort; - } -}
diff --git a/tests/integration/portability-jersey-2/pom.xml b/tests/integration/portability-jersey-2/pom.xml deleted file mode 100644 index 62fa63b..0000000 --- a/tests/integration/portability-jersey-2/pom.xml +++ /dev/null
@@ -1,81 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. - - This program and the accompanying materials are made available under the - terms of the Eclipse Public License v. 2.0, which is available at - http://www.eclipse.org/legal/epl-2.0. - - This Source Code may also be made available under the following Secondary - Licenses when the conditions for such availability set forth in the - Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - version 2 with the GNU Classpath Exception, which is available at - https://www.gnu.org/software/classpath/license.html. - - SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ---> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.glassfish.jersey.tests.integration</groupId> - <artifactId>project</artifactId> - <version>3.0-SNAPSHOT</version> - </parent> - - <artifactId>portability-jersey-2</artifactId> - <packaging>war</packaging> - <name>jersey-tests-integration-portability-jersey-2</name> - - <description>Servlet portability test - testing co-bundling with Jersey 2</description> - - <dependencies> - <dependency> - <groupId>org.glassfish.jersey.ext</groupId> - <artifactId>jersey-servlet-portability</artifactId> - </dependency> - <dependency> - <groupId>org.glassfish.jersey.test-framework.providers</groupId> - <artifactId>jersey-test-framework-provider-external</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.glassfish.jersey.containers</groupId> - <artifactId>jersey-container-servlet-core</artifactId> - </dependency> - <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-servlet</artifactId> - <version>${jersey1.version}</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <configuration> - <classpathDependencyExcludes> <!-- this is to ensure only one Jersey version is present in the classpath --> - <classpathDependencyExclude>com.sun.jersey:jersey-core</classpathDependencyExclude> - <classpathDependencyExclude>com.sun.jersey:jersey-server</classpathDependencyExclude> - <classpathDependencyExclude>com.sun.jersey:jersey-servlet</classpathDependencyExclude> - </classpathDependencyExcludes> - </configuration> - </plugin> - <plugin> - <groupId>org.mortbay.jetty</groupId> - <artifactId>jetty-maven-plugin</artifactId> - </plugin> - </plugins> - </build> - -</project>
diff --git a/tests/integration/portability-jersey-2/src/main/java/org/glassfish/jersey/tests/integration/portability/HelloWorldResource.java b/tests/integration/portability-jersey-2/src/main/java/org/glassfish/jersey/tests/integration/portability/HelloWorldResource.java deleted file mode 100644 index 71345e5..0000000 --- a/tests/integration/portability-jersey-2/src/main/java/org/glassfish/jersey/tests/integration/portability/HelloWorldResource.java +++ /dev/null
@@ -1,33 +0,0 @@ -/* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.tests.integration.portability; - -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.Produces; - -/** - * @author Martin Matula - */ -@Path("helloworld") -public class HelloWorldResource { - @GET - @Produces("text/plain") - public String get() { - return "Hello World!"; - } -}
diff --git a/tests/integration/portability-jersey-2/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey1Application.java b/tests/integration/portability-jersey-2/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey1Application.java deleted file mode 100644 index c56b9fa..0000000 --- a/tests/integration/portability-jersey-2/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey1Application.java +++ /dev/null
@@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.tests.integration.portability; - -import com.sun.jersey.api.core.PackagesResourceConfig; - -/** - * @author Martin Matula - */ -public class Jersey1Application extends PackagesResourceConfig { - public Jersey1Application() { - // do the package scanning - super("org.glassfish.jersey.tests.integration.portability"); - - // explicitly add unannotated Jersey 1 specific resource - getExplicitRootResources().put("jersey", Jersey1Resource.class); - } -}
diff --git a/tests/integration/portability-jersey-2/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey1Resource.java b/tests/integration/portability-jersey-2/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey1Resource.java deleted file mode 100644 index 8b2c8a3..0000000 --- a/tests/integration/portability-jersey-2/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey1Resource.java +++ /dev/null
@@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.tests.integration.portability; - -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.MediaType; - -/** - * @author Martin Matula - */ -public class Jersey1Resource { - @GET - @Produces(MediaType.TEXT_PLAIN) - public String getJersey1() { - return "Using Jersey 1.x"; - } -}
diff --git a/tests/integration/portability-jersey-2/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey2Application.java b/tests/integration/portability-jersey-2/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey2Application.java deleted file mode 100644 index 91e0e1b..0000000 --- a/tests/integration/portability-jersey-2/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey2Application.java +++ /dev/null
@@ -1,35 +0,0 @@ -/* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.tests.integration.portability; - -import org.glassfish.jersey.server.ResourceConfig; -import org.glassfish.jersey.server.model.Resource; - -/** - * @author Martin Matula - */ -public class Jersey2Application extends ResourceConfig { - - public Jersey2Application() { - // do the package scanning - packages("org.glassfish.jersey.tests.integration.portability"); - - // explicitly add unannotated Jersey 2 specific resource - Resource.Builder rb = Resource.builder(Jersey2Resource.class); - registerResources(rb.path("jersey").build()); - } -}
diff --git a/tests/integration/portability-jersey-2/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey2Resource.java b/tests/integration/portability-jersey-2/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey2Resource.java deleted file mode 100644 index 6fc84f1..0000000 --- a/tests/integration/portability-jersey-2/src/main/java/org/glassfish/jersey/tests/integration/portability/Jersey2Resource.java +++ /dev/null
@@ -1,32 +0,0 @@ -/* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.tests.integration.portability; - -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.MediaType; - -/** - * @author Martin Matula - */ -public class Jersey2Resource { - @GET - @Produces(MediaType.TEXT_PLAIN) - public String getJersey2() { - return "Using Jersey 2.x"; - } -}
diff --git a/tests/integration/portability-jersey-2/src/main/webapp/WEB-INF/web.xml b/tests/integration/portability-jersey-2/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index d2434ef..0000000 --- a/tests/integration/portability-jersey-2/src/main/webapp/WEB-INF/web.xml +++ /dev/null
@@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. - - This program and the accompanying materials are made available under the - terms of the Eclipse Public License v. 2.0, which is available at - http://www.eclipse.org/legal/epl-2.0. - - This Source Code may also be made available under the following Secondary - Licenses when the conditions for such availability set forth in the - Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - version 2 with the GNU Classpath Exception, which is available at - https://www.gnu.org/software/classpath/license.html. - - SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ---> - -<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> - <servlet> - <servlet-name>Jersey Web Application</servlet-name> - <servlet-class>org.glassfish.jersey.servlet.portability.PortableServletContainer</servlet-class> - <init-param> - <param-name>jersey1#com.sun.jersey.config.property.resourceConfigClass</param-name> - <param-value>org.glassfish.jersey.tests.integration.portability.Jersey1Application</param-value> - </init-param> - <init-param> - <param-name>jersey2#jakarta.ws.rs.Application</param-name> - <param-value>org.glassfish.jersey.tests.integration.portability.Jersey2Application</param-value> - </init-param> - <load-on-startup>1</load-on-startup> - </servlet> - <servlet-mapping> - <servlet-name>Jersey Web Application</servlet-name> - <url-pattern>/*</url-pattern> - </servlet-mapping> -</web-app>
diff --git a/tests/integration/portability-jersey-2/src/test/java/org/glassfish/jersey/tests/integration/portability/PortabilityITCase.java b/tests/integration/portability-jersey-2/src/test/java/org/glassfish/jersey/tests/integration/portability/PortabilityITCase.java deleted file mode 100644 index e9b9d81..0000000 --- a/tests/integration/portability-jersey-2/src/test/java/org/glassfish/jersey/tests/integration/portability/PortabilityITCase.java +++ /dev/null
@@ -1,58 +0,0 @@ -/* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.tests.integration.portability; - -import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.Response; - -import org.glassfish.jersey.server.ResourceConfig; -import org.glassfish.jersey.test.JerseyTest; -import org.glassfish.jersey.test.external.ExternalTestContainerFactory; -import org.glassfish.jersey.test.spi.TestContainerException; -import org.glassfish.jersey.test.spi.TestContainerFactory; - -import org.junit.Test; -import static org.junit.Assert.assertEquals; - -/** - * @author Martin Matula - */ -public class PortabilityITCase extends JerseyTest { - @Override - protected Application configure() { - // dummy resource config - return new ResourceConfig(); - } - - @Override - protected TestContainerFactory getTestContainerFactory() throws TestContainerException { - return new ExternalTestContainerFactory(); - } - - @Test - public void testHelloWorld() throws Exception { - String s = target("helloworld").request().get(String.class); - assertEquals("Hello World!", s); - } - - @Test - public void testJersey() { - Response r = target("jersey").request().get(); - assertEquals(200, r.getStatus()); - assertEquals("Using Jersey 2.x", r.readEntity(String.class)); - } -}
diff --git a/tests/integration/servlet-3-init-provider/pom.xml b/tests/integration/servlet-3-init-provider/pom.xml index 61f8836..80ca235 100644 --- a/tests/integration/servlet-3-init-provider/pom.xml +++ b/tests/integration/servlet-3-init-provider/pom.xml
@@ -38,10 +38,6 @@ <artifactId>jersey-container-servlet</artifactId> </dependency> <dependency> - <groupId>org.glassfish.jersey.ext</groupId> - <artifactId>jersey-servlet-portability</artifactId> - </dependency> - <dependency> <groupId>jakarta.servlet</groupId> <artifactId>jakarta.servlet-api</artifactId> <version>${servlet5.version}</version>
diff --git a/tests/integration/servlet-3-init-provider/src/main/webapp/WEB-INF/web.xml b/tests/integration/servlet-3-init-provider/src/main/webapp/WEB-INF/web.xml index 9d683f6..6d7a64d 100644 --- a/tests/integration/servlet-3-init-provider/src/main/webapp/WEB-INF/web.xml +++ b/tests/integration/servlet-3-init-provider/src/main/webapp/WEB-INF/web.xml
@@ -34,7 +34,7 @@ </servlet> <servlet> <servlet-name>application3</servlet-name> - <servlet-class>org.glassfish.jersey.servlet.portability.PortableServletContainer</servlet-class> + <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class> <init-param> <param-name>jersey2#jakarta.ws.rs.Application</param-name> <param-value>org.glassfish.jersey.tests.integration.servlet_3_init_provider.Application3</param-value>
diff --git a/tests/integration/servlet-request-wrapper-binding-2/pom.xml b/tests/integration/servlet-request-wrapper-binding-2/pom.xml index 5340bae..7b8ec8d 100644 --- a/tests/integration/servlet-request-wrapper-binding-2/pom.xml +++ b/tests/integration/servlet-request-wrapper-binding-2/pom.xml
@@ -38,10 +38,6 @@ <artifactId>jersey-container-servlet</artifactId> </dependency> <dependency> - <groupId>org.glassfish.jersey.ext</groupId> - <artifactId>jersey-servlet-portability</artifactId> - </dependency> - <dependency> <groupId>jakarta.servlet</groupId> <artifactId>jakarta.servlet-api</artifactId> <version>${servlet5.version}</version>
diff --git a/tests/integration/servlet-request-wrapper-binding/pom.xml b/tests/integration/servlet-request-wrapper-binding/pom.xml index 8b97ff6..e16f4cb 100644 --- a/tests/integration/servlet-request-wrapper-binding/pom.xml +++ b/tests/integration/servlet-request-wrapper-binding/pom.xml
@@ -38,10 +38,6 @@ <artifactId>jersey-container-servlet</artifactId> </dependency> <dependency> - <groupId>org.glassfish.jersey.ext</groupId> - <artifactId>jersey-servlet-portability</artifactId> - </dependency> - <dependency> <groupId>jakarta.servlet</groupId> <artifactId>jakarta.servlet-api</artifactId> <version>${servlet5.version}</version>