From d952ec7ffec874a13bb957c34842059ff965dbb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mat=C4=9Bj=C4=8Dek?= Date: Fri, 5 Mar 2021 00:15:39 +0100 Subject: [PATCH 01/20] GrizzlyHttpServerTest - testing stability with HTTP, HTTPS and HTTP/2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - parallel execution on random free ports - disabled for jdk8 - possibility to use three different clients - jersey-client - but it doesn't support HTTP/2 - jdk11+ HttpClient - but it is not available in older JDK versions - jetty-client - but version compatible with jdk8 uses different classes than version compatible with jdk11 - each test creates a configured server, then creates several clients which are sending GET requests for given time. - all responses must be HTTP 200 - after the test then number of processed requests is written to the STDOUT - if there will be just one non compliant response, all clients are stopped and the test fails. - originally created to reproduce the issue #2125 of the Grizzly project, which used Jersey and Grizzly together. Signed-off-by: David Matějček --- containers/grizzly2-http/pom.xml | 125 +++++++++++- .../httpserver/GrizzlyHttpServerTest.java | 185 +++++++++++++++++ .../test/application/TestedEndpoint.java | 32 +++ .../httpserver/test/tools/ClientThread.java | 145 +++++++++++++ .../test/tools/JdkHttpClientThread.java | 65 ++++++ .../test/tools/JerseyHttpClientThread.java | 68 ++++++ .../test/tools/JettyHttpClientThread.java | 88 ++++++++ .../test/tools/KeyStoreManager.java | 132 ++++++++++++ .../test/tools/NaiveTrustManager.java | 47 +++++ .../httpserver/test/tools/ServerManager.java | 193 ++++++++++++++++++ examples/helloworld-weld/pom.xml | 1 - pom.xml | 26 ++- tests/pom.xml | 1 - 13 files changed, 1104 insertions(+), 4 deletions(-) create mode 100644 containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpServerTest.java create mode 100644 containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/application/TestedEndpoint.java create mode 100644 containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/ClientThread.java create mode 100644 containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/JdkHttpClientThread.java create mode 100644 containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/JerseyHttpClientThread.java create mode 100644 containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/JettyHttpClientThread.java create mode 100644 containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/KeyStoreManager.java create mode 100644 containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/NaiveTrustManager.java create mode 100644 containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/ServerManager.java diff --git a/containers/grizzly2-http/pom.xml b/containers/grizzly2-http/pom.xml index 19a8810176..0e1795893a 100644 --- a/containers/grizzly2-http/pom.xml +++ b/containers/grizzly2-http/pom.xml @@ -17,7 +17,8 @@ --> - + 4.0.0 @@ -32,6 +33,14 @@ Grizzly 2 Http Container. + + + JdkHttpClientThread + org.glassfish.jersey.grizzly2.httpserver.test.tools + ${clientImplPackage}.${client} + -Xms160m -Xmx160m -Xss512k + + jakarta.inject @@ -41,6 +50,40 @@ org.glassfish.grizzly grizzly-http-server + + + org.glassfish.grizzly + grizzly-http2 + test + + + org.glassfish.grizzly + grizzly-npn-api + test + + + + org.eclipse.jetty + jetty-client + test + + + org.eclipse.jetty.http2 + http2-http-client-transport + ${jetty.version} + test + + + + org.bouncycastle + bcprov-jdk15on + test + + + org.bouncycastle + bcmail-jdk15on + test + @@ -60,7 +103,87 @@ maven-bundle-plugin true + + + maven-surefire-plugin + + + + ${testMemory} -XX:+CrashOnOutOfMemoryError -XX:-HeapDumpOnOutOfMemoryError + -DtestTime=10 -DclientCount=30 + -DclientImpl=${clientImpl} + + false + methods + 3 + + + + + jdk11 + + [11,) + + + + + + maven-compiler-plugin + + + default-testCompile + + 11 + 11 + + + + + + + + + + jdk8 + + 1.8 + + + + + + maven-compiler-plugin + + + default-testCompile + + + true + + + + + + + + + diff --git a/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpServerTest.java b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpServerTest.java new file mode 100644 index 0000000000..5fb5e08319 --- /dev/null +++ b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpServerTest.java @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2021 Payara Foundation 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.grizzly2.httpserver; + +import java.lang.reflect.Constructor; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; + +import org.glassfish.jersey.grizzly2.httpserver.test.tools.ClientThread; +import org.glassfish.jersey.grizzly2.httpserver.test.tools.ClientThread.ClientThreadSettings; +import org.glassfish.jersey.grizzly2.httpserver.test.tools.JdkHttpClientThread; +import org.glassfish.jersey.grizzly2.httpserver.test.tools.ServerManager; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TestName; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + + +/** + * Test verifying stability of the {@link GrizzlyHttpContainer} having to serve many requests + * and also giving several examples of how to configure HTTP, HTTPS and HTTP/2 clients. + *

+ * Created as an attempt to reproduce Grizzly's issue #2125 (GitHub) + * + * @author David Matejcek + */ +public class GrizzlyHttpServerTest { + + private static final String CLIENT_IMPLEMENTATION = System.getProperty("clientImpl", + JdkHttpClientThread.class.getCanonicalName()); + private static final long TIME_IN_MILLIS = Long.getLong("testTime", 10L) * 1000L; + private static final int COUNT_OF_CLIENTS = Integer.getInteger("clientCount", 20); + + private final List clients = new ArrayList<>(COUNT_OF_CLIENTS); + private AtomicReference error = new AtomicReference<>(); + private AtomicInteger counter; + private ServerManager server; + + @Rule + public TestName testName = new TestName(); + + @BeforeClass + public static void printSettings() { + System.out.println("Client implementation: " + CLIENT_IMPLEMENTATION); + System.out.println("Count of clients: " + COUNT_OF_CLIENTS); + System.out.println("Test duration: " + TIME_IN_MILLIS / 1000 + " s"); + } + + + @Before + public void init() { + this.counter = new AtomicInteger(); + } + + + @After + public void cleanup() { + error = null; + System.out.println(String.format("Server processed %s requests of test %s.", counter, testName.getMethodName())); + if (server != null) { + server.close(); + } + } + + + /** + * Test for unsecured HTTP 1.1 protocol. + * + * @throws Throwable + */ + @Test + public void http() throws Throwable { + final boolean secured = false; + final boolean useHttp2 = false; + this.server = new ServerManager(secured, useHttp2); + this.clients.addAll(createClients(secured, useHttp2)); + executeTest(); + } + + + /** + * Test for HTTP 1.1 protocol encrypted by {@value ClientThread#ENCRYPTION_PROTOCOL}. + * + * @throws Throwable + */ + @Test + public void https() throws Throwable { + final boolean secured = true; + final boolean useHttp2 = false; + this.server = new ServerManager(secured, useHttp2); + this.clients.addAll(createClients(secured, useHttp2)); + executeTest(); + } + + + /** + * This test is rather for documentaion purpose, because HTTP/2 is usually not allowed to be + * used without encryption. Remember that. + * + * @throws Throwable + */ + @Test(expected = IllegalArgumentException.class) + public void http2() throws Throwable { + this.server = new ServerManager(false, true); + } + + + /** + * Test for HTTP/2 protocol encrypted by {@value ClientThread#ENCRYPTION_PROTOCOL}. + * + * @throws Throwable + */ + @Test + public void https2() throws Throwable { + final boolean secured = true; + final boolean useHttp2 = true; + this.server = new ServerManager(secured, useHttp2); + this.clients.addAll(createClients(secured, useHttp2)); + executeTest(); + } + + + private void executeTest() throws Throwable { + for (final ClientThread clientThread : clients) { + clientThread.start(); + } + final long start = System.currentTimeMillis(); + while (error.get() == null && System.currentTimeMillis() < start + TIME_IN_MILLIS) { + Thread.yield(); + } + for (final ClientThread clientThread : clients) { + clientThread.stopClient(); + } + for (final ClientThread clientThread : clients) { + // cycles are fast, so we can afford this. + clientThread.join(100L); + } + if (error.get() != null) { + throw error.get(); + } + assertTrue("No requests processed.", counter.get() > 0); + } + + + private Collection createClients(final boolean secured, final boolean useHttp2) throws Exception { + final List list = new ArrayList<>(COUNT_OF_CLIENTS); + for (int i = 0; i < COUNT_OF_CLIENTS; i++) { + list.add(createClient(secured, useHttp2, i + 1)); + } + return list; + } + + + private ClientThread createClient(final boolean secured, final boolean useHttp2, final int id) throws Exception { + @SuppressWarnings("unchecked") + final Class clazz = (Class) Class.forName(CLIENT_IMPLEMENTATION); + final Constructor constructor = clazz.getConstructor(ClientThreadSettings.class, + AtomicInteger.class, AtomicReference.class); + assertNotNull("constructor for " + CLIENT_IMPLEMENTATION, constructor); + final ClientThreadSettings settings = new ClientThreadSettings(id, secured, useHttp2, + server.getApplicationServiceEndpoint()); + return constructor.newInstance(settings, counter, error); + } +} diff --git a/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/application/TestedEndpoint.java b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/application/TestedEndpoint.java new file mode 100644 index 0000000000..3ad7fb8b52 --- /dev/null +++ b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/application/TestedEndpoint.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2021 Payara Foundation 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.grizzly2.httpserver.test.application; + +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; + +@Path("tested-endpoint") +public class TestedEndpoint { + + @GET + @Produces(MediaType.TEXT_PLAIN) + public String getIt() { + return "Got it!"; + } +} diff --git a/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/ClientThread.java b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/ClientThread.java new file mode 100644 index 0000000000..2b11fab267 --- /dev/null +++ b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/ClientThread.java @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2021 Payara Foundation 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.grizzly2.httpserver.test.tools; + +import java.net.URI; +import java.security.GeneralSecurityException; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; + +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManager; + +/** + * Why this? To simulate parallel client access - several clients intensively sending requests + * and verifying responses. + * + * @author David Matejcek + */ +public abstract class ClientThread extends Thread { + + /** Encryption used if you enable secured communication */ + public static final String ENCRYPTION_PROTOCOL = "TLSv1.2"; + + private final ClientThreadSettings settings; + private final AtomicInteger counter; + private final AtomicReference error; + private volatile boolean stop; + + + + public ClientThread(final ClientThreadSettings settings, final AtomicInteger counter, + final AtomicReference error) throws Exception { + this.settings = settings; + this.counter = counter; + this.error = error; + setName("client-" + settings.id); + setUncaughtExceptionHandler((t, e) -> { + stop = true; + error.compareAndSet(null, e); + }); + } + + + /** + * @return {@link ClientThreadSettings} + */ + protected final ClientThreadSettings getSettings() { + return this.settings; + } + + + /** + * Executes the requests and checks the response. + * + * @throws Throwable + */ + protected abstract void doGetAndCheckResponse() throws Throwable; + + + /** + * If the client is stateful, override this method. + */ + protected void disconnect() { + // by default nothing to do. + } + + + /** + * Instructs the client thread to stop when possible. + */ + public void stopClient() { + this.stop = true; + } + + + @Override + public final void run() { + try { + // stop when asked to stop or any "brother" thread observed throwable + while (!stop && error.get() == null) { + doGetAndCheckResponse(); + counter.incrementAndGet(); + } + } catch (final Throwable t) { + throw new IllegalStateException("The client thread failed: " + getName(), t); + } finally { + disconnect(); + } + } + + + /** + * @return Trivial {@link SSLContext}, accepting all certificates and host names + * @throws GeneralSecurityException + */ + protected static SSLContext createSslContext() throws GeneralSecurityException { + final SSLContext ctx = SSLContext.getInstance(ENCRYPTION_PROTOCOL); + ctx.init(null, new TrustManager[] {new NaiveTrustManager()}, null); + return ctx; + } + + /** + * Simplified configuration of the client thread. + */ + public static class ClientThreadSettings { + + /** Id of the client thread */ + public final int id; + /** True if the connection will be encrypted */ + public final boolean secured; + /** True if the protocol should be HTTP/2, false for HTTP 1.1 */ + public final boolean useHttp2; + /** The endpoint {@link URI} of the servlet */ + public final URI targetUri; + + /** + * Creates simplified configuration of the client thread. + * + * @param id id of the client thread + * @param secured true if the connection will be encrypted + * @param useHttp2 true if the protocol should be HTTP/2, false for HTTP 1.1 + * @param targetUri the endpoint {@link URI} of the servlet + */ + public ClientThreadSettings(final int id, final boolean secured, final boolean useHttp2, final URI targetUri) { + this.id = id; + this.secured = secured; + this.useHttp2 = useHttp2; + this.targetUri = targetUri; + } + } +} diff --git a/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/JdkHttpClientThread.java b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/JdkHttpClientThread.java new file mode 100644 index 0000000000..8e9d5434a7 --- /dev/null +++ b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/JdkHttpClientThread.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2021 Payara Foundation 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.grizzly2.httpserver.test.tools; + +import java.net.http.HttpClient; +import java.net.http.HttpClient.Version; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; + +import org.glassfish.grizzly.http.util.Header; + +import jakarta.ws.rs.core.MediaType; + +import static org.junit.Assert.assertEquals; + +/** + * JDK11+ has it's own {@link HttpClient} implementation supporting both HTTP 1.1 and HTTP/2. + * + * @author David Matejcek + */ +public class JdkHttpClientThread extends ClientThread { + private final HttpClient client; + + public JdkHttpClientThread(final ClientThreadSettings settings, + final AtomicInteger counter, final AtomicReference error) throws Exception { + super(settings, counter, error); + this.client = createClient(settings.secured, settings.useHttp2); + } + + + @Override + public void doGetAndCheckResponse() throws Throwable { + final HttpRequest request = HttpRequest.newBuilder(getSettings().targetUri) + .header(Header.ContentType.toString(), MediaType.TEXT_PLAIN).GET().build(); + final HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); + assertEquals(200, response.statusCode()); + assertEquals("Got it!", response.body()); + } + + + private static HttpClient createClient(final boolean secured, final boolean useHttp2) throws Exception { + final HttpClient.Builder builder = HttpClient.newBuilder() + .version(useHttp2 ? Version.HTTP_2 : Version.HTTP_1_1); + if (secured) { + builder.sslContext(createSslContext()); + } + return builder.build(); + } +} diff --git a/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/JerseyHttpClientThread.java b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/JerseyHttpClientThread.java new file mode 100644 index 0000000000..dcf359f42a --- /dev/null +++ b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/JerseyHttpClientThread.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2021 Payara Foundation 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.grizzly2.httpserver.test.tools; + +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; + +import org.glassfish.jersey.client.ClientConfig; + +import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.client.ClientBuilder; +import jakarta.ws.rs.client.Invocation.Builder; +import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.Response; + +import static org.junit.Assert.assertEquals; + +/** + * Jersey doesn't support HTTP/2 at this moment, but this class may be extended later. + * Even this way it passes all tests, because server is still able to use HTTP 1.1 despite we + * configured it to use HTTP/2 + * + * @author David Matejcek + */ +public class JerseyHttpClientThread extends ClientThread { + + private final Client client; + + public JerseyHttpClientThread(final ClientThreadSettings settings, + final AtomicInteger counter, final AtomicReference error) throws Exception { + super(settings, counter, error); + this.client = createClient(settings.secured, settings.useHttp2); + } + + + @Override + public void doGetAndCheckResponse() throws Throwable { + final WebTarget path = client.target(getSettings().targetUri.toString()); + final Builder builder = path.request(); + final Response response = builder.get(); + final String responseMsg = response.readEntity(String.class); + assertEquals(200, response.getStatus()); + assertEquals("Got it!", responseMsg); + } + + + private static Client createClient(final boolean secured, final boolean useHttp2) throws Exception { + final ClientBuilder builder = ClientBuilder.newBuilder().withConfig(new ClientConfig()); + if (secured) { + builder.sslContext(createSslContext()); + } + return builder.build(); + } +} diff --git a/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/JettyHttpClientThread.java b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/JettyHttpClientThread.java new file mode 100644 index 0000000000..171d534fce --- /dev/null +++ b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/JettyHttpClientThread.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2021 Payara Foundation 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.grizzly2.httpserver.test.tools; + +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; + +import org.eclipse.jetty.client.HttpClient; +import org.eclipse.jetty.client.HttpClientTransport; +import org.eclipse.jetty.client.api.ContentResponse; +import org.eclipse.jetty.client.http.HttpClientTransportOverHTTP; +import org.eclipse.jetty.http2.client.HTTP2Client; +import org.eclipse.jetty.http2.client.http.HttpClientTransportOverHTTP2; +import org.eclipse.jetty.io.ClientConnector; +import org.eclipse.jetty.util.ssl.SslContextFactory; +import static org.junit.Assert.assertEquals; + +/** + * Jetty {@link HttpClient} supports both HTTP 1.1 and HTTP/2. + * + * @author David Matejcek + */ +public class JettyHttpClientThread extends ClientThread { + + private final HttpClient client; + + public JettyHttpClientThread(final ClientThreadSettings settings, final AtomicInteger counter, + final AtomicReference error) throws Exception { + super(settings, counter, error); + this.client = createJettyClient(settings.secured, settings.useHttp2); + } + + + @Override + protected void disconnect() { + try { + this.client.stop(); + } catch (Exception e) { + throw new IllegalStateException("Could not stop the client: " + getName(), e); + } + } + + @Override + public void doGetAndCheckResponse() throws Throwable { + final ContentResponse response = this.client.GET(getSettings().targetUri); + assertEquals(200, response.getStatus()); + assertEquals("Got it!", response.getContentAsString()); + } + + + private static HttpClient createJettyClient(final boolean secured, final boolean useHttp2) throws Exception { + if (!secured && !useHttp2) { + final HttpClient httpClient = new HttpClient(); + httpClient.start(); + return httpClient; + } + + final SslContextFactory.Client sslContextFactory = new SslContextFactory.Client(); + sslContextFactory.setSslContext(createSslContext()); + final ClientConnector connector = new ClientConnector(); + connector.setSslContextFactory(sslContextFactory); + + final HttpClientTransport transport; + if (useHttp2) { + transport = new HttpClientTransportOverHTTP2(new HTTP2Client(connector)); + } else { + transport = new HttpClientTransportOverHTTP(connector); + } + + final HttpClient httpClient = new HttpClient(transport); + httpClient.start(); + return httpClient; + } +} diff --git a/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/KeyStoreManager.java b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/KeyStoreManager.java new file mode 100644 index 0000000000..4cb8de3337 --- /dev/null +++ b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/KeyStoreManager.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2021 Payara Foundation 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.grizzly2.httpserver.test.tools; + +import java.io.ByteArrayOutputStream; +import java.math.BigInteger; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.KeyStore; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.SecureRandom; +import java.security.cert.Certificate; +import java.security.cert.X509Certificate; +import java.time.Instant; +import java.time.temporal.ChronoUnit; +import java.util.Date; +import java.util.Random; + +import org.bouncycastle.asn1.ASN1Sequence; +import org.bouncycastle.asn1.x500.X500Name; +import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo; +import org.bouncycastle.cert.X509CertificateHolder; +import org.bouncycastle.cert.X509v3CertificateBuilder; +import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter; +import org.bouncycastle.operator.ContentSigner; +import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder; + +/** + * Creates a new keystore in memory. + * This keystore contains just a private key and a self-signed certificate valid for two days. + * + * @author David Matejcek + */ +public class KeyStoreManager { + + private static final String KEYSTORE_PASSWORD = ""; + private final KeyStore keyStore; + private final byte[] keyStoreBytes; + + /** + * @param hostname - hostname, used for CN value of the self-signed certificate + */ + public KeyStoreManager(final String hostname) { + try { + this.keyStore = KeyStore.getInstance("PKCS12"); + this.keyStore.load(null); + this.keyStoreBytes = generatePrivateKeyAndCertificate(hostname, this.keyStore); + } catch (Exception e) { + throw new IllegalStateException("Could not initialize the keystore.", e); + } + } + + + /** + * @return {@link KeyStore} + */ + public KeyStore getKeyStore() { + return this.keyStore; + } + + + /** + * @return the key store serialized to a byte array + */ + public byte[] getKeyStoreBytes() { + return this.keyStoreBytes; + } + + + /** + * @return the key store password + */ + public String getKeyStorePassword() { + return KEYSTORE_PASSWORD; + } + + + private static byte[] generatePrivateKeyAndCertificate(final String hostname, final KeyStore keyStore) { + try { + final KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); + generator.initialize(2048, SecureRandom.getInstance("SHA1PRNG")); + final KeyPair keyPair = generator.generateKeyPair(); + final PrivateKey privateKey = keyPair.getPrivate(); + final PublicKey publicKey = keyPair.getPublic(); + + final BigInteger serial = new BigInteger(256, new Random(System.currentTimeMillis())); + final Instant validFrom = Instant.now().minusSeconds(60L); + final Instant validTo = validFrom.plus(2, ChronoUnit.DAYS); + + final ASN1Sequence pubSeq = ASN1Sequence.getInstance(publicKey.getEncoded()); + final SubjectPublicKeyInfo info = SubjectPublicKeyInfo.getInstance(pubSeq.getEncoded()); + final X500Name name = new X500Name( + "CN=" + hostname + ", OU=Jersey Container, O=Eclipse Foundation, L=Brussels, ST=Belgium, C=BE"); + final X509v3CertificateBuilder builder = new X509v3CertificateBuilder( + name, serial, Date.from(validFrom), Date.from(validTo), name, info); + final JcaContentSignerBuilder signerBuilder = new JcaContentSignerBuilder("SHA512withRSA"); + final ContentSigner signer = signerBuilder.build(privateKey); + + final X509CertificateHolder cHolder = builder.build(signer); + final X509Certificate certificate = new JcaX509CertificateConverter().getCertificate(cHolder); + + keyStore.setKeyEntry(hostname, privateKey, KEYSTORE_PASSWORD.toCharArray(), + new Certificate[] {certificate}); + return toBytes(keyStore); + } catch (final Exception e) { + throw new IllegalStateException("Could not initialize the keystore", e); + } + } + + + private static byte[] toBytes(final KeyStore keyStore) throws Exception { + try (ByteArrayOutputStream os = new ByteArrayOutputStream(1024)) { + keyStore.store(os, new char[0]); + return os.toByteArray(); + } + } +} diff --git a/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/NaiveTrustManager.java b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/NaiveTrustManager.java new file mode 100644 index 0000000000..85e265d533 --- /dev/null +++ b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/NaiveTrustManager.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2021 Payara Foundation 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.grizzly2.httpserver.test.tools; + +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; + +import javax.net.ssl.X509TrustManager; + + +/** + * This trust manager accepts all certificates. + *

+ * DO NOT USE ON PRODUCTION CODE!!! + * + * @author David Matejcek + */ +public class NaiveTrustManager implements X509TrustManager { + @Override + public void checkClientTrusted(final X509Certificate[] chain, final String authType) throws CertificateException { + // Everyone is trusted! + } + + @Override + public void checkServerTrusted(final X509Certificate[] chain, final String authType) throws CertificateException { + // Everyone is trusted! + } + + @Override + public X509Certificate[] getAcceptedIssuers() { + return new X509Certificate[0]; + } +} diff --git a/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/ServerManager.java b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/ServerManager.java new file mode 100644 index 0000000000..225e02d2f1 --- /dev/null +++ b/containers/grizzly2-http/src/test/java/org/glassfish/jersey/grizzly2/httpserver/test/tools/ServerManager.java @@ -0,0 +1,193 @@ +/* + * Copyright (c) 2021 Payara Foundation 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.grizzly2.httpserver.test.tools; + +import java.io.Closeable; +import java.io.IOException; +import java.net.InetAddress; +import java.net.MalformedURLException; +import java.net.ServerSocket; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.net.UnknownHostException; + +import org.glassfish.grizzly.http.server.HttpServer; +import org.glassfish.grizzly.http.server.NetworkListener; +import org.glassfish.grizzly.http2.Http2AddOn; +import org.glassfish.grizzly.http2.Http2Configuration; +import org.glassfish.grizzly.ssl.SSLContextConfigurator; +import org.glassfish.grizzly.ssl.SSLEngineConfigurator; +import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory; +import org.glassfish.jersey.grizzly2.httpserver.test.application.TestedEndpoint; +import org.glassfish.jersey.server.ResourceConfig; + +/** + * This manager maintains the lifecycle of the {@link HttpServer} and trivial rest application. + * + * @author David Matejcek + */ +public class ServerManager implements Closeable { + + private static final String LISTENER_NAME_GRIZZLY = "grizzly"; + private static final String PROTOCOL_HTTPS = "https"; + private static final String PROTOCOL_HTTP = "http"; + private static final String APPLICATION_CONTEXT = "/test-application"; + private static final String SERVICE_CONTEXT = "/tested-endpoint"; + + private final URI endpointUri; + private final HttpServer server; + + + /** + * Initializes the server environment and starts the server. + * + * @param secured - set true to enable network encryption + * @param useHttp2 - set true to enable HTTP/2; then secured must be set to true too. + * @throws IOException + */ + public ServerManager(final boolean secured, final boolean useHttp2) throws IOException { + this.endpointUri = getEndpointUri(secured, APPLICATION_CONTEXT); + final NetworkListener listener = createListener(secured, useHttp2, endpointUri.getHost(), endpointUri.getPort()); + final ResourceConfig resourceConfig = createResourceConfig(); + this.server = startServer(listener, this.endpointUri, resourceConfig); + } + + + /** + * @return {@link URI} of the application endpoint. + */ + public URI getApplicationEndpoint() { + return this.endpointUri; + } + + + /** + * @return {@link URI} of the deployed service endpoint. + */ + public URI getApplicationServiceEndpoint() { + return URI.create(getApplicationEndpoint() + SERVICE_CONTEXT); + } + + + /** + * Calls the {@link HttpServer#shutdownNow()}. The server and all it's resources are destroyed. + */ + @Override + public void close() { + if (server != null) { + server.shutdownNow(); + } + } + + + private static URI getEndpointUri(final boolean secured, final String applicationContext) { + try { + final String protocol = secured ? PROTOCOL_HTTPS : PROTOCOL_HTTP; + return new URL(protocol, getLocalhost(), getFreePort(), applicationContext).toURI(); + } catch (MalformedURLException | URISyntaxException e) { + throw new IllegalStateException("Unable to create an endpoint URI.", e); + } + } + + + private static String getLocalhost() { + try { + return InetAddress.getLocalHost().getHostName(); + } catch (final UnknownHostException e) { + return "localhost"; + } + } + + + /** + * Tries to alocate a free local port. + * + * @return a free local port number. + * @throws IllegalStateException if it fails for 20 times + */ + private static int getFreePort() { + int attempts = 0; + while (true) { + attempts++; + try (ServerSocket socket = new ServerSocket(0)) { + final int port = socket.getLocalPort(); + socket.setSoTimeout(1); + socket.setReuseAddress(true); + return port; + } catch (final IOException e) { + if (attempts >= 20) { + throw new IllegalStateException("Cannot open random port, tried 20 times.", e); + } + } + } + } + + + private static NetworkListener createListener(final boolean secured, final boolean useHttp2, final String host, + final int port) { + if (useHttp2 && !secured) { + throw new IllegalArgumentException("HTTP/2 cannot be used without encryption"); + } + final NetworkListener listener = new NetworkListener(LISTENER_NAME_GRIZZLY, host, port); + listener.setSecure(secured); + if (secured) { + listener.setSSLEngineConfig(createSSLEngineConfigurator(host)); + } + if (useHttp2) { + listener.registerAddOn(createHttp2AddOn()); + } + return listener; + } + + + private static SSLEngineConfigurator createSSLEngineConfigurator(final String host) { + final KeyStoreManager keyStoreManager = new KeyStoreManager(host); + final SSLContextConfigurator configurator = new SSLContextConfigurator(); + configurator.setKeyStoreBytes(keyStoreManager.getKeyStoreBytes()); + configurator.setKeyStorePass(keyStoreManager.getKeyStorePassword()); + configurator.setTrustStoreBytes(keyStoreManager.getKeyStoreBytes()); + configurator.setTrustStorePass(keyStoreManager.getKeyStorePassword()); + final SSLEngineConfigurator sslEngineConfigurator = new SSLEngineConfigurator(configurator) + .setClientMode(false).setNeedClientAuth(false); + return sslEngineConfigurator; + } + + + private static Http2AddOn createHttp2AddOn() { + final Http2Configuration configuration = Http2Configuration.builder().build(); + return new Http2AddOn(configuration); + } + + + private static ResourceConfig createResourceConfig() { + return new ResourceConfig().registerClasses(TestedEndpoint.class); + } + + + private static HttpServer startServer(final NetworkListener listener, final URI endpointUri, + final ResourceConfig resourceConfig) { + final HttpServer srv = GrizzlyHttpServerFactory.createHttpServer(endpointUri, resourceConfig, false); + try { + srv.addListener(listener); + srv.start(); + return srv; + } catch (final IOException e) { + throw new IllegalStateException("Could not start the server!", e); + } + } +} diff --git a/examples/helloworld-weld/pom.xml b/examples/helloworld-weld/pom.xml index 9620baf359..ff43136c3a 100644 --- a/examples/helloworld-weld/pom.xml +++ b/examples/helloworld-weld/pom.xml @@ -38,7 +38,6 @@ jakarta.enterprise jakarta.enterprise.cdi-api - ${cdi.api.version} org.glassfish.jersey.test-framework.providers diff --git a/pom.xml b/pom.xml index 736c1d094d..681986e633 100644 --- a/pom.xml +++ b/pom.xml @@ -207,7 +207,7 @@ - + scm:git:git@github.com:jersey/jersey.git scm:git:git@github.com:eclipse-ee4j/jersey.git https://github.com/eclipse-ee4j/jersey @@ -1587,6 +1587,11 @@ grizzly-http-server ${grizzly2.version} + + org.glassfish.grizzly + grizzly-http2 + ${grizzly2.version} + org.glassfish.grizzly grizzly-http-servlet @@ -1607,6 +1612,11 @@ grizzly-http-client ${grizzly.client.version} + + org.glassfish.grizzly + grizzly-npn-api + ${grizzly.npn.version} + io.netty @@ -1957,6 +1967,18 @@ ${xmlunit.version} test + + org.bouncycastle + bcprov-jdk15on + ${bouncycastle.version} + test + + + org.bouncycastle + bcmail-jdk15on + ${bouncycastle.version} + test + org.apache.felix @@ -2040,6 +2062,7 @@ 9.0 2.3.6 + 1.68 3.3.2 1.2.1 3.1.0 @@ -2105,6 +2128,7 @@ 3.0.0 4.0.0 3.0.0 + 2.0.0 3.0.1 3.0.0 2.0.0 diff --git a/tests/pom.xml b/tests/pom.xml index ef354d64a0..8253436655 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -68,7 +68,6 @@ org.glassfish.jersey.inject jersey-hk2 - ${project.version} From 4cf082f31c19ad8b00ea42e08801981610e6beea Mon Sep 17 00:00:00 2001 From: jersey-bot Date: Mon, 20 Sep 2021 14:53:47 +0000 Subject: [PATCH 02/20] 3.0.3 --- archetypes/jersey-example-java8-webapp/pom.xml | 2 +- archetypes/jersey-heroku-webapp/pom.xml | 2 +- archetypes/jersey-quickstart-grizzly2/pom.xml | 2 +- archetypes/jersey-quickstart-webapp/pom.xml | 2 +- archetypes/pom.xml | 2 +- bom/pom.xml | 2 +- bundles/apidocs/pom.xml | 2 +- bundles/examples/pom.xml | 2 +- bundles/jaxrs-ri/pom.xml | 2 +- bundles/pom.xml | 2 +- connectors/apache-connector/pom.xml | 2 +- connectors/grizzly-connector/pom.xml | 2 +- connectors/helidon-connector/pom.xml | 2 +- connectors/jdk-connector/pom.xml | 2 +- connectors/jetty-connector/pom.xml | 2 +- connectors/netty-connector/pom.xml | 2 +- connectors/pom.xml | 2 +- containers/glassfish/jersey-gf-ejb/pom.xml | 2 +- containers/glassfish/pom.xml | 2 +- containers/grizzly2-http/pom.xml | 2 +- containers/grizzly2-servlet/pom.xml | 2 +- containers/jdk-http/pom.xml | 2 +- containers/jersey-servlet-core/pom.xml | 2 +- containers/jersey-servlet/pom.xml | 2 +- containers/jetty-http/pom.xml | 2 +- containers/jetty-servlet/pom.xml | 2 +- containers/netty-http/pom.xml | 2 +- containers/pom.xml | 2 +- containers/simple-http/pom.xml | 2 +- core-client/pom.xml | 2 +- core-common/pom.xml | 2 +- core-server/pom.xml | 2 +- docs/pom.xml | 2 +- examples/assemblies/pom.xml | 2 +- examples/bookstore-webapp/pom.xml | 2 +- examples/cdi-webapp/pom.xml | 2 +- examples/clipboard-programmatic/pom.xml | 2 +- examples/clipboard/pom.xml | 2 +- examples/declarative-linking/pom.xml | 2 +- examples/entity-filtering-security/pom.xml | 2 +- examples/entity-filtering-selectable/pom.xml | 2 +- examples/entity-filtering/pom.xml | 2 +- examples/exception-mapping/pom.xml | 2 +- examples/freemarker-webapp/pom.xml | 2 +- examples/groovy/pom.xml | 2 +- examples/helloworld-benchmark/pom.xml | 2 +- examples/helloworld-cdi2-se/pom.xml | 2 +- examples/helloworld-netty/pom.xml | 2 +- examples/helloworld-programmatic/pom.xml | 2 +- examples/helloworld-pure-jax-rs/pom.xml | 2 +- examples/helloworld-webapp/pom.xml | 2 +- examples/helloworld-weld/pom.xml | 2 +- examples/helloworld/pom.xml | 2 +- examples/http-patch/pom.xml | 2 +- examples/http-trace/pom.xml | 2 +- examples/https-clientserver-grizzly/pom.xml | 2 +- examples/https-server-glassfish/pom.xml | 2 +- examples/java8-webapp/pom.xml | 2 +- examples/jaxb/pom.xml | 2 +- examples/jaxrs-types-injection/pom.xml | 2 +- examples/jersey-ejb/pom.xml | 2 +- examples/json-binding-webapp/pom.xml | 2 +- examples/json-jackson/pom.xml | 2 +- examples/json-jettison/pom.xml | 2 +- examples/json-moxy/pom.xml | 2 +- examples/json-processing-webapp/pom.xml | 2 +- examples/json-with-padding/pom.xml | 2 +- examples/managed-beans-webapp/pom.xml | 2 +- examples/managed-client-simple-webapp/pom.xml | 2 +- examples/managed-client-webapp/pom.xml | 2 +- examples/managed-client/pom.xml | 2 +- examples/multipart-webapp/pom.xml | 2 +- examples/open-tracing/pom.xml | 2 +- examples/pom.xml | 2 +- examples/rx-client-webapp/pom.xml | 2 +- examples/server-async-managed/pom.xml | 2 +- examples/server-async-standalone/client/pom.xml | 2 +- examples/server-async-standalone/pom.xml | 2 +- examples/server-async-standalone/webapp/pom.xml | 2 +- examples/server-async/pom.xml | 2 +- examples/server-sent-events-jaxrs/pom.xml | 2 +- examples/server-sent-events-jersey/pom.xml | 2 +- examples/servlet3-webapp/pom.xml | 2 +- examples/simple-console/pom.xml | 2 +- examples/sse-item-store-jaxrs-webapp/pom.xml | 2 +- examples/sse-item-store-jersey-webapp/pom.xml | 2 +- examples/sse-twitter-aggregator/pom.xml | 2 +- examples/system-properties-example/pom.xml | 2 +- examples/webapp-example-parent/pom.xml | 2 +- examples/xml-moxy/pom.xml | 2 +- ext/bean-validation/pom.xml | 2 +- ext/cdi/jersey-cdi-rs-inject/pom.xml | 2 +- ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml | 2 +- ext/cdi/jersey-cdi1x-servlet/pom.xml | 2 +- ext/cdi/jersey-cdi1x-transaction/pom.xml | 2 +- ext/cdi/jersey-cdi1x-validation/pom.xml | 2 +- ext/cdi/jersey-cdi1x/pom.xml | 2 +- ext/cdi/jersey-weld2-se/pom.xml | 2 +- ext/cdi/pom.xml | 2 +- ext/entity-filtering/pom.xml | 2 +- ext/metainf-services/pom.xml | 2 +- ext/microprofile/mp-config/pom.xml | 2 +- ext/microprofile/pom.xml | 2 +- ext/mvc-bean-validation/pom.xml | 2 +- ext/mvc-freemarker/pom.xml | 2 +- ext/mvc-jsp/pom.xml | 2 +- ext/mvc-mustache/pom.xml | 2 +- ext/mvc/pom.xml | 2 +- ext/pom.xml | 2 +- ext/proxy-client/pom.xml | 2 +- ext/rx/pom.xml | 2 +- ext/rx/rx-client-guava/pom.xml | 2 +- ext/rx/rx-client-rxjava/pom.xml | 2 +- ext/rx/rx-client-rxjava2/pom.xml | 2 +- ext/wadl-doclet/pom.xml | 2 +- incubator/cdi-inject-weld/pom.xml | 2 +- incubator/declarative-linking/pom.xml | 2 +- incubator/gae-integration/pom.xml | 2 +- incubator/html-json/pom.xml | 2 +- incubator/kryo/pom.xml | 2 +- incubator/open-tracing/pom.xml | 2 +- incubator/pom.xml | 2 +- inject/cdi2-se/pom.xml | 2 +- inject/hk2/pom.xml | 2 +- inject/pom.xml | 2 +- media/jaxb/pom.xml | 2 +- media/json-binding/pom.xml | 2 +- media/json-jackson/pom.xml | 2 +- media/json-jettison/pom.xml | 2 +- media/json-processing/pom.xml | 2 +- media/moxy/pom.xml | 2 +- media/multipart/pom.xml | 2 +- media/pom.xml | 2 +- media/sse/pom.xml | 2 +- pom.xml | 2 +- security/oauth1-client/pom.xml | 2 +- security/oauth1-server/pom.xml | 2 +- security/oauth1-signature/pom.xml | 2 +- security/oauth2-client/pom.xml | 2 +- security/pom.xml | 2 +- test-framework/core/pom.xml | 2 +- test-framework/maven/container-runner-maven-plugin/pom.xml | 2 +- test-framework/maven/custom-enforcer-rules/pom.xml | 2 +- test-framework/maven/pom.xml | 2 +- test-framework/memleak-test-common/pom.xml | 2 +- test-framework/pom.xml | 2 +- test-framework/providers/bundle/pom.xml | 2 +- test-framework/providers/external/pom.xml | 2 +- test-framework/providers/grizzly2/pom.xml | 2 +- test-framework/providers/inmemory/pom.xml | 2 +- test-framework/providers/jdk-http/pom.xml | 2 +- test-framework/providers/jetty/pom.xml | 2 +- test-framework/providers/netty/pom.xml | 2 +- test-framework/providers/pom.xml | 2 +- test-framework/providers/simple/pom.xml | 2 +- test-framework/util/pom.xml | 2 +- tests/e2e-client/pom.xml | 2 +- tests/e2e-core-common/pom.xml | 2 +- tests/e2e-entity/pom.xml | 2 +- tests/e2e-inject/cdi-inject-weld/pom.xml | 2 +- tests/e2e-inject/cdi2-se/pom.xml | 2 +- tests/e2e-inject/hk2/pom.xml | 2 +- tests/e2e-inject/pom.xml | 2 +- tests/e2e-server/pom.xml | 2 +- tests/e2e-testng/pom.xml | 2 +- tests/e2e/pom.xml | 2 +- tests/integration/asm/pom.xml | 2 +- tests/integration/async-jersey-filter/pom.xml | 2 +- .../cdi-integration/cdi-beanvalidation-webapp/pom.xml | 2 +- .../integration/cdi-integration/cdi-client-on-server/pom.xml | 2 +- tests/integration/cdi-integration/cdi-client/pom.xml | 2 +- tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml | 2 +- .../cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml | 2 +- tests/integration/cdi-integration/cdi-log-check/pom.xml | 2 +- tests/integration/cdi-integration/cdi-manually-bound/pom.xml | 2 +- tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml | 2 +- tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml | 2 +- tests/integration/cdi-integration/cdi-multimodule/pom.xml | 2 +- .../integration/cdi-integration/cdi-multimodule/war1/pom.xml | 2 +- .../integration/cdi-integration/cdi-multimodule/war2/pom.xml | 2 +- .../integration/cdi-integration/cdi-multipart-webapp/pom.xml | 2 +- .../cdi-integration/cdi-resource-with-at-context/pom.xml | 2 +- tests/integration/cdi-integration/cdi-singleton/pom.xml | 2 +- tests/integration/cdi-integration/cdi-test-webapp/pom.xml | 2 +- .../cdi-with-jersey-injection-custom-cfg-webapp/pom.xml | 2 +- .../pom.xml | 2 +- .../cdi-integration/cdi-with-jersey-injection-webapp/pom.xml | 2 +- .../cdi-integration/context-inject-on-server/pom.xml | 2 +- tests/integration/cdi-integration/pom.xml | 2 +- tests/integration/client-connector-provider/pom.xml | 2 +- tests/integration/ejb-multimodule-reload/ear/pom.xml | 2 +- tests/integration/ejb-multimodule-reload/lib/pom.xml | 2 +- tests/integration/ejb-multimodule-reload/pom.xml | 2 +- tests/integration/ejb-multimodule-reload/war1/pom.xml | 2 +- tests/integration/ejb-multimodule-reload/war2/pom.xml | 2 +- tests/integration/ejb-multimodule/ear/pom.xml | 2 +- tests/integration/ejb-multimodule/lib/pom.xml | 2 +- tests/integration/ejb-multimodule/pom.xml | 2 +- tests/integration/ejb-multimodule/war/pom.xml | 2 +- tests/integration/ejb-test-webapp/pom.xml | 2 +- tests/integration/externalproperties/pom.xml | 2 +- tests/integration/j-376/pom.xml | 2 +- tests/integration/j-441/ear/pom.xml | 2 +- tests/integration/j-441/pom.xml | 2 +- tests/integration/j-441/war1/pom.xml | 2 +- tests/integration/j-441/war2/pom.xml | 2 +- tests/integration/j-59/ear/pom.xml | 2 +- tests/integration/j-59/lib/pom.xml | 2 +- tests/integration/j-59/pom.xml | 2 +- tests/integration/j-59/war/pom.xml | 2 +- tests/integration/jaxrs-component-inject/pom.xml | 2 +- tests/integration/jersey-1107/pom.xml | 2 +- tests/integration/jersey-1223/pom.xml | 2 +- tests/integration/jersey-1604/pom.xml | 2 +- tests/integration/jersey-1667/pom.xml | 2 +- tests/integration/jersey-1883/pom.xml | 2 +- tests/integration/jersey-1928/pom.xml | 2 +- tests/integration/jersey-1960/pom.xml | 2 +- tests/integration/jersey-1964/pom.xml | 2 +- tests/integration/jersey-2031/pom.xml | 2 +- tests/integration/jersey-2136/pom.xml | 2 +- tests/integration/jersey-2137/pom.xml | 2 +- tests/integration/jersey-2154/pom.xml | 2 +- tests/integration/jersey-2160/pom.xml | 2 +- tests/integration/jersey-2164/pom.xml | 2 +- tests/integration/jersey-2167/pom.xml | 2 +- tests/integration/jersey-2176/pom.xml | 2 +- tests/integration/jersey-2184/pom.xml | 2 +- tests/integration/jersey-2255/pom.xml | 2 +- tests/integration/jersey-2322/pom.xml | 2 +- tests/integration/jersey-2335/pom.xml | 2 +- tests/integration/jersey-2421/pom.xml | 2 +- tests/integration/jersey-2551/pom.xml | 2 +- tests/integration/jersey-2612/pom.xml | 2 +- tests/integration/jersey-2637/pom.xml | 2 +- tests/integration/jersey-2654/pom.xml | 2 +- tests/integration/jersey-2673/pom.xml | 2 +- tests/integration/jersey-2689/pom.xml | 2 +- tests/integration/jersey-2704/pom.xml | 2 +- tests/integration/jersey-2776/pom.xml | 2 +- tests/integration/jersey-2794/pom.xml | 2 +- tests/integration/jersey-2846/pom.xml | 2 +- tests/integration/jersey-2878/pom.xml | 2 +- tests/integration/jersey-2892/pom.xml | 2 +- tests/integration/jersey-3662/pom.xml | 2 +- tests/integration/jersey-3670/pom.xml | 2 +- tests/integration/jersey-3796/pom.xml | 2 +- tests/integration/jersey-3992/pom.xml | 2 +- tests/integration/jersey-4003/pom.xml | 2 +- tests/integration/jersey-4099/pom.xml | 2 +- tests/integration/jersey-4321/pom.xml | 2 +- tests/integration/jersey-4507/pom.xml | 2 +- tests/integration/jersey-4542/pom.xml | 2 +- tests/integration/jersey-4697/pom.xml | 2 +- tests/integration/jersey-4722/pom.xml | 2 +- tests/integration/jersey-780/pom.xml | 2 +- tests/integration/microprofile/config/helidon/pom.xml | 2 +- tests/integration/microprofile/config/pom.xml | 2 +- tests/integration/microprofile/config/webapp/pom.xml | 2 +- tests/integration/microprofile/pom.xml | 2 +- tests/integration/pom.xml | 2 +- tests/integration/property-check/pom.xml | 2 +- tests/integration/reactive-streams/pom.xml | 2 +- tests/integration/reactive-streams/sse/pom.xml | 2 +- tests/integration/security-digest/pom.xml | 2 +- tests/integration/servlet-2.5-autodiscovery-1/pom.xml | 2 +- tests/integration/servlet-2.5-autodiscovery-2/pom.xml | 2 +- tests/integration/servlet-2.5-filter/pom.xml | 2 +- tests/integration/servlet-2.5-inflector-1/pom.xml | 2 +- tests/integration/servlet-2.5-init-1/pom.xml | 2 +- tests/integration/servlet-2.5-init-2/pom.xml | 2 +- tests/integration/servlet-2.5-init-3/pom.xml | 2 +- tests/integration/servlet-2.5-init-4/pom.xml | 2 +- tests/integration/servlet-2.5-init-5/pom.xml | 2 +- tests/integration/servlet-2.5-init-6/pom.xml | 2 +- tests/integration/servlet-2.5-init-7/pom.xml | 2 +- tests/integration/servlet-2.5-init-8/pom.xml | 2 +- tests/integration/servlet-2.5-mvc-1/pom.xml | 2 +- tests/integration/servlet-2.5-mvc-2/pom.xml | 2 +- tests/integration/servlet-2.5-mvc-3/pom.xml | 2 +- tests/integration/servlet-2.5-reload/pom.xml | 2 +- tests/integration/servlet-3-async/pom.xml | 2 +- tests/integration/servlet-3-chunked-io/pom.xml | 2 +- tests/integration/servlet-3-filter/pom.xml | 2 +- tests/integration/servlet-3-gf-async/pom.xml | 2 +- tests/integration/servlet-3-inflector-1/pom.xml | 2 +- tests/integration/servlet-3-init-1/pom.xml | 2 +- tests/integration/servlet-3-init-2/pom.xml | 2 +- tests/integration/servlet-3-init-3/pom.xml | 2 +- tests/integration/servlet-3-init-4/pom.xml | 2 +- tests/integration/servlet-3-init-5/pom.xml | 2 +- tests/integration/servlet-3-init-6/pom.xml | 2 +- tests/integration/servlet-3-init-7/pom.xml | 2 +- tests/integration/servlet-3-init-8/pom.xml | 2 +- tests/integration/servlet-3-init-9/pom.xml | 2 +- tests/integration/servlet-3-init-provider/pom.xml | 2 +- tests/integration/servlet-3-params/pom.xml | 2 +- tests/integration/servlet-3-sse-1/pom.xml | 2 +- tests/integration/servlet-4.0-mvc-1/pom.xml | 2 +- tests/integration/servlet-request-wrapper-binding-2/pom.xml | 2 +- tests/integration/servlet-request-wrapper-binding/pom.xml | 2 +- tests/integration/servlet-tests/pom.xml | 2 +- tests/integration/sonar-test/pom.xml | 2 +- tests/integration/tracing-support/pom.xml | 2 +- tests/jmockit/pom.xml | 2 +- tests/mem-leaks/pom.xml | 2 +- tests/mem-leaks/redeployment/pom.xml | 2 +- .../redeployment/redeployment-hello-world-app-ref/pom.xml | 4 ++-- .../redeployment/redeployment-leaking-test-app/pom.xml | 2 +- .../mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml | 2 +- .../redeployment/redeployment-threadlocals-app/pom.xml | 2 +- tests/mem-leaks/test-cases/bean-param-leak/pom.xml | 2 +- tests/mem-leaks/test-cases/leaking-test-app/pom.xml | 2 +- tests/mem-leaks/test-cases/pom.xml | 2 +- tests/mem-leaks/test-cases/shutdown-hook-leak-client/pom.xml | 2 +- tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml | 2 +- tests/osgi/functional/pom.xml | 2 +- tests/osgi/pom.xml | 2 +- tests/performance/benchmarks/pom.xml | 2 +- tests/performance/pom.xml | 2 +- tests/performance/runners/jersey-grizzly-runner/pom.xml | 2 +- tests/performance/runners/pom.xml | 2 +- tests/performance/test-cases/assemblies/pom.xml | 2 +- tests/performance/test-cases/filter-dynamic/pom.xml | 2 +- tests/performance/test-cases/filter-global/pom.xml | 2 +- tests/performance/test-cases/filter-name/pom.xml | 2 +- tests/performance/test-cases/interceptor-dynamic/pom.xml | 2 +- tests/performance/test-cases/interceptor-global/pom.xml | 2 +- tests/performance/test-cases/interceptor-name/pom.xml | 2 +- tests/performance/test-cases/mbw-custom-provider/pom.xml | 2 +- tests/performance/test-cases/mbw-json-jackson/pom.xml | 2 +- tests/performance/test-cases/mbw-json-moxy/pom.xml | 2 +- tests/performance/test-cases/mbw-kryo/pom.xml | 2 +- tests/performance/test-cases/mbw-text-plain/pom.xml | 2 +- tests/performance/test-cases/mbw-xml-jaxb/pom.xml | 2 +- tests/performance/test-cases/mbw-xml-moxy/pom.xml | 2 +- tests/performance/test-cases/param-srl/pom.xml | 2 +- tests/performance/test-cases/pom.xml | 2 +- tests/performance/test-cases/proxy-injection/pom.xml | 2 +- tests/performance/tools/pom.xml | 2 +- tests/pom.xml | 2 +- tests/stress/pom.xml | 2 +- 342 files changed, 343 insertions(+), 343 deletions(-) diff --git a/archetypes/jersey-example-java8-webapp/pom.xml b/archetypes/jersey-example-java8-webapp/pom.xml index 93ec6876a7..b9f98c7c07 100644 --- a/archetypes/jersey-example-java8-webapp/pom.xml +++ b/archetypes/jersey-example-java8-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.archetypes project - 3.1.0-SNAPSHOT + 3.0.3 jersey-example-java8-webapp diff --git a/archetypes/jersey-heroku-webapp/pom.xml b/archetypes/jersey-heroku-webapp/pom.xml index 53d21df1af..0ebfb2a66d 100644 --- a/archetypes/jersey-heroku-webapp/pom.xml +++ b/archetypes/jersey-heroku-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.archetypes project - 3.1.0-SNAPSHOT + 3.0.3 maven-archetype diff --git a/archetypes/jersey-quickstart-grizzly2/pom.xml b/archetypes/jersey-quickstart-grizzly2/pom.xml index 5f8f7678a1..fe8329031d 100644 --- a/archetypes/jersey-quickstart-grizzly2/pom.xml +++ b/archetypes/jersey-quickstart-grizzly2/pom.xml @@ -21,7 +21,7 @@ org.glassfish.jersey.archetypes project - 3.1.0-SNAPSHOT + 3.0.3 jersey-quickstart-grizzly2 maven-archetype diff --git a/archetypes/jersey-quickstart-webapp/pom.xml b/archetypes/jersey-quickstart-webapp/pom.xml index 94c9f2a36e..6d6f47a267 100644 --- a/archetypes/jersey-quickstart-webapp/pom.xml +++ b/archetypes/jersey-quickstart-webapp/pom.xml @@ -21,7 +21,7 @@ org.glassfish.jersey.archetypes project - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 maven-archetype diff --git a/archetypes/pom.xml b/archetypes/pom.xml index bc619fe79c..538fe11f9a 100644 --- a/archetypes/pom.xml +++ b/archetypes/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.archetypes diff --git a/bom/pom.xml b/bom/pom.xml index a54b744c74..968f103881 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -30,7 +30,7 @@ org.glassfish.jersey jersey-bom - 3.1.0-SNAPSHOT + 3.0.3 pom jersey-bom diff --git a/bundles/apidocs/pom.xml b/bundles/apidocs/pom.xml index 40ebdd9016..210aa25d2f 100644 --- a/bundles/apidocs/pom.xml +++ b/bundles/apidocs/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.bundles project - 3.1.0-SNAPSHOT + 3.0.3 apidocs diff --git a/bundles/examples/pom.xml b/bundles/examples/pom.xml index a3e5e7b414..210f847138 100644 --- a/bundles/examples/pom.xml +++ b/bundles/examples/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.bundles project - 3.1.0-SNAPSHOT + 3.0.3 jersey-examples diff --git a/bundles/jaxrs-ri/pom.xml b/bundles/jaxrs-ri/pom.xml index 09982bdf98..98460224e4 100644 --- a/bundles/jaxrs-ri/pom.xml +++ b/bundles/jaxrs-ri/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.bundles project - 3.1.0-SNAPSHOT + 3.0.3 jaxrs-ri diff --git a/bundles/pom.xml b/bundles/pom.xml index 2e01ca35a3..94dcbd5b20 100644 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.bundles diff --git a/connectors/apache-connector/pom.xml b/connectors/apache-connector/pom.xml index 5f7b8bf5f3..d96d7a0612 100644 --- a/connectors/apache-connector/pom.xml +++ b/connectors/apache-connector/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.connectors project - 3.1.0-SNAPSHOT + 3.0.3 jersey-apache-connector diff --git a/connectors/grizzly-connector/pom.xml b/connectors/grizzly-connector/pom.xml index 670e7152ba..e46b32242c 100644 --- a/connectors/grizzly-connector/pom.xml +++ b/connectors/grizzly-connector/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.connectors project - 3.1.0-SNAPSHOT + 3.0.3 jersey-grizzly-connector diff --git a/connectors/helidon-connector/pom.xml b/connectors/helidon-connector/pom.xml index ec4b69a07d..ea30439081 100644 --- a/connectors/helidon-connector/pom.xml +++ b/connectors/helidon-connector/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.connectors - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/connectors/jdk-connector/pom.xml b/connectors/jdk-connector/pom.xml index 15b8cdc8fb..7aefaa49eb 100644 --- a/connectors/jdk-connector/pom.xml +++ b/connectors/jdk-connector/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.connectors project - 3.1.0-SNAPSHOT + 3.0.3 jersey-jdk-connector diff --git a/connectors/jetty-connector/pom.xml b/connectors/jetty-connector/pom.xml index 90761ac50a..838643743a 100644 --- a/connectors/jetty-connector/pom.xml +++ b/connectors/jetty-connector/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.connectors project - 3.1.0-SNAPSHOT + 3.0.3 jersey-jetty-connector diff --git a/connectors/netty-connector/pom.xml b/connectors/netty-connector/pom.xml index aa1fccf4d2..c6d9f064b0 100644 --- a/connectors/netty-connector/pom.xml +++ b/connectors/netty-connector/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.connectors project - 3.1.0-SNAPSHOT + 3.0.3 jersey-netty-connector diff --git a/connectors/pom.xml b/connectors/pom.xml index 332ec68765..b31da1bfc1 100644 --- a/connectors/pom.xml +++ b/connectors/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.connectors diff --git a/containers/glassfish/jersey-gf-ejb/pom.xml b/containers/glassfish/jersey-gf-ejb/pom.xml index d1174a4405..5d0a0aadba 100644 --- a/containers/glassfish/jersey-gf-ejb/pom.xml +++ b/containers/glassfish/jersey-gf-ejb/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers.glassfish project - 3.1.0-SNAPSHOT + 3.0.3 jersey-gf-ejb diff --git a/containers/glassfish/pom.xml b/containers/glassfish/pom.xml index 031e637d85..580ae13779 100644 --- a/containers/glassfish/pom.xml +++ b/containers/glassfish/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.containers.glassfish diff --git a/containers/grizzly2-http/pom.xml b/containers/grizzly2-http/pom.xml index 4969da9e46..634cb0635b 100644 --- a/containers/grizzly2-http/pom.xml +++ b/containers/grizzly2-http/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.containers project - 3.1.0-SNAPSHOT + 3.0.3 jersey-container-grizzly2-http diff --git a/containers/grizzly2-servlet/pom.xml b/containers/grizzly2-servlet/pom.xml index 04f334895f..2825374dcf 100644 --- a/containers/grizzly2-servlet/pom.xml +++ b/containers/grizzly2-servlet/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.1.0-SNAPSHOT + 3.0.3 jersey-container-grizzly2-servlet diff --git a/containers/jdk-http/pom.xml b/containers/jdk-http/pom.xml index 4ef3d77648..7f89cb27ba 100644 --- a/containers/jdk-http/pom.xml +++ b/containers/jdk-http/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.1.0-SNAPSHOT + 3.0.3 jersey-container-jdk-http diff --git a/containers/jersey-servlet-core/pom.xml b/containers/jersey-servlet-core/pom.xml index 1e69b906dd..e8da620e37 100644 --- a/containers/jersey-servlet-core/pom.xml +++ b/containers/jersey-servlet-core/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.1.0-SNAPSHOT + 3.0.3 jersey-container-servlet-core diff --git a/containers/jersey-servlet/pom.xml b/containers/jersey-servlet/pom.xml index e174f4101d..9581f07b6e 100644 --- a/containers/jersey-servlet/pom.xml +++ b/containers/jersey-servlet/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.1.0-SNAPSHOT + 3.0.3 jersey-container-servlet diff --git a/containers/jetty-http/pom.xml b/containers/jetty-http/pom.xml index f596934530..afc799a4ac 100644 --- a/containers/jetty-http/pom.xml +++ b/containers/jetty-http/pom.xml @@ -23,7 +23,7 @@ project org.glassfish.jersey.containers - 3.1.0-SNAPSHOT + 3.0.3 jersey-container-jetty-http diff --git a/containers/jetty-servlet/pom.xml b/containers/jetty-servlet/pom.xml index 7f483ec8e8..9db85657ad 100644 --- a/containers/jetty-servlet/pom.xml +++ b/containers/jetty-servlet/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.1.0-SNAPSHOT + 3.0.3 jersey-container-jetty-servlet diff --git a/containers/netty-http/pom.xml b/containers/netty-http/pom.xml index 757d0f71ec..3c4ee0b401 100644 --- a/containers/netty-http/pom.xml +++ b/containers/netty-http/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.1.0-SNAPSHOT + 3.0.3 jersey-container-netty-http diff --git a/containers/pom.xml b/containers/pom.xml index c245bceea3..c21ea219c9 100644 --- a/containers/pom.xml +++ b/containers/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.containers diff --git a/containers/simple-http/pom.xml b/containers/simple-http/pom.xml index 4de8d497e5..4e7472aedc 100644 --- a/containers/simple-http/pom.xml +++ b/containers/simple-http/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.1.0-SNAPSHOT + 3.0.3 jersey-container-simple-http diff --git a/core-client/pom.xml b/core-client/pom.xml index 7639c19661..ed78c389c2 100644 --- a/core-client/pom.xml +++ b/core-client/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.core diff --git a/core-common/pom.xml b/core-common/pom.xml index 44a380137d..b5f1c0f969 100644 --- a/core-common/pom.xml +++ b/core-common/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.core diff --git a/core-server/pom.xml b/core-server/pom.xml index 12a183fba4..bdfa5ff160 100644 --- a/core-server/pom.xml +++ b/core-server/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.core diff --git a/docs/pom.xml b/docs/pom.xml index 8210134b91..68a63802d2 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 jersey-documentation pom diff --git a/examples/assemblies/pom.xml b/examples/assemblies/pom.xml index f021c2f343..e8486afd1f 100644 --- a/examples/assemblies/pom.xml +++ b/examples/assemblies/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 assemblies diff --git a/examples/bookstore-webapp/pom.xml b/examples/bookstore-webapp/pom.xml index 20f9774d81..c277cd0bcd 100644 --- a/examples/bookstore-webapp/pom.xml +++ b/examples/bookstore-webapp/pom.xml @@ -35,7 +35,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 bookstore-webapp diff --git a/examples/cdi-webapp/pom.xml b/examples/cdi-webapp/pom.xml index 2b80d43c85..eba75544c2 100644 --- a/examples/cdi-webapp/pom.xml +++ b/examples/cdi-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 cdi-webapp diff --git a/examples/clipboard-programmatic/pom.xml b/examples/clipboard-programmatic/pom.xml index 82fe029b07..0634c5499b 100644 --- a/examples/clipboard-programmatic/pom.xml +++ b/examples/clipboard-programmatic/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 clipboard-programmatic diff --git a/examples/clipboard/pom.xml b/examples/clipboard/pom.xml index 695855f083..1b475c03e5 100644 --- a/examples/clipboard/pom.xml +++ b/examples/clipboard/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 clipboard diff --git a/examples/declarative-linking/pom.xml b/examples/declarative-linking/pom.xml index 3fdd6ac1ac..0ff82acde3 100644 --- a/examples/declarative-linking/pom.xml +++ b/examples/declarative-linking/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 declarative-linking diff --git a/examples/entity-filtering-security/pom.xml b/examples/entity-filtering-security/pom.xml index 98a441e31c..cb8730b874 100644 --- a/examples/entity-filtering-security/pom.xml +++ b/examples/entity-filtering-security/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 entity-filtering-security diff --git a/examples/entity-filtering-selectable/pom.xml b/examples/entity-filtering-selectable/pom.xml index 503931310b..fbc181799d 100644 --- a/examples/entity-filtering-selectable/pom.xml +++ b/examples/entity-filtering-selectable/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 entity-filtering-selectable diff --git a/examples/entity-filtering/pom.xml b/examples/entity-filtering/pom.xml index 5dd460f66e..145bf685b2 100644 --- a/examples/entity-filtering/pom.xml +++ b/examples/entity-filtering/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 entity-filtering diff --git a/examples/exception-mapping/pom.xml b/examples/exception-mapping/pom.xml index 44af64e60a..6d95b4ee88 100644 --- a/examples/exception-mapping/pom.xml +++ b/examples/exception-mapping/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 exception-mapping diff --git a/examples/freemarker-webapp/pom.xml b/examples/freemarker-webapp/pom.xml index b6826c2bea..49ddc5a466 100644 --- a/examples/freemarker-webapp/pom.xml +++ b/examples/freemarker-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 freemarker-webapp diff --git a/examples/groovy/pom.xml b/examples/groovy/pom.xml index 93b3ccefb2..6e6d196d73 100644 --- a/examples/groovy/pom.xml +++ b/examples/groovy/pom.xml @@ -16,7 +16,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 groovy jar diff --git a/examples/helloworld-benchmark/pom.xml b/examples/helloworld-benchmark/pom.xml index 175c136aa5..d7500fff80 100644 --- a/examples/helloworld-benchmark/pom.xml +++ b/examples/helloworld-benchmark/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 helloworld-benchmark diff --git a/examples/helloworld-cdi2-se/pom.xml b/examples/helloworld-cdi2-se/pom.xml index 433e9b3445..ebdfc0779e 100644 --- a/examples/helloworld-cdi2-se/pom.xml +++ b/examples/helloworld-cdi2-se/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 helloworld-cdi2-se diff --git a/examples/helloworld-netty/pom.xml b/examples/helloworld-netty/pom.xml index 769fc84104..b71bebdc67 100644 --- a/examples/helloworld-netty/pom.xml +++ b/examples/helloworld-netty/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 helloworld-netty diff --git a/examples/helloworld-programmatic/pom.xml b/examples/helloworld-programmatic/pom.xml index 03dd6fd3fc..b98cc1b338 100644 --- a/examples/helloworld-programmatic/pom.xml +++ b/examples/helloworld-programmatic/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 helloworld-programmatic diff --git a/examples/helloworld-pure-jax-rs/pom.xml b/examples/helloworld-pure-jax-rs/pom.xml index 42933b9a7d..838d39f2eb 100644 --- a/examples/helloworld-pure-jax-rs/pom.xml +++ b/examples/helloworld-pure-jax-rs/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 helloworld-pure-jax-rs diff --git a/examples/helloworld-webapp/pom.xml b/examples/helloworld-webapp/pom.xml index 88957803c6..7904e3e7fd 100644 --- a/examples/helloworld-webapp/pom.xml +++ b/examples/helloworld-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 helloworld-webapp diff --git a/examples/helloworld-weld/pom.xml b/examples/helloworld-weld/pom.xml index 4ad42c1948..e2a988e467 100644 --- a/examples/helloworld-weld/pom.xml +++ b/examples/helloworld-weld/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 helloworld-weld diff --git a/examples/helloworld/pom.xml b/examples/helloworld/pom.xml index 1fa02a0fbf..3e478491d5 100644 --- a/examples/helloworld/pom.xml +++ b/examples/helloworld/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 helloworld diff --git a/examples/http-patch/pom.xml b/examples/http-patch/pom.xml index 5f58858528..769f16f0f3 100644 --- a/examples/http-patch/pom.xml +++ b/examples/http-patch/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 http-patch diff --git a/examples/http-trace/pom.xml b/examples/http-trace/pom.xml index 1feb5d2e4a..f09fc54f7c 100644 --- a/examples/http-trace/pom.xml +++ b/examples/http-trace/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 http-trace diff --git a/examples/https-clientserver-grizzly/pom.xml b/examples/https-clientserver-grizzly/pom.xml index 9a68afc48d..136e67f52f 100644 --- a/examples/https-clientserver-grizzly/pom.xml +++ b/examples/https-clientserver-grizzly/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 https-clientserver-grizzly diff --git a/examples/https-server-glassfish/pom.xml b/examples/https-server-glassfish/pom.xml index b02b885d10..e45527be9d 100644 --- a/examples/https-server-glassfish/pom.xml +++ b/examples/https-server-glassfish/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 https-server-glassfish diff --git a/examples/java8-webapp/pom.xml b/examples/java8-webapp/pom.xml index 7513db6bbe..f84cdd4c04 100644 --- a/examples/java8-webapp/pom.xml +++ b/examples/java8-webapp/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 java8-webapp diff --git a/examples/jaxb/pom.xml b/examples/jaxb/pom.xml index aae56c4fe9..75ed075ea3 100644 --- a/examples/jaxb/pom.xml +++ b/examples/jaxb/pom.xml @@ -16,7 +16,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 jaxb diff --git a/examples/jaxrs-types-injection/pom.xml b/examples/jaxrs-types-injection/pom.xml index 2a054a044e..24a8ad951e 100644 --- a/examples/jaxrs-types-injection/pom.xml +++ b/examples/jaxrs-types-injection/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 jaxrs-types-injection diff --git a/examples/jersey-ejb/pom.xml b/examples/jersey-ejb/pom.xml index d424f33bd3..8009db4770 100644 --- a/examples/jersey-ejb/pom.xml +++ b/examples/jersey-ejb/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 jersey-ejb diff --git a/examples/json-binding-webapp/pom.xml b/examples/json-binding-webapp/pom.xml index f08b361db2..1c34315696 100644 --- a/examples/json-binding-webapp/pom.xml +++ b/examples/json-binding-webapp/pom.xml @@ -16,7 +16,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 json-binding-webapp diff --git a/examples/json-jackson/pom.xml b/examples/json-jackson/pom.xml index dc41e074b7..c35d952980 100644 --- a/examples/json-jackson/pom.xml +++ b/examples/json-jackson/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 json-jackson diff --git a/examples/json-jettison/pom.xml b/examples/json-jettison/pom.xml index 7d0edec20d..1f3e910148 100644 --- a/examples/json-jettison/pom.xml +++ b/examples/json-jettison/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 json-jettison diff --git a/examples/json-moxy/pom.xml b/examples/json-moxy/pom.xml index 4bac67cf34..bc120db8cc 100644 --- a/examples/json-moxy/pom.xml +++ b/examples/json-moxy/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 json-moxy diff --git a/examples/json-processing-webapp/pom.xml b/examples/json-processing-webapp/pom.xml index e72b53d456..ebddabe17c 100644 --- a/examples/json-processing-webapp/pom.xml +++ b/examples/json-processing-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 json-processing-webapp diff --git a/examples/json-with-padding/pom.xml b/examples/json-with-padding/pom.xml index 0526192741..1f0d1de0cc 100644 --- a/examples/json-with-padding/pom.xml +++ b/examples/json-with-padding/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 json-with-padding diff --git a/examples/managed-beans-webapp/pom.xml b/examples/managed-beans-webapp/pom.xml index 49901dea35..153df3c224 100644 --- a/examples/managed-beans-webapp/pom.xml +++ b/examples/managed-beans-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 managed-beans-webapp diff --git a/examples/managed-client-simple-webapp/pom.xml b/examples/managed-client-simple-webapp/pom.xml index 63baeb4f01..933ac7c9d7 100644 --- a/examples/managed-client-simple-webapp/pom.xml +++ b/examples/managed-client-simple-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 managed-client-simple-webapp diff --git a/examples/managed-client-webapp/pom.xml b/examples/managed-client-webapp/pom.xml index b127c5bd5c..00b1a95061 100644 --- a/examples/managed-client-webapp/pom.xml +++ b/examples/managed-client-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 managed-client-webapp diff --git a/examples/managed-client/pom.xml b/examples/managed-client/pom.xml index 5849c9c6e5..156069384b 100644 --- a/examples/managed-client/pom.xml +++ b/examples/managed-client/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 managed-client diff --git a/examples/multipart-webapp/pom.xml b/examples/multipart-webapp/pom.xml index 3126219d4f..d42ef237f6 100644 --- a/examples/multipart-webapp/pom.xml +++ b/examples/multipart-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 multipart-webapp diff --git a/examples/open-tracing/pom.xml b/examples/open-tracing/pom.xml index 41269fcf43..6dba7afe9b 100644 --- a/examples/open-tracing/pom.xml +++ b/examples/open-tracing/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 open-tracing diff --git a/examples/pom.xml b/examples/pom.xml index 6fa1b983fd..4755312d93 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 diff --git a/examples/rx-client-webapp/pom.xml b/examples/rx-client-webapp/pom.xml index 08d0bdc063..3be91dc705 100644 --- a/examples/rx-client-webapp/pom.xml +++ b/examples/rx-client-webapp/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 rx-client-webapp diff --git a/examples/server-async-managed/pom.xml b/examples/server-async-managed/pom.xml index f4e1a34570..a620646b69 100644 --- a/examples/server-async-managed/pom.xml +++ b/examples/server-async-managed/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 server-async-managed diff --git a/examples/server-async-standalone/client/pom.xml b/examples/server-async-standalone/client/pom.xml index 0670cee746..8751a08f06 100644 --- a/examples/server-async-standalone/client/pom.xml +++ b/examples/server-async-standalone/client/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples server-async-standalone - 3.1.0-SNAPSHOT + 3.0.3 server-async-standalone-client diff --git a/examples/server-async-standalone/pom.xml b/examples/server-async-standalone/pom.xml index 302fc951ff..9ed2829035 100644 --- a/examples/server-async-standalone/pom.xml +++ b/examples/server-async-standalone/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 server-async-standalone diff --git a/examples/server-async-standalone/webapp/pom.xml b/examples/server-async-standalone/webapp/pom.xml index b00d0c3750..3d33237467 100644 --- a/examples/server-async-standalone/webapp/pom.xml +++ b/examples/server-async-standalone/webapp/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples server-async-standalone - 3.1.0-SNAPSHOT + 3.0.3 server-async-standalone-webapp diff --git a/examples/server-async/pom.xml b/examples/server-async/pom.xml index 3e3da8ae66..04209ee92c 100644 --- a/examples/server-async/pom.xml +++ b/examples/server-async/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 server-async diff --git a/examples/server-sent-events-jaxrs/pom.xml b/examples/server-sent-events-jaxrs/pom.xml index ac547cb1d5..7047374084 100644 --- a/examples/server-sent-events-jaxrs/pom.xml +++ b/examples/server-sent-events-jaxrs/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 server-sent-events-jaxrs diff --git a/examples/server-sent-events-jersey/pom.xml b/examples/server-sent-events-jersey/pom.xml index 421eb86a5c..838c17676a 100644 --- a/examples/server-sent-events-jersey/pom.xml +++ b/examples/server-sent-events-jersey/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 server-sent-events-jersey diff --git a/examples/servlet3-webapp/pom.xml b/examples/servlet3-webapp/pom.xml index f8442e53de..4e44af8e14 100644 --- a/examples/servlet3-webapp/pom.xml +++ b/examples/servlet3-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 servlet3-webapp diff --git a/examples/simple-console/pom.xml b/examples/simple-console/pom.xml index 3397414083..4ac3adf8d3 100644 --- a/examples/simple-console/pom.xml +++ b/examples/simple-console/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 simple-console diff --git a/examples/sse-item-store-jaxrs-webapp/pom.xml b/examples/sse-item-store-jaxrs-webapp/pom.xml index db257dbfb4..93db270433 100644 --- a/examples/sse-item-store-jaxrs-webapp/pom.xml +++ b/examples/sse-item-store-jaxrs-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 sse-item-store-jaxrs-webapp diff --git a/examples/sse-item-store-jersey-webapp/pom.xml b/examples/sse-item-store-jersey-webapp/pom.xml index 1d7a283ac3..6e5eb1bb88 100644 --- a/examples/sse-item-store-jersey-webapp/pom.xml +++ b/examples/sse-item-store-jersey-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.1.0-SNAPSHOT + 3.0.3 sse-item-store-jersey-webapp diff --git a/examples/sse-twitter-aggregator/pom.xml b/examples/sse-twitter-aggregator/pom.xml index 42156c20c6..c81714dab4 100644 --- a/examples/sse-twitter-aggregator/pom.xml +++ b/examples/sse-twitter-aggregator/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 sse-twitter-aggregator diff --git a/examples/system-properties-example/pom.xml b/examples/system-properties-example/pom.xml index 0989641b49..1f2e96e07a 100644 --- a/examples/system-properties-example/pom.xml +++ b/examples/system-properties-example/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 system-properties-example diff --git a/examples/webapp-example-parent/pom.xml b/examples/webapp-example-parent/pom.xml index 52b3728c07..9be34369a2 100644 --- a/examples/webapp-example-parent/pom.xml +++ b/examples/webapp-example-parent/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 webapp-example-parent diff --git a/examples/xml-moxy/pom.xml b/examples/xml-moxy/pom.xml index e753405715..464e5cac9f 100644 --- a/examples/xml-moxy/pom.xml +++ b/examples/xml-moxy/pom.xml @@ -16,7 +16,7 @@ org.glassfish.jersey.examples project - 3.1.0-SNAPSHOT + 3.0.3 xml-moxy diff --git a/ext/bean-validation/pom.xml b/ext/bean-validation/pom.xml index 6371303f28..bdd6ba5acd 100644 --- a/ext/bean-validation/pom.xml +++ b/ext/bean-validation/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.ext project - 3.1.0-SNAPSHOT + 3.0.3 jersey-bean-validation diff --git a/ext/cdi/jersey-cdi-rs-inject/pom.xml b/ext/cdi/jersey-cdi-rs-inject/pom.xml index 43072b2c94..b0a5956ae6 100644 --- a/ext/cdi/jersey-cdi-rs-inject/pom.xml +++ b/ext/cdi/jersey-cdi-rs-inject/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.ext.cdi - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml b/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml index 4730b28ac4..9827f69a18 100644 --- a/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml +++ b/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.cdi project - 3.1.0-SNAPSHOT + 3.0.3 jersey-cdi1x-ban-custom-hk2-binding diff --git a/ext/cdi/jersey-cdi1x-servlet/pom.xml b/ext/cdi/jersey-cdi1x-servlet/pom.xml index db579a866a..b401fc6aea 100644 --- a/ext/cdi/jersey-cdi1x-servlet/pom.xml +++ b/ext/cdi/jersey-cdi1x-servlet/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.cdi project - 3.1.0-SNAPSHOT + 3.0.3 jersey-cdi1x-servlet diff --git a/ext/cdi/jersey-cdi1x-transaction/pom.xml b/ext/cdi/jersey-cdi1x-transaction/pom.xml index e63aeb88ba..cdcd78e3d0 100644 --- a/ext/cdi/jersey-cdi1x-transaction/pom.xml +++ b/ext/cdi/jersey-cdi1x-transaction/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.cdi project - 3.1.0-SNAPSHOT + 3.0.3 jersey-cdi1x-transaction diff --git a/ext/cdi/jersey-cdi1x-validation/pom.xml b/ext/cdi/jersey-cdi1x-validation/pom.xml index 8dfe43e662..b5cb814505 100644 --- a/ext/cdi/jersey-cdi1x-validation/pom.xml +++ b/ext/cdi/jersey-cdi1x-validation/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.cdi project - 3.1.0-SNAPSHOT + 3.0.3 jersey-cdi1x-validation diff --git a/ext/cdi/jersey-cdi1x/pom.xml b/ext/cdi/jersey-cdi1x/pom.xml index ced26bfcaf..75a21b1f6a 100644 --- a/ext/cdi/jersey-cdi1x/pom.xml +++ b/ext/cdi/jersey-cdi1x/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.cdi project - 3.1.0-SNAPSHOT + 3.0.3 jersey-cdi1x diff --git a/ext/cdi/jersey-weld2-se/pom.xml b/ext/cdi/jersey-weld2-se/pom.xml index d239fd9ee3..759fc9d83e 100644 --- a/ext/cdi/jersey-weld2-se/pom.xml +++ b/ext/cdi/jersey-weld2-se/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.cdi project - 3.1.0-SNAPSHOT + 3.0.3 jersey-weld2-se diff --git a/ext/cdi/pom.xml b/ext/cdi/pom.xml index 7dcbac2e05..d461355537 100644 --- a/ext/cdi/pom.xml +++ b/ext/cdi/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.ext.cdi diff --git a/ext/entity-filtering/pom.xml b/ext/entity-filtering/pom.xml index 854640a719..6b4c3ccbd7 100644 --- a/ext/entity-filtering/pom.xml +++ b/ext/entity-filtering/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.1.0-SNAPSHOT + 3.0.3 jersey-entity-filtering diff --git a/ext/metainf-services/pom.xml b/ext/metainf-services/pom.xml index 5520ed0d7e..9d8a9517d5 100644 --- a/ext/metainf-services/pom.xml +++ b/ext/metainf-services/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.1.0-SNAPSHOT + 3.0.3 jersey-metainf-services diff --git a/ext/microprofile/mp-config/pom.xml b/ext/microprofile/mp-config/pom.xml index eebc242422..5bb7a41b85 100644 --- a/ext/microprofile/mp-config/pom.xml +++ b/ext/microprofile/mp-config/pom.xml @@ -23,7 +23,7 @@ project org.glassfish.jersey.ext.microprofile - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/ext/microprofile/pom.xml b/ext/microprofile/pom.xml index 6bc3d24fe5..ee7e7a08ef 100644 --- a/ext/microprofile/pom.xml +++ b/ext/microprofile/pom.xml @@ -23,7 +23,7 @@ project org.glassfish.jersey.ext - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/ext/mvc-bean-validation/pom.xml b/ext/mvc-bean-validation/pom.xml index a030400e8f..c6f7053135 100644 --- a/ext/mvc-bean-validation/pom.xml +++ b/ext/mvc-bean-validation/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.1.0-SNAPSHOT + 3.0.3 jersey-mvc-bean-validation diff --git a/ext/mvc-freemarker/pom.xml b/ext/mvc-freemarker/pom.xml index 029cbd0195..0f2d5d7afd 100644 --- a/ext/mvc-freemarker/pom.xml +++ b/ext/mvc-freemarker/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.1.0-SNAPSHOT + 3.0.3 jersey-mvc-freemarker diff --git a/ext/mvc-jsp/pom.xml b/ext/mvc-jsp/pom.xml index 1235bbc540..6fc7a0a2a2 100644 --- a/ext/mvc-jsp/pom.xml +++ b/ext/mvc-jsp/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.1.0-SNAPSHOT + 3.0.3 jersey-mvc-jsp diff --git a/ext/mvc-mustache/pom.xml b/ext/mvc-mustache/pom.xml index 012bb364a3..af136c6c5c 100644 --- a/ext/mvc-mustache/pom.xml +++ b/ext/mvc-mustache/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.1.0-SNAPSHOT + 3.0.3 jersey-mvc-mustache diff --git a/ext/mvc/pom.xml b/ext/mvc/pom.xml index 168afa700f..f956d5a0af 100644 --- a/ext/mvc/pom.xml +++ b/ext/mvc/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.1.0-SNAPSHOT + 3.0.3 jersey-mvc diff --git a/ext/pom.xml b/ext/pom.xml index c4f3784fda..66870396eb 100644 --- a/ext/pom.xml +++ b/ext/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.ext diff --git a/ext/proxy-client/pom.xml b/ext/proxy-client/pom.xml index 3aef09483a..7e1ec7c040 100644 --- a/ext/proxy-client/pom.xml +++ b/ext/proxy-client/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.1.0-SNAPSHOT + 3.0.3 jersey-proxy-client diff --git a/ext/rx/pom.xml b/ext/rx/pom.xml index 6b88f86ca6..50478c8972 100644 --- a/ext/rx/pom.xml +++ b/ext/rx/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.ext.rx diff --git a/ext/rx/rx-client-guava/pom.xml b/ext/rx/rx-client-guava/pom.xml index a753c89107..44dab0bd51 100644 --- a/ext/rx/rx-client-guava/pom.xml +++ b/ext/rx/rx-client-guava/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.rx project - 3.1.0-SNAPSHOT + 3.0.3 jersey-rx-client-guava diff --git a/ext/rx/rx-client-rxjava/pom.xml b/ext/rx/rx-client-rxjava/pom.xml index 28b3cab676..2f711aa355 100644 --- a/ext/rx/rx-client-rxjava/pom.xml +++ b/ext/rx/rx-client-rxjava/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.rx project - 3.1.0-SNAPSHOT + 3.0.3 jersey-rx-client-rxjava diff --git a/ext/rx/rx-client-rxjava2/pom.xml b/ext/rx/rx-client-rxjava2/pom.xml index ad824b8556..cc908c3593 100644 --- a/ext/rx/rx-client-rxjava2/pom.xml +++ b/ext/rx/rx-client-rxjava2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.rx project - 3.1.0-SNAPSHOT + 3.0.3 jersey-rx-client-rxjava2 diff --git a/ext/wadl-doclet/pom.xml b/ext/wadl-doclet/pom.xml index d742e7de16..7bdeca9162 100644 --- a/ext/wadl-doclet/pom.xml +++ b/ext/wadl-doclet/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.ext - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 jersey-wadl-doclet diff --git a/incubator/cdi-inject-weld/pom.xml b/incubator/cdi-inject-weld/pom.xml index cc548c0233..9af1ec40b3 100644 --- a/incubator/cdi-inject-weld/pom.xml +++ b/incubator/cdi-inject-weld/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.incubator project - 3.1.0-SNAPSHOT + 3.0.3 jersey-cdi-inject-weld diff --git a/incubator/declarative-linking/pom.xml b/incubator/declarative-linking/pom.xml index 0fa4aa05c4..badd250e33 100644 --- a/incubator/declarative-linking/pom.xml +++ b/incubator/declarative-linking/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.incubator project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.ext diff --git a/incubator/gae-integration/pom.xml b/incubator/gae-integration/pom.xml index bb0225668f..4a219112a9 100644 --- a/incubator/gae-integration/pom.xml +++ b/incubator/gae-integration/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.incubator project - 3.1.0-SNAPSHOT + 3.0.3 jersey-gae-integration diff --git a/incubator/html-json/pom.xml b/incubator/html-json/pom.xml index 9a778b3fed..7970da13d7 100644 --- a/incubator/html-json/pom.xml +++ b/incubator/html-json/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.incubator project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.media diff --git a/incubator/kryo/pom.xml b/incubator/kryo/pom.xml index 3e7eda623c..0abf0e1556 100644 --- a/incubator/kryo/pom.xml +++ b/incubator/kryo/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.incubator project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.media diff --git a/incubator/open-tracing/pom.xml b/incubator/open-tracing/pom.xml index dc747005d6..32494ae533 100644 --- a/incubator/open-tracing/pom.xml +++ b/incubator/open-tracing/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.incubator project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.incubator diff --git a/incubator/pom.xml b/incubator/pom.xml index f9733949e5..31c1dce415 100644 --- a/incubator/pom.xml +++ b/incubator/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.incubator diff --git a/inject/cdi2-se/pom.xml b/inject/cdi2-se/pom.xml index 580350f89c..2cf6e10423 100644 --- a/inject/cdi2-se/pom.xml +++ b/inject/cdi2-se/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.inject project - 3.1.0-SNAPSHOT + 3.0.3 jersey-cdi2-se diff --git a/inject/hk2/pom.xml b/inject/hk2/pom.xml index 0e94b18de9..ac4ecaf13d 100644 --- a/inject/hk2/pom.xml +++ b/inject/hk2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.inject project - 3.1.0-SNAPSHOT + 3.0.3 jersey-hk2 diff --git a/inject/pom.xml b/inject/pom.xml index 7e39ebddc3..f554044342 100644 --- a/inject/pom.xml +++ b/inject/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.inject diff --git a/media/jaxb/pom.xml b/media/jaxb/pom.xml index da75386c2e..c84509bbd2 100644 --- a/media/jaxb/pom.xml +++ b/media/jaxb/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.1.0-SNAPSHOT + 3.0.3 jersey-media-jaxb diff --git a/media/json-binding/pom.xml b/media/json-binding/pom.xml index bae44fa3ff..b5e4df9150 100644 --- a/media/json-binding/pom.xml +++ b/media/json-binding/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.1.0-SNAPSHOT + 3.0.3 jersey-media-json-binding diff --git a/media/json-jackson/pom.xml b/media/json-jackson/pom.xml index cbc01771b5..f2e766868b 100644 --- a/media/json-jackson/pom.xml +++ b/media/json-jackson/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.1.0-SNAPSHOT + 3.0.3 jersey-media-json-jackson diff --git a/media/json-jettison/pom.xml b/media/json-jettison/pom.xml index 78748cccbb..face80b8a9 100644 --- a/media/json-jettison/pom.xml +++ b/media/json-jettison/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.1.0-SNAPSHOT + 3.0.3 jersey-media-json-jettison diff --git a/media/json-processing/pom.xml b/media/json-processing/pom.xml index 834aef8133..1051dc8506 100644 --- a/media/json-processing/pom.xml +++ b/media/json-processing/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.1.0-SNAPSHOT + 3.0.3 jersey-media-json-processing diff --git a/media/moxy/pom.xml b/media/moxy/pom.xml index e7401bc620..7093bfcb4c 100644 --- a/media/moxy/pom.xml +++ b/media/moxy/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.1.0-SNAPSHOT + 3.0.3 jersey-media-moxy diff --git a/media/multipart/pom.xml b/media/multipart/pom.xml index b4f2a65d9e..cac2f69826 100644 --- a/media/multipart/pom.xml +++ b/media/multipart/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.1.0-SNAPSHOT + 3.0.3 jersey-media-multipart diff --git a/media/pom.xml b/media/pom.xml index b1028e8492..4b2bf41816 100644 --- a/media/pom.xml +++ b/media/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.media diff --git a/media/sse/pom.xml b/media/sse/pom.xml index 268aab1e1f..be622160c1 100644 --- a/media/sse/pom.xml +++ b/media/sse/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.1.0-SNAPSHOT + 3.0.3 jersey-media-sse diff --git a/pom.xml b/pom.xml index fd031610fa..fe899b7228 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ org.glassfish.jersey project pom - 3.1.0-SNAPSHOT + 3.0.3 jersey Eclipse Jersey is the open source (under dual EPL+GPL license) Jakarta RESTful WebServices 3.0 diff --git a/security/oauth1-client/pom.xml b/security/oauth1-client/pom.xml index 09be3d2887..c28ebdec03 100644 --- a/security/oauth1-client/pom.xml +++ b/security/oauth1-client/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.security project - 3.1.0-SNAPSHOT + 3.0.3 oauth1-client diff --git a/security/oauth1-server/pom.xml b/security/oauth1-server/pom.xml index 53095659f5..83b91fba31 100644 --- a/security/oauth1-server/pom.xml +++ b/security/oauth1-server/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.security project - 3.1.0-SNAPSHOT + 3.0.3 oauth1-server diff --git a/security/oauth1-signature/pom.xml b/security/oauth1-signature/pom.xml index b96a096229..5f4e3bfb3c 100644 --- a/security/oauth1-signature/pom.xml +++ b/security/oauth1-signature/pom.xml @@ -21,7 +21,7 @@ org.glassfish.jersey.security project - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/security/oauth2-client/pom.xml b/security/oauth2-client/pom.xml index dc1923acae..05b6486c1c 100644 --- a/security/oauth2-client/pom.xml +++ b/security/oauth2-client/pom.xml @@ -21,7 +21,7 @@ org.glassfish.jersey.security project - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/security/pom.xml b/security/pom.xml index 8d2e7bd87d..283c348b71 100644 --- a/security/pom.xml +++ b/security/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.security diff --git a/test-framework/core/pom.xml b/test-framework/core/pom.xml index dbf30c7da7..d6c40d4c96 100644 --- a/test-framework/core/pom.xml +++ b/test-framework/core/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework project - 3.1.0-SNAPSHOT + 3.0.3 jersey-test-framework-core diff --git a/test-framework/maven/container-runner-maven-plugin/pom.xml b/test-framework/maven/container-runner-maven-plugin/pom.xml index 2c2c1694cf..690fc7a9c8 100644 --- a/test-framework/maven/container-runner-maven-plugin/pom.xml +++ b/test-framework/maven/container-runner-maven-plugin/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.maven project - 3.1.0-SNAPSHOT + 3.0.3 container-runner-maven-plugin diff --git a/test-framework/maven/custom-enforcer-rules/pom.xml b/test-framework/maven/custom-enforcer-rules/pom.xml index 8956e02088..f30f32fccf 100644 --- a/test-framework/maven/custom-enforcer-rules/pom.xml +++ b/test-framework/maven/custom-enforcer-rules/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.maven project - 3.1.0-SNAPSHOT + 3.0.3 custom-enforcer-rules diff --git a/test-framework/maven/pom.xml b/test-framework/maven/pom.xml index 5bdb5a3407..b711584054 100644 --- a/test-framework/maven/pom.xml +++ b/test-framework/maven/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.test-framework project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.test-framework.maven diff --git a/test-framework/memleak-test-common/pom.xml b/test-framework/memleak-test-common/pom.xml index ffef988d10..36fafcfe90 100644 --- a/test-framework/memleak-test-common/pom.xml +++ b/test-framework/memleak-test-common/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework project - 3.1.0-SNAPSHOT + 3.0.3 memleak-test-common diff --git a/test-framework/pom.xml b/test-framework/pom.xml index 25fbfb3ee1..a1546d3ebe 100644 --- a/test-framework/pom.xml +++ b/test-framework/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.test-framework diff --git a/test-framework/providers/bundle/pom.xml b/test-framework/providers/bundle/pom.xml index 2101fb6e19..dfc346dde5 100644 --- a/test-framework/providers/bundle/pom.xml +++ b/test-framework/providers/bundle/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.providers project - 3.1.0-SNAPSHOT + 3.0.3 jersey-test-framework-provider-bundle diff --git a/test-framework/providers/external/pom.xml b/test-framework/providers/external/pom.xml index b219cec2b0..c454e5c366 100644 --- a/test-framework/providers/external/pom.xml +++ b/test-framework/providers/external/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.providers project - 3.1.0-SNAPSHOT + 3.0.3 jersey-test-framework-provider-external diff --git a/test-framework/providers/grizzly2/pom.xml b/test-framework/providers/grizzly2/pom.xml index efcf674c92..3ffe9ec9d9 100644 --- a/test-framework/providers/grizzly2/pom.xml +++ b/test-framework/providers/grizzly2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.providers project - 3.1.0-SNAPSHOT + 3.0.3 jersey-test-framework-provider-grizzly2 diff --git a/test-framework/providers/inmemory/pom.xml b/test-framework/providers/inmemory/pom.xml index d2630857a0..f8a6894b3d 100644 --- a/test-framework/providers/inmemory/pom.xml +++ b/test-framework/providers/inmemory/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.providers project - 3.1.0-SNAPSHOT + 3.0.3 jersey-test-framework-provider-inmemory diff --git a/test-framework/providers/jdk-http/pom.xml b/test-framework/providers/jdk-http/pom.xml index a2bb0e8bbf..a08bf4ae49 100644 --- a/test-framework/providers/jdk-http/pom.xml +++ b/test-framework/providers/jdk-http/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.providers project - 3.1.0-SNAPSHOT + 3.0.3 jersey-test-framework-provider-jdk-http diff --git a/test-framework/providers/jetty/pom.xml b/test-framework/providers/jetty/pom.xml index 5436e9b25e..b2f0f385a2 100644 --- a/test-framework/providers/jetty/pom.xml +++ b/test-framework/providers/jetty/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.test-framework.providers - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/test-framework/providers/netty/pom.xml b/test-framework/providers/netty/pom.xml index db110cf02a..428434d394 100644 --- a/test-framework/providers/netty/pom.xml +++ b/test-framework/providers/netty/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.providers project - 3.1.0-SNAPSHOT + 3.0.3 jersey-test-framework-provider-netty diff --git a/test-framework/providers/pom.xml b/test-framework/providers/pom.xml index 6671a27820..90989bf8bb 100644 --- a/test-framework/providers/pom.xml +++ b/test-framework/providers/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.test-framework.providers diff --git a/test-framework/providers/simple/pom.xml b/test-framework/providers/simple/pom.xml index 49b7e990d6..c286d2e2d2 100644 --- a/test-framework/providers/simple/pom.xml +++ b/test-framework/providers/simple/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.test-framework.providers - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/test-framework/util/pom.xml b/test-framework/util/pom.xml index a5663ae10a..0af34e5c17 100644 --- a/test-framework/util/pom.xml +++ b/test-framework/util/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework project - 3.1.0-SNAPSHOT + 3.0.3 jersey-test-framework-util diff --git a/tests/e2e-client/pom.xml b/tests/e2e-client/pom.xml index 55e95d3ae9..17c9d51e59 100644 --- a/tests/e2e-client/pom.xml +++ b/tests/e2e-client/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.1.0-SNAPSHOT + 3.0.3 e2e-client diff --git a/tests/e2e-core-common/pom.xml b/tests/e2e-core-common/pom.xml index 172e277c25..3b2fc93541 100644 --- a/tests/e2e-core-common/pom.xml +++ b/tests/e2e-core-common/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.1.0-SNAPSHOT + 3.0.3 e2e-core-common diff --git a/tests/e2e-entity/pom.xml b/tests/e2e-entity/pom.xml index 00e56b9f64..999b10e722 100644 --- a/tests/e2e-entity/pom.xml +++ b/tests/e2e-entity/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.1.0-SNAPSHOT + 3.0.3 e2e-entity diff --git a/tests/e2e-inject/cdi-inject-weld/pom.xml b/tests/e2e-inject/cdi-inject-weld/pom.xml index 2289a5e261..b5f998550c 100644 --- a/tests/e2e-inject/cdi-inject-weld/pom.xml +++ b/tests/e2e-inject/cdi-inject-weld/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests e2e-inject - 3.1.0-SNAPSHOT + 3.0.3 e2e-inject-cdi-inject-weld diff --git a/tests/e2e-inject/cdi2-se/pom.xml b/tests/e2e-inject/cdi2-se/pom.xml index 6ba3e9a1ab..03f1ae8788 100644 --- a/tests/e2e-inject/cdi2-se/pom.xml +++ b/tests/e2e-inject/cdi2-se/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests e2e-inject - 3.1.0-SNAPSHOT + 3.0.3 e2e-inject-cdi2-se diff --git a/tests/e2e-inject/hk2/pom.xml b/tests/e2e-inject/hk2/pom.xml index aac4c5c45d..530ce21c7a 100644 --- a/tests/e2e-inject/hk2/pom.xml +++ b/tests/e2e-inject/hk2/pom.xml @@ -23,7 +23,7 @@ e2e-inject org.glassfish.jersey.tests - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/e2e-inject/pom.xml b/tests/e2e-inject/pom.xml index d24ac03c99..2c86a59469 100644 --- a/tests/e2e-inject/pom.xml +++ b/tests/e2e-inject/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.1.0-SNAPSHOT + 3.0.3 e2e-inject diff --git a/tests/e2e-server/pom.xml b/tests/e2e-server/pom.xml index 65872af0d1..728c132e1c 100644 --- a/tests/e2e-server/pom.xml +++ b/tests/e2e-server/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.1.0-SNAPSHOT + 3.0.3 e2e-server diff --git a/tests/e2e-testng/pom.xml b/tests/e2e-testng/pom.xml index 8c514205e3..b76b92eae9 100644 --- a/tests/e2e-testng/pom.xml +++ b/tests/e2e-testng/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.tests project - 3.1.0-SNAPSHOT + 3.0.3 e2e-testng diff --git a/tests/e2e/pom.xml b/tests/e2e/pom.xml index 179e28bb14..ee3a62223f 100644 --- a/tests/e2e/pom.xml +++ b/tests/e2e/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.1.0-SNAPSHOT + 3.0.3 e2e diff --git a/tests/integration/asm/pom.xml b/tests/integration/asm/pom.xml index d28ead4717..39c8fb8871 100644 --- a/tests/integration/asm/pom.xml +++ b/tests/integration/asm/pom.xml @@ -23,7 +23,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/integration/async-jersey-filter/pom.xml b/tests/integration/async-jersey-filter/pom.xml index 5d424e70fe..d64eb83e42 100644 --- a/tests/integration/async-jersey-filter/pom.xml +++ b/tests/integration/async-jersey-filter/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 async-jersey-filter diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml index 18950ce94d..7f07ca4e91 100644 --- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 cdi-beanvalidation-webapp diff --git a/tests/integration/cdi-integration/cdi-client-on-server/pom.xml b/tests/integration/cdi-integration/cdi-client-on-server/pom.xml index b4d76a6bf3..db97eef8c7 100644 --- a/tests/integration/cdi-integration/cdi-client-on-server/pom.xml +++ b/tests/integration/cdi-integration/cdi-client-on-server/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 cdi-client-on-server diff --git a/tests/integration/cdi-integration/cdi-client/pom.xml b/tests/integration/cdi-integration/cdi-client/pom.xml index e51e5540ea..d343eadfb7 100644 --- a/tests/integration/cdi-integration/cdi-client/pom.xml +++ b/tests/integration/cdi-integration/cdi-client/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 cdi-client diff --git a/tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml b/tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml index 5cc62c5bd4..4e1fe79304 100644 --- a/tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 cdi-ejb-test-webapp diff --git a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml index 289012251b..8b1c9b483a 100644 --- a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 cdi-iface-with-non-jaxrs-impl-test-webapp diff --git a/tests/integration/cdi-integration/cdi-log-check/pom.xml b/tests/integration/cdi-integration/cdi-log-check/pom.xml index ec36e8f39c..08efa4d714 100644 --- a/tests/integration/cdi-integration/cdi-log-check/pom.xml +++ b/tests/integration/cdi-integration/cdi-log-check/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 cdi-log-check diff --git a/tests/integration/cdi-integration/cdi-manually-bound/pom.xml b/tests/integration/cdi-integration/cdi-manually-bound/pom.xml index a8289d2e69..64f933013f 100644 --- a/tests/integration/cdi-integration/cdi-manually-bound/pom.xml +++ b/tests/integration/cdi-integration/cdi-manually-bound/pom.xml @@ -23,7 +23,7 @@ cdi-integration-project org.glassfish.jersey.tests.integration.cdi - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml index 0c2d8d48ed..a86e97df64 100644 --- a/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml +++ b/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml index 99f073aa69..b28dc712ca 100644 --- a/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml +++ b/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/cdi-integration/cdi-multimodule/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/pom.xml index 189f6264a2..cc847dcca7 100644 --- a/tests/integration/cdi-integration/cdi-multimodule/pom.xml +++ b/tests/integration/cdi-integration/cdi-multimodule/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 cdi-multimodule diff --git a/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml index 8ffa7f32a2..893a6503d6 100644 --- a/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml +++ b/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml index 922014573a..44b8970cb2 100644 --- a/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml +++ b/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml b/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml index a54e94cf39..bedd14d655 100644 --- a/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 cdi-multipart-webapp diff --git a/tests/integration/cdi-integration/cdi-resource-with-at-context/pom.xml b/tests/integration/cdi-integration/cdi-resource-with-at-context/pom.xml index 464e1a4017..5add3a4626 100644 --- a/tests/integration/cdi-integration/cdi-resource-with-at-context/pom.xml +++ b/tests/integration/cdi-integration/cdi-resource-with-at-context/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/integration/cdi-integration/cdi-singleton/pom.xml b/tests/integration/cdi-integration/cdi-singleton/pom.xml index 6aef2a0696..6de8930f9d 100644 --- a/tests/integration/cdi-integration/cdi-singleton/pom.xml +++ b/tests/integration/cdi-integration/cdi-singleton/pom.xml @@ -23,7 +23,7 @@ cdi-integration-project org.glassfish.jersey.tests.integration.cdi - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/integration/cdi-integration/cdi-test-webapp/pom.xml b/tests/integration/cdi-integration/cdi-test-webapp/pom.xml index 48a6b75e7f..386fb3addd 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-test-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 cdi-test-webapp diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml index 579da311b7..0c2ad9fa3a 100644 --- a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 cdi-with-jersey-injection-custom-cfg-webapp diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml index 2f9e905a0c..e5880508f4 100644 --- a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 cdi-with-jersey-injection-custom-hk2-banned-webapp diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml index c3c7849251..f0ec2e8d6a 100644 --- a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 cdi-with-jersey-injection-webapp diff --git a/tests/integration/cdi-integration/context-inject-on-server/pom.xml b/tests/integration/cdi-integration/context-inject-on-server/pom.xml index 856a3eeb27..4412a2672d 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/pom.xml +++ b/tests/integration/cdi-integration/context-inject-on-server/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.1.0-SNAPSHOT + 3.0.3 context-inject-on-server diff --git a/tests/integration/cdi-integration/pom.xml b/tests/integration/cdi-integration/pom.xml index c4ed648e08..1bccf2ce70 100644 --- a/tests/integration/cdi-integration/pom.xml +++ b/tests/integration/cdi-integration/pom.xml @@ -23,7 +23,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 pom diff --git a/tests/integration/client-connector-provider/pom.xml b/tests/integration/client-connector-provider/pom.xml index 19579b2329..21e12c5b09 100644 --- a/tests/integration/client-connector-provider/pom.xml +++ b/tests/integration/client-connector-provider/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 client-connector-provider diff --git a/tests/integration/ejb-multimodule-reload/ear/pom.xml b/tests/integration/ejb-multimodule-reload/ear/pom.xml index 7a2ba1b7d8..f6c314d256 100644 --- a/tests/integration/ejb-multimodule-reload/ear/pom.xml +++ b/tests/integration/ejb-multimodule-reload/ear/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/ejb-multimodule-reload/lib/pom.xml b/tests/integration/ejb-multimodule-reload/lib/pom.xml index af8140326d..be3a6c1aa9 100644 --- a/tests/integration/ejb-multimodule-reload/lib/pom.xml +++ b/tests/integration/ejb-multimodule-reload/lib/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/ejb-multimodule-reload/pom.xml b/tests/integration/ejb-multimodule-reload/pom.xml index a37d861462..c90b1cf7ba 100644 --- a/tests/integration/ejb-multimodule-reload/pom.xml +++ b/tests/integration/ejb-multimodule-reload/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ejb-multimodule-reload diff --git a/tests/integration/ejb-multimodule-reload/war1/pom.xml b/tests/integration/ejb-multimodule-reload/war1/pom.xml index 68ba11053d..105dea823d 100644 --- a/tests/integration/ejb-multimodule-reload/war1/pom.xml +++ b/tests/integration/ejb-multimodule-reload/war1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/ejb-multimodule-reload/war2/pom.xml b/tests/integration/ejb-multimodule-reload/war2/pom.xml index ce3e0c327f..30daf00382 100644 --- a/tests/integration/ejb-multimodule-reload/war2/pom.xml +++ b/tests/integration/ejb-multimodule-reload/war2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/ejb-multimodule/ear/pom.xml b/tests/integration/ejb-multimodule/ear/pom.xml index 64a4091764..943ccf397a 100644 --- a/tests/integration/ejb-multimodule/ear/pom.xml +++ b/tests/integration/ejb-multimodule/ear/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/ejb-multimodule/lib/pom.xml b/tests/integration/ejb-multimodule/lib/pom.xml index 4a2170d47b..0676c7ecd1 100644 --- a/tests/integration/ejb-multimodule/lib/pom.xml +++ b/tests/integration/ejb-multimodule/lib/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/ejb-multimodule/pom.xml b/tests/integration/ejb-multimodule/pom.xml index a8531182a7..bcff26cfbc 100644 --- a/tests/integration/ejb-multimodule/pom.xml +++ b/tests/integration/ejb-multimodule/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ejb-multimodule diff --git a/tests/integration/ejb-multimodule/war/pom.xml b/tests/integration/ejb-multimodule/war/pom.xml index 700e2e71fa..9693c03647 100644 --- a/tests/integration/ejb-multimodule/war/pom.xml +++ b/tests/integration/ejb-multimodule/war/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/ejb-test-webapp/pom.xml b/tests/integration/ejb-test-webapp/pom.xml index e0de691cd8..f243a39e1f 100644 --- a/tests/integration/ejb-test-webapp/pom.xml +++ b/tests/integration/ejb-test-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ejb-test-webapp diff --git a/tests/integration/externalproperties/pom.xml b/tests/integration/externalproperties/pom.xml index 0d46fcf361..18772f81d9 100644 --- a/tests/integration/externalproperties/pom.xml +++ b/tests/integration/externalproperties/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 externalproperties diff --git a/tests/integration/j-376/pom.xml b/tests/integration/j-376/pom.xml index a740b6b745..fc54f84573 100644 --- a/tests/integration/j-376/pom.xml +++ b/tests/integration/j-376/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 j-376 diff --git a/tests/integration/j-441/ear/pom.xml b/tests/integration/j-441/ear/pom.xml index 685e244fe2..a59dbbdaf8 100644 --- a/tests/integration/j-441/ear/pom.xml +++ b/tests/integration/j-441/ear/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml j-441-ear diff --git a/tests/integration/j-441/pom.xml b/tests/integration/j-441/pom.xml index 971d45c72b..8d62a39da0 100644 --- a/tests/integration/j-441/pom.xml +++ b/tests/integration/j-441/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 j-441 diff --git a/tests/integration/j-441/war1/pom.xml b/tests/integration/j-441/war1/pom.xml index 7b165bc3c3..9c885ce221 100644 --- a/tests/integration/j-441/war1/pom.xml +++ b/tests/integration/j-441/war1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/j-441/war2/pom.xml b/tests/integration/j-441/war2/pom.xml index 58cad9b3f9..fa64fa4ac3 100644 --- a/tests/integration/j-441/war2/pom.xml +++ b/tests/integration/j-441/war2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/j-59/ear/pom.xml b/tests/integration/j-59/ear/pom.xml index ef96aa3209..65c6d4a0c8 100644 --- a/tests/integration/j-59/ear/pom.xml +++ b/tests/integration/j-59/ear/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/j-59/lib/pom.xml b/tests/integration/j-59/lib/pom.xml index 4f4290b71e..8371995480 100644 --- a/tests/integration/j-59/lib/pom.xml +++ b/tests/integration/j-59/lib/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/j-59/pom.xml b/tests/integration/j-59/pom.xml index f1a51ccc8f..669089bfbf 100644 --- a/tests/integration/j-59/pom.xml +++ b/tests/integration/j-59/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 j-59 diff --git a/tests/integration/j-59/war/pom.xml b/tests/integration/j-59/war/pom.xml index 5743c6108d..d4f248b571 100644 --- a/tests/integration/j-59/war/pom.xml +++ b/tests/integration/j-59/war/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 ../../pom.xml diff --git a/tests/integration/jaxrs-component-inject/pom.xml b/tests/integration/jaxrs-component-inject/pom.xml index 49841117a9..3f229832f8 100644 --- a/tests/integration/jaxrs-component-inject/pom.xml +++ b/tests/integration/jaxrs-component-inject/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jaxrs-component-inject diff --git a/tests/integration/jersey-1107/pom.xml b/tests/integration/jersey-1107/pom.xml index 96b953d40c..10cac46646 100644 --- a/tests/integration/jersey-1107/pom.xml +++ b/tests/integration/jersey-1107/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-1107 diff --git a/tests/integration/jersey-1223/pom.xml b/tests/integration/jersey-1223/pom.xml index b36bf24996..3ea8555593 100644 --- a/tests/integration/jersey-1223/pom.xml +++ b/tests/integration/jersey-1223/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 jersey-1223 diff --git a/tests/integration/jersey-1604/pom.xml b/tests/integration/jersey-1604/pom.xml index aff35ea7f7..2d9ddfd8f5 100644 --- a/tests/integration/jersey-1604/pom.xml +++ b/tests/integration/jersey-1604/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 jersey-1604 diff --git a/tests/integration/jersey-1667/pom.xml b/tests/integration/jersey-1667/pom.xml index caf5240291..6734e8a084 100644 --- a/tests/integration/jersey-1667/pom.xml +++ b/tests/integration/jersey-1667/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-1667 diff --git a/tests/integration/jersey-1883/pom.xml b/tests/integration/jersey-1883/pom.xml index a1af8ff0cb..074e5cd34c 100644 --- a/tests/integration/jersey-1883/pom.xml +++ b/tests/integration/jersey-1883/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-1883 diff --git a/tests/integration/jersey-1928/pom.xml b/tests/integration/jersey-1928/pom.xml index 40d6caafe3..c0d5ec38ec 100644 --- a/tests/integration/jersey-1928/pom.xml +++ b/tests/integration/jersey-1928/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 jersey-1928 diff --git a/tests/integration/jersey-1960/pom.xml b/tests/integration/jersey-1960/pom.xml index 4787ec80f1..1c7b43251d 100644 --- a/tests/integration/jersey-1960/pom.xml +++ b/tests/integration/jersey-1960/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-1960 diff --git a/tests/integration/jersey-1964/pom.xml b/tests/integration/jersey-1964/pom.xml index 8f203f7bc4..cb13ebeb05 100644 --- a/tests/integration/jersey-1964/pom.xml +++ b/tests/integration/jersey-1964/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-1964 diff --git a/tests/integration/jersey-2031/pom.xml b/tests/integration/jersey-2031/pom.xml index a2ab3317c8..f902076cd9 100644 --- a/tests/integration/jersey-2031/pom.xml +++ b/tests/integration/jersey-2031/pom.xml @@ -25,7 +25,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2031 diff --git a/tests/integration/jersey-2136/pom.xml b/tests/integration/jersey-2136/pom.xml index 1cf9a81e0f..b637cca2c2 100644 --- a/tests/integration/jersey-2136/pom.xml +++ b/tests/integration/jersey-2136/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2136 diff --git a/tests/integration/jersey-2137/pom.xml b/tests/integration/jersey-2137/pom.xml index 7fc7b92e5e..ef500dcf51 100644 --- a/tests/integration/jersey-2137/pom.xml +++ b/tests/integration/jersey-2137/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2137 diff --git a/tests/integration/jersey-2154/pom.xml b/tests/integration/jersey-2154/pom.xml index 3a97c879c1..28915ef3e8 100644 --- a/tests/integration/jersey-2154/pom.xml +++ b/tests/integration/jersey-2154/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2154 diff --git a/tests/integration/jersey-2160/pom.xml b/tests/integration/jersey-2160/pom.xml index 72e3d5fc9e..9c51766361 100644 --- a/tests/integration/jersey-2160/pom.xml +++ b/tests/integration/jersey-2160/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2160 diff --git a/tests/integration/jersey-2164/pom.xml b/tests/integration/jersey-2164/pom.xml index 9eb532b60a..7eac8f6ad9 100644 --- a/tests/integration/jersey-2164/pom.xml +++ b/tests/integration/jersey-2164/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2164 diff --git a/tests/integration/jersey-2167/pom.xml b/tests/integration/jersey-2167/pom.xml index 2d241f432a..73c985340a 100644 --- a/tests/integration/jersey-2167/pom.xml +++ b/tests/integration/jersey-2167/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2167 diff --git a/tests/integration/jersey-2176/pom.xml b/tests/integration/jersey-2176/pom.xml index d7ad02c218..424a9642a5 100644 --- a/tests/integration/jersey-2176/pom.xml +++ b/tests/integration/jersey-2176/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2176 diff --git a/tests/integration/jersey-2184/pom.xml b/tests/integration/jersey-2184/pom.xml index b607899838..a5547984cf 100644 --- a/tests/integration/jersey-2184/pom.xml +++ b/tests/integration/jersey-2184/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2184 diff --git a/tests/integration/jersey-2255/pom.xml b/tests/integration/jersey-2255/pom.xml index 23922703b2..3991a455ef 100644 --- a/tests/integration/jersey-2255/pom.xml +++ b/tests/integration/jersey-2255/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2255 diff --git a/tests/integration/jersey-2322/pom.xml b/tests/integration/jersey-2322/pom.xml index 5b8de1799f..0a77a8dcdf 100644 --- a/tests/integration/jersey-2322/pom.xml +++ b/tests/integration/jersey-2322/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2322 diff --git a/tests/integration/jersey-2335/pom.xml b/tests/integration/jersey-2335/pom.xml index f5fc34023b..e4453c708b 100644 --- a/tests/integration/jersey-2335/pom.xml +++ b/tests/integration/jersey-2335/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2335 diff --git a/tests/integration/jersey-2421/pom.xml b/tests/integration/jersey-2421/pom.xml index a239661cf9..d7858a2719 100644 --- a/tests/integration/jersey-2421/pom.xml +++ b/tests/integration/jersey-2421/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2421 diff --git a/tests/integration/jersey-2551/pom.xml b/tests/integration/jersey-2551/pom.xml index 7a982aaee5..8086c25894 100644 --- a/tests/integration/jersey-2551/pom.xml +++ b/tests/integration/jersey-2551/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2551 diff --git a/tests/integration/jersey-2612/pom.xml b/tests/integration/jersey-2612/pom.xml index ea86ae2eb9..f2f6920e71 100644 --- a/tests/integration/jersey-2612/pom.xml +++ b/tests/integration/jersey-2612/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2612 diff --git a/tests/integration/jersey-2637/pom.xml b/tests/integration/jersey-2637/pom.xml index e83e666098..30e0f1e299 100644 --- a/tests/integration/jersey-2637/pom.xml +++ b/tests/integration/jersey-2637/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2637 diff --git a/tests/integration/jersey-2654/pom.xml b/tests/integration/jersey-2654/pom.xml index cba4a5e1c0..ca4193a7bc 100644 --- a/tests/integration/jersey-2654/pom.xml +++ b/tests/integration/jersey-2654/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2654 diff --git a/tests/integration/jersey-2673/pom.xml b/tests/integration/jersey-2673/pom.xml index 866cb3faee..ccb09d0abd 100644 --- a/tests/integration/jersey-2673/pom.xml +++ b/tests/integration/jersey-2673/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2673 diff --git a/tests/integration/jersey-2689/pom.xml b/tests/integration/jersey-2689/pom.xml index 936f2aed18..97cbef6b6f 100644 --- a/tests/integration/jersey-2689/pom.xml +++ b/tests/integration/jersey-2689/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2689 diff --git a/tests/integration/jersey-2704/pom.xml b/tests/integration/jersey-2704/pom.xml index 4fac5ad7e8..ea57e0bfb8 100644 --- a/tests/integration/jersey-2704/pom.xml +++ b/tests/integration/jersey-2704/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2704 diff --git a/tests/integration/jersey-2776/pom.xml b/tests/integration/jersey-2776/pom.xml index 340e417c2c..6b170afe2f 100644 --- a/tests/integration/jersey-2776/pom.xml +++ b/tests/integration/jersey-2776/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2776 diff --git a/tests/integration/jersey-2794/pom.xml b/tests/integration/jersey-2794/pom.xml index 3a0d77b72a..55699496c6 100644 --- a/tests/integration/jersey-2794/pom.xml +++ b/tests/integration/jersey-2794/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2794 diff --git a/tests/integration/jersey-2846/pom.xml b/tests/integration/jersey-2846/pom.xml index 2c9613a0c2..d97a14ecdb 100644 --- a/tests/integration/jersey-2846/pom.xml +++ b/tests/integration/jersey-2846/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2846 diff --git a/tests/integration/jersey-2878/pom.xml b/tests/integration/jersey-2878/pom.xml index 148c488053..931e3f7316 100644 --- a/tests/integration/jersey-2878/pom.xml +++ b/tests/integration/jersey-2878/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2878 diff --git a/tests/integration/jersey-2892/pom.xml b/tests/integration/jersey-2892/pom.xml index a7c8488b28..f84aa643c0 100644 --- a/tests/integration/jersey-2892/pom.xml +++ b/tests/integration/jersey-2892/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-2892 diff --git a/tests/integration/jersey-3662/pom.xml b/tests/integration/jersey-3662/pom.xml index a24a114e89..45a6ac87c8 100644 --- a/tests/integration/jersey-3662/pom.xml +++ b/tests/integration/jersey-3662/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/integration/jersey-3670/pom.xml b/tests/integration/jersey-3670/pom.xml index 230176176c..aaf95928e8 100644 --- a/tests/integration/jersey-3670/pom.xml +++ b/tests/integration/jersey-3670/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-3670 diff --git a/tests/integration/jersey-3796/pom.xml b/tests/integration/jersey-3796/pom.xml index 05d32919ec..49d84b3df2 100644 --- a/tests/integration/jersey-3796/pom.xml +++ b/tests/integration/jersey-3796/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-3796 diff --git a/tests/integration/jersey-3992/pom.xml b/tests/integration/jersey-3992/pom.xml index 87fb7da134..7cda905735 100644 --- a/tests/integration/jersey-3992/pom.xml +++ b/tests/integration/jersey-3992/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-3992 diff --git a/tests/integration/jersey-4003/pom.xml b/tests/integration/jersey-4003/pom.xml index 4c4d4f14f4..75acbb9eeb 100644 --- a/tests/integration/jersey-4003/pom.xml +++ b/tests/integration/jersey-4003/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/integration/jersey-4099/pom.xml b/tests/integration/jersey-4099/pom.xml index 66e19abc54..12b6d2c2a6 100644 --- a/tests/integration/jersey-4099/pom.xml +++ b/tests/integration/jersey-4099/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-4099 diff --git a/tests/integration/jersey-4321/pom.xml b/tests/integration/jersey-4321/pom.xml index 8138440c96..92fbc8212a 100644 --- a/tests/integration/jersey-4321/pom.xml +++ b/tests/integration/jersey-4321/pom.xml @@ -24,7 +24,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/integration/jersey-4507/pom.xml b/tests/integration/jersey-4507/pom.xml index f64ec79018..e793fd7274 100644 --- a/tests/integration/jersey-4507/pom.xml +++ b/tests/integration/jersey-4507/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/integration/jersey-4542/pom.xml b/tests/integration/jersey-4542/pom.xml index 0fc86e36e3..fd3a43669f 100644 --- a/tests/integration/jersey-4542/pom.xml +++ b/tests/integration/jersey-4542/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/integration/jersey-4697/pom.xml b/tests/integration/jersey-4697/pom.xml index 32514019e2..3c13c1bd93 100644 --- a/tests/integration/jersey-4697/pom.xml +++ b/tests/integration/jersey-4697/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/integration/jersey-4722/pom.xml b/tests/integration/jersey-4722/pom.xml index 2748c6ea53..78f51e6683 100644 --- a/tests/integration/jersey-4722/pom.xml +++ b/tests/integration/jersey-4722/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/integration/jersey-780/pom.xml b/tests/integration/jersey-780/pom.xml index 5e6705064c..43182d3566 100644 --- a/tests/integration/jersey-780/pom.xml +++ b/tests/integration/jersey-780/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 jersey-780 diff --git a/tests/integration/microprofile/config/helidon/pom.xml b/tests/integration/microprofile/config/helidon/pom.xml index 85770aeb83..071a7a8043 100644 --- a/tests/integration/microprofile/config/helidon/pom.xml +++ b/tests/integration/microprofile/config/helidon/pom.xml @@ -22,7 +22,7 @@ microprofile-config-project org.glassfish.jersey.tests.integration.microprofile - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/integration/microprofile/config/pom.xml b/tests/integration/microprofile/config/pom.xml index 89a35c954e..5062e1699a 100644 --- a/tests/integration/microprofile/config/pom.xml +++ b/tests/integration/microprofile/config/pom.xml @@ -22,7 +22,7 @@ microprofile-integration-project org.glassfish.jersey.tests.integration.microprofile - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 pom diff --git a/tests/integration/microprofile/config/webapp/pom.xml b/tests/integration/microprofile/config/webapp/pom.xml index 7ff3952726..a46fe46adf 100644 --- a/tests/integration/microprofile/config/webapp/pom.xml +++ b/tests/integration/microprofile/config/webapp/pom.xml @@ -22,7 +22,7 @@ microprofile-config-project org.glassfish.jersey.tests.integration.microprofile - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/integration/microprofile/pom.xml b/tests/integration/microprofile/pom.xml index e41fdaecfb..817ef81aac 100644 --- a/tests/integration/microprofile/pom.xml +++ b/tests/integration/microprofile/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 pom diff --git a/tests/integration/pom.xml b/tests/integration/pom.xml index c6e35a6204..48c0f32be6 100644 --- a/tests/integration/pom.xml +++ b/tests/integration/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.tests project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.tests.integration diff --git a/tests/integration/property-check/pom.xml b/tests/integration/property-check/pom.xml index 2d3985d5d8..abfc35c973 100644 --- a/tests/integration/property-check/pom.xml +++ b/tests/integration/property-check/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 property-check diff --git a/tests/integration/reactive-streams/pom.xml b/tests/integration/reactive-streams/pom.xml index 53b12ee74d..fe47c44756 100644 --- a/tests/integration/reactive-streams/pom.xml +++ b/tests/integration/reactive-streams/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 pom diff --git a/tests/integration/reactive-streams/sse/pom.xml b/tests/integration/reactive-streams/sse/pom.xml index 63831d224d..f246b97bae 100644 --- a/tests/integration/reactive-streams/sse/pom.xml +++ b/tests/integration/reactive-streams/sse/pom.xml @@ -22,7 +22,7 @@ reactive-streams-integration-project org.glassfish.jersey.tests.integration.reactive - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/integration/security-digest/pom.xml b/tests/integration/security-digest/pom.xml index 0e93329e1a..931ca04fd7 100644 --- a/tests/integration/security-digest/pom.xml +++ b/tests/integration/security-digest/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.tests.integration - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 security-digest diff --git a/tests/integration/servlet-2.5-autodiscovery-1/pom.xml b/tests/integration/servlet-2.5-autodiscovery-1/pom.xml index 5bcd396f5f..f02e13b1fe 100644 --- a/tests/integration/servlet-2.5-autodiscovery-1/pom.xml +++ b/tests/integration/servlet-2.5-autodiscovery-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-autodiscovery-1 diff --git a/tests/integration/servlet-2.5-autodiscovery-2/pom.xml b/tests/integration/servlet-2.5-autodiscovery-2/pom.xml index a528fe4fed..a2870252b1 100644 --- a/tests/integration/servlet-2.5-autodiscovery-2/pom.xml +++ b/tests/integration/servlet-2.5-autodiscovery-2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-autodiscovery-2 diff --git a/tests/integration/servlet-2.5-filter/pom.xml b/tests/integration/servlet-2.5-filter/pom.xml index f00289f351..bfd0cd1b64 100644 --- a/tests/integration/servlet-2.5-filter/pom.xml +++ b/tests/integration/servlet-2.5-filter/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-filter diff --git a/tests/integration/servlet-2.5-inflector-1/pom.xml b/tests/integration/servlet-2.5-inflector-1/pom.xml index b6a4f15687..1fc9a03e33 100644 --- a/tests/integration/servlet-2.5-inflector-1/pom.xml +++ b/tests/integration/servlet-2.5-inflector-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-inflector-1 diff --git a/tests/integration/servlet-2.5-init-1/pom.xml b/tests/integration/servlet-2.5-init-1/pom.xml index c87fbb7fce..dbedc72546 100644 --- a/tests/integration/servlet-2.5-init-1/pom.xml +++ b/tests/integration/servlet-2.5-init-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-init-1 diff --git a/tests/integration/servlet-2.5-init-2/pom.xml b/tests/integration/servlet-2.5-init-2/pom.xml index ebfe4c159a..f3f7418925 100644 --- a/tests/integration/servlet-2.5-init-2/pom.xml +++ b/tests/integration/servlet-2.5-init-2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-init-2 diff --git a/tests/integration/servlet-2.5-init-3/pom.xml b/tests/integration/servlet-2.5-init-3/pom.xml index 843bb40727..67d5afec0d 100644 --- a/tests/integration/servlet-2.5-init-3/pom.xml +++ b/tests/integration/servlet-2.5-init-3/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-init-3 diff --git a/tests/integration/servlet-2.5-init-4/pom.xml b/tests/integration/servlet-2.5-init-4/pom.xml index 5d02efcceb..8272e8d437 100644 --- a/tests/integration/servlet-2.5-init-4/pom.xml +++ b/tests/integration/servlet-2.5-init-4/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-init-4 diff --git a/tests/integration/servlet-2.5-init-5/pom.xml b/tests/integration/servlet-2.5-init-5/pom.xml index 81ce7791c1..42f52d1bf0 100644 --- a/tests/integration/servlet-2.5-init-5/pom.xml +++ b/tests/integration/servlet-2.5-init-5/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-init-5 diff --git a/tests/integration/servlet-2.5-init-6/pom.xml b/tests/integration/servlet-2.5-init-6/pom.xml index b42c3515b8..738cd57d5f 100644 --- a/tests/integration/servlet-2.5-init-6/pom.xml +++ b/tests/integration/servlet-2.5-init-6/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-init-6 diff --git a/tests/integration/servlet-2.5-init-7/pom.xml b/tests/integration/servlet-2.5-init-7/pom.xml index a789216c34..bfe5c92436 100644 --- a/tests/integration/servlet-2.5-init-7/pom.xml +++ b/tests/integration/servlet-2.5-init-7/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-init-7 diff --git a/tests/integration/servlet-2.5-init-8/pom.xml b/tests/integration/servlet-2.5-init-8/pom.xml index b334d2a72b..b9bb8e2cce 100644 --- a/tests/integration/servlet-2.5-init-8/pom.xml +++ b/tests/integration/servlet-2.5-init-8/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-init-8 diff --git a/tests/integration/servlet-2.5-mvc-1/pom.xml b/tests/integration/servlet-2.5-mvc-1/pom.xml index fae7e5176c..74923143b4 100644 --- a/tests/integration/servlet-2.5-mvc-1/pom.xml +++ b/tests/integration/servlet-2.5-mvc-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-mvc-1 diff --git a/tests/integration/servlet-2.5-mvc-2/pom.xml b/tests/integration/servlet-2.5-mvc-2/pom.xml index 8e9f2bf130..5066f10b23 100644 --- a/tests/integration/servlet-2.5-mvc-2/pom.xml +++ b/tests/integration/servlet-2.5-mvc-2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-mvc-2 diff --git a/tests/integration/servlet-2.5-mvc-3/pom.xml b/tests/integration/servlet-2.5-mvc-3/pom.xml index 9e1bfaf453..e2756c5108 100644 --- a/tests/integration/servlet-2.5-mvc-3/pom.xml +++ b/tests/integration/servlet-2.5-mvc-3/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-mvc-3 diff --git a/tests/integration/servlet-2.5-reload/pom.xml b/tests/integration/servlet-2.5-reload/pom.xml index 76abecc760..bf84ccc360 100644 --- a/tests/integration/servlet-2.5-reload/pom.xml +++ b/tests/integration/servlet-2.5-reload/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-2.5-reload diff --git a/tests/integration/servlet-3-async/pom.xml b/tests/integration/servlet-3-async/pom.xml index 1a15a19e10..9c5e8f0e1e 100644 --- a/tests/integration/servlet-3-async/pom.xml +++ b/tests/integration/servlet-3-async/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-async diff --git a/tests/integration/servlet-3-chunked-io/pom.xml b/tests/integration/servlet-3-chunked-io/pom.xml index ffd1bd083c..f7d9aa55e5 100644 --- a/tests/integration/servlet-3-chunked-io/pom.xml +++ b/tests/integration/servlet-3-chunked-io/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-chunked-io diff --git a/tests/integration/servlet-3-filter/pom.xml b/tests/integration/servlet-3-filter/pom.xml index a090e95875..ae1750893e 100644 --- a/tests/integration/servlet-3-filter/pom.xml +++ b/tests/integration/servlet-3-filter/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-filter diff --git a/tests/integration/servlet-3-gf-async/pom.xml b/tests/integration/servlet-3-gf-async/pom.xml index 8b195442fd..798d85f2a7 100644 --- a/tests/integration/servlet-3-gf-async/pom.xml +++ b/tests/integration/servlet-3-gf-async/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-gf-async diff --git a/tests/integration/servlet-3-inflector-1/pom.xml b/tests/integration/servlet-3-inflector-1/pom.xml index e0eff7ccce..2f400cc7af 100644 --- a/tests/integration/servlet-3-inflector-1/pom.xml +++ b/tests/integration/servlet-3-inflector-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-inflector-1 diff --git a/tests/integration/servlet-3-init-1/pom.xml b/tests/integration/servlet-3-init-1/pom.xml index 27f7afe24a..928050a57a 100644 --- a/tests/integration/servlet-3-init-1/pom.xml +++ b/tests/integration/servlet-3-init-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-init-1 diff --git a/tests/integration/servlet-3-init-2/pom.xml b/tests/integration/servlet-3-init-2/pom.xml index 29a4466afc..3a7b005071 100644 --- a/tests/integration/servlet-3-init-2/pom.xml +++ b/tests/integration/servlet-3-init-2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-init-2 diff --git a/tests/integration/servlet-3-init-3/pom.xml b/tests/integration/servlet-3-init-3/pom.xml index c1219f2acf..a2bf7a93f1 100644 --- a/tests/integration/servlet-3-init-3/pom.xml +++ b/tests/integration/servlet-3-init-3/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-init-3 diff --git a/tests/integration/servlet-3-init-4/pom.xml b/tests/integration/servlet-3-init-4/pom.xml index 42e60071da..2fd26d2710 100644 --- a/tests/integration/servlet-3-init-4/pom.xml +++ b/tests/integration/servlet-3-init-4/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-init-4 diff --git a/tests/integration/servlet-3-init-5/pom.xml b/tests/integration/servlet-3-init-5/pom.xml index 1e711e8739..85300bc071 100644 --- a/tests/integration/servlet-3-init-5/pom.xml +++ b/tests/integration/servlet-3-init-5/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-init-5 diff --git a/tests/integration/servlet-3-init-6/pom.xml b/tests/integration/servlet-3-init-6/pom.xml index 4e7758f6d8..5babdd487b 100644 --- a/tests/integration/servlet-3-init-6/pom.xml +++ b/tests/integration/servlet-3-init-6/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-init-6 diff --git a/tests/integration/servlet-3-init-7/pom.xml b/tests/integration/servlet-3-init-7/pom.xml index 1b092ea9c9..412cca7c66 100644 --- a/tests/integration/servlet-3-init-7/pom.xml +++ b/tests/integration/servlet-3-init-7/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-init-7 diff --git a/tests/integration/servlet-3-init-8/pom.xml b/tests/integration/servlet-3-init-8/pom.xml index b854701fe3..0e04971ce8 100644 --- a/tests/integration/servlet-3-init-8/pom.xml +++ b/tests/integration/servlet-3-init-8/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-init-8 diff --git a/tests/integration/servlet-3-init-9/pom.xml b/tests/integration/servlet-3-init-9/pom.xml index 48319aa1e0..c0d4ab6a3b 100644 --- a/tests/integration/servlet-3-init-9/pom.xml +++ b/tests/integration/servlet-3-init-9/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-init-9 diff --git a/tests/integration/servlet-3-init-provider/pom.xml b/tests/integration/servlet-3-init-provider/pom.xml index 184b69d0bb..79f52f1a2a 100644 --- a/tests/integration/servlet-3-init-provider/pom.xml +++ b/tests/integration/servlet-3-init-provider/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-init-provider diff --git a/tests/integration/servlet-3-params/pom.xml b/tests/integration/servlet-3-params/pom.xml index 189ad608bc..e2079e3513 100644 --- a/tests/integration/servlet-3-params/pom.xml +++ b/tests/integration/servlet-3-params/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-params diff --git a/tests/integration/servlet-3-sse-1/pom.xml b/tests/integration/servlet-3-sse-1/pom.xml index 2ba4a49264..88e2867fed 100644 --- a/tests/integration/servlet-3-sse-1/pom.xml +++ b/tests/integration/servlet-3-sse-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-3-sse-1 diff --git a/tests/integration/servlet-4.0-mvc-1/pom.xml b/tests/integration/servlet-4.0-mvc-1/pom.xml index 23106f2795..a58771e784 100644 --- a/tests/integration/servlet-4.0-mvc-1/pom.xml +++ b/tests/integration/servlet-4.0-mvc-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-4.0-mvc-1 diff --git a/tests/integration/servlet-request-wrapper-binding-2/pom.xml b/tests/integration/servlet-request-wrapper-binding-2/pom.xml index 706d18dfd5..b48c9bb448 100644 --- a/tests/integration/servlet-request-wrapper-binding-2/pom.xml +++ b/tests/integration/servlet-request-wrapper-binding-2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-request-wrappper-binding-2 diff --git a/tests/integration/servlet-request-wrapper-binding/pom.xml b/tests/integration/servlet-request-wrapper-binding/pom.xml index 3f6e4be054..e04a5c7b7e 100644 --- a/tests/integration/servlet-request-wrapper-binding/pom.xml +++ b/tests/integration/servlet-request-wrapper-binding/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-request-wrappper-binding diff --git a/tests/integration/servlet-tests/pom.xml b/tests/integration/servlet-tests/pom.xml index a272dd0762..ca981cabe1 100644 --- a/tests/integration/servlet-tests/pom.xml +++ b/tests/integration/servlet-tests/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 servlet-tests diff --git a/tests/integration/sonar-test/pom.xml b/tests/integration/sonar-test/pom.xml index 83697acdf0..bb917594e4 100644 --- a/tests/integration/sonar-test/pom.xml +++ b/tests/integration/sonar-test/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 sonar-test diff --git a/tests/integration/tracing-support/pom.xml b/tests/integration/tracing-support/pom.xml index b238dd5cd8..970268b56c 100644 --- a/tests/integration/tracing-support/pom.xml +++ b/tests/integration/tracing-support/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.1.0-SNAPSHOT + 3.0.3 tracing-support diff --git a/tests/jmockit/pom.xml b/tests/jmockit/pom.xml index 2ffaaf33f9..b8f2b3070e 100644 --- a/tests/jmockit/pom.xml +++ b/tests/jmockit/pom.xml @@ -23,7 +23,7 @@ project org.glassfish.jersey.tests - 3.1.0-SNAPSHOT + 3.0.3 4.0.0 diff --git a/tests/mem-leaks/pom.xml b/tests/mem-leaks/pom.xml index 0b2105b98f..e00357cd98 100644 --- a/tests/mem-leaks/pom.xml +++ b/tests/mem-leaks/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.tests.memleaks diff --git a/tests/mem-leaks/redeployment/pom.xml b/tests/mem-leaks/redeployment/pom.xml index 3c1cdc090d..a58e7e7dd5 100644 --- a/tests/mem-leaks/redeployment/pom.xml +++ b/tests/mem-leaks/redeployment/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.tests.memleaks.redeployment diff --git a/tests/mem-leaks/redeployment/redeployment-hello-world-app-ref/pom.xml b/tests/mem-leaks/redeployment/redeployment-hello-world-app-ref/pom.xml index f18ee82e16..714115fd33 100644 --- a/tests/mem-leaks/redeployment/redeployment-hello-world-app-ref/pom.xml +++ b/tests/mem-leaks/redeployment/redeployment-hello-world-app-ref/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks.redeployment project - 3.1.0-SNAPSHOT + 3.0.3 redeployment-hello-world-app-ref @@ -132,7 +132,7 @@ org.glassfish.jersey.examples helloworld-webapp war - 3.1.0-SNAPSHOT + 3.0.3 diff --git a/tests/mem-leaks/redeployment/redeployment-leaking-test-app/pom.xml b/tests/mem-leaks/redeployment/redeployment-leaking-test-app/pom.xml index 268f3b4b4c..c6f87bdbf2 100644 --- a/tests/mem-leaks/redeployment/redeployment-leaking-test-app/pom.xml +++ b/tests/mem-leaks/redeployment/redeployment-leaking-test-app/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks.redeployment project - 3.1.0-SNAPSHOT + 3.0.3 redeployment-leaking-test-app diff --git a/tests/mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml b/tests/mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml index 9bffddda9e..75f96eb370 100644 --- a/tests/mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml +++ b/tests/mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.tests.memleaks.redeployment project - 3.1.0-SNAPSHOT + 3.0.3 redeployment-no-jersey-app diff --git a/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml b/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml index cca3472a4f..240d62fb99 100644 --- a/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml +++ b/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.tests.memleaks.redeployment project - 3.1.0-SNAPSHOT + 3.0.3 redeployment-threadlocals-app diff --git a/tests/mem-leaks/test-cases/bean-param-leak/pom.xml b/tests/mem-leaks/test-cases/bean-param-leak/pom.xml index 930935156b..0fe8df9ada 100644 --- a/tests/mem-leaks/test-cases/bean-param-leak/pom.xml +++ b/tests/mem-leaks/test-cases/bean-param-leak/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks.testcases project - 3.1.0-SNAPSHOT + 3.0.3 bean-param-leak diff --git a/tests/mem-leaks/test-cases/leaking-test-app/pom.xml b/tests/mem-leaks/test-cases/leaking-test-app/pom.xml index 575c042963..dec3d2db41 100644 --- a/tests/mem-leaks/test-cases/leaking-test-app/pom.xml +++ b/tests/mem-leaks/test-cases/leaking-test-app/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks.testcases project - 3.1.0-SNAPSHOT + 3.0.3 leaking-test-app diff --git a/tests/mem-leaks/test-cases/pom.xml b/tests/mem-leaks/test-cases/pom.xml index aa72406552..dc5ab8b987 100644 --- a/tests/mem-leaks/test-cases/pom.xml +++ b/tests/mem-leaks/test-cases/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.tests.memleaks.testcases diff --git a/tests/mem-leaks/test-cases/shutdown-hook-leak-client/pom.xml b/tests/mem-leaks/test-cases/shutdown-hook-leak-client/pom.xml index 9127cf9a60..9d5aed9365 100644 --- a/tests/mem-leaks/test-cases/shutdown-hook-leak-client/pom.xml +++ b/tests/mem-leaks/test-cases/shutdown-hook-leak-client/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks.testcases project - 3.1.0-SNAPSHOT + 3.0.3 shutdown-hook-leak-client diff --git a/tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml b/tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml index 59a0db2f31..2ab92856e1 100644 --- a/tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml +++ b/tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks.testcases project - 3.1.0-SNAPSHOT + 3.0.3 shutdown-hook-leak diff --git a/tests/osgi/functional/pom.xml b/tests/osgi/functional/pom.xml index 141c0905ce..d06019cac1 100644 --- a/tests/osgi/functional/pom.xml +++ b/tests/osgi/functional/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.tests.osgi project - 3.1.0-SNAPSHOT + 3.0.3 jersey-tests-osgi-functional diff --git a/tests/osgi/pom.xml b/tests/osgi/pom.xml index 42b4d71ecd..67c37c6f6c 100644 --- a/tests/osgi/pom.xml +++ b/tests/osgi/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.tests.osgi diff --git a/tests/performance/benchmarks/pom.xml b/tests/performance/benchmarks/pom.xml index cc7a454cdb..2058823062 100644 --- a/tests/performance/benchmarks/pom.xml +++ b/tests/performance/benchmarks/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance project - 3.1.0-SNAPSHOT + 3.0.3 performance-test-benchmarks diff --git a/tests/performance/pom.xml b/tests/performance/pom.xml index c11bc84bde..7e9f0391e1 100644 --- a/tests/performance/pom.xml +++ b/tests/performance/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.tests.performance diff --git a/tests/performance/runners/jersey-grizzly-runner/pom.xml b/tests/performance/runners/jersey-grizzly-runner/pom.xml index 87dbaed07c..9e46b82248 100644 --- a/tests/performance/runners/jersey-grizzly-runner/pom.xml +++ b/tests/performance/runners/jersey-grizzly-runner/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.runners project - 3.1.0-SNAPSHOT + 3.0.3 diff --git a/tests/performance/runners/pom.xml b/tests/performance/runners/pom.xml index 7f06b93484..58709926af 100644 --- a/tests/performance/runners/pom.xml +++ b/tests/performance/runners/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.tests.performance.runners diff --git a/tests/performance/test-cases/assemblies/pom.xml b/tests/performance/test-cases/assemblies/pom.xml index 7a4ba86817..14460f8520 100644 --- a/tests/performance/test-cases/assemblies/pom.xml +++ b/tests/performance/test-cases/assemblies/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 assemblies diff --git a/tests/performance/test-cases/filter-dynamic/pom.xml b/tests/performance/test-cases/filter-dynamic/pom.xml index f8bf30ec3f..d4fc50af35 100644 --- a/tests/performance/test-cases/filter-dynamic/pom.xml +++ b/tests/performance/test-cases/filter-dynamic/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 filter-dynamic diff --git a/tests/performance/test-cases/filter-global/pom.xml b/tests/performance/test-cases/filter-global/pom.xml index ce5d3421d8..44df51599c 100644 --- a/tests/performance/test-cases/filter-global/pom.xml +++ b/tests/performance/test-cases/filter-global/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 filter-global diff --git a/tests/performance/test-cases/filter-name/pom.xml b/tests/performance/test-cases/filter-name/pom.xml index 8d5c15717f..64bec45c2f 100644 --- a/tests/performance/test-cases/filter-name/pom.xml +++ b/tests/performance/test-cases/filter-name/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 filter-name diff --git a/tests/performance/test-cases/interceptor-dynamic/pom.xml b/tests/performance/test-cases/interceptor-dynamic/pom.xml index a3faedafc8..4c31485742 100644 --- a/tests/performance/test-cases/interceptor-dynamic/pom.xml +++ b/tests/performance/test-cases/interceptor-dynamic/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 interceptor-dynamic diff --git a/tests/performance/test-cases/interceptor-global/pom.xml b/tests/performance/test-cases/interceptor-global/pom.xml index d9eadfadc5..e5836141d0 100644 --- a/tests/performance/test-cases/interceptor-global/pom.xml +++ b/tests/performance/test-cases/interceptor-global/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 interceptor-global diff --git a/tests/performance/test-cases/interceptor-name/pom.xml b/tests/performance/test-cases/interceptor-name/pom.xml index 7d8d1e21ef..23a120b64c 100644 --- a/tests/performance/test-cases/interceptor-name/pom.xml +++ b/tests/performance/test-cases/interceptor-name/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 interceptor-name diff --git a/tests/performance/test-cases/mbw-custom-provider/pom.xml b/tests/performance/test-cases/mbw-custom-provider/pom.xml index c7087ecf3f..00999458e0 100644 --- a/tests/performance/test-cases/mbw-custom-provider/pom.xml +++ b/tests/performance/test-cases/mbw-custom-provider/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 custom-provider diff --git a/tests/performance/test-cases/mbw-json-jackson/pom.xml b/tests/performance/test-cases/mbw-json-jackson/pom.xml index 8751ea6ecc..136cfa9b6e 100644 --- a/tests/performance/test-cases/mbw-json-jackson/pom.xml +++ b/tests/performance/test-cases/mbw-json-jackson/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 json-jackson diff --git a/tests/performance/test-cases/mbw-json-moxy/pom.xml b/tests/performance/test-cases/mbw-json-moxy/pom.xml index 3abe4b243a..6a51496215 100644 --- a/tests/performance/test-cases/mbw-json-moxy/pom.xml +++ b/tests/performance/test-cases/mbw-json-moxy/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 json-moxy diff --git a/tests/performance/test-cases/mbw-kryo/pom.xml b/tests/performance/test-cases/mbw-kryo/pom.xml index 9795aacbf2..123dabce1c 100644 --- a/tests/performance/test-cases/mbw-kryo/pom.xml +++ b/tests/performance/test-cases/mbw-kryo/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 mbw-kryo diff --git a/tests/performance/test-cases/mbw-text-plain/pom.xml b/tests/performance/test-cases/mbw-text-plain/pom.xml index cb2ca2c0dd..ad27f896ae 100644 --- a/tests/performance/test-cases/mbw-text-plain/pom.xml +++ b/tests/performance/test-cases/mbw-text-plain/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 text-plain diff --git a/tests/performance/test-cases/mbw-xml-jaxb/pom.xml b/tests/performance/test-cases/mbw-xml-jaxb/pom.xml index 9620115fb7..3830c20b5b 100644 --- a/tests/performance/test-cases/mbw-xml-jaxb/pom.xml +++ b/tests/performance/test-cases/mbw-xml-jaxb/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 xml-jaxb diff --git a/tests/performance/test-cases/mbw-xml-moxy/pom.xml b/tests/performance/test-cases/mbw-xml-moxy/pom.xml index ac448b8bac..7528f23087 100644 --- a/tests/performance/test-cases/mbw-xml-moxy/pom.xml +++ b/tests/performance/test-cases/mbw-xml-moxy/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 xml-moxy diff --git a/tests/performance/test-cases/param-srl/pom.xml b/tests/performance/test-cases/param-srl/pom.xml index 01c5e9158b..a23bfdef81 100644 --- a/tests/performance/test-cases/param-srl/pom.xml +++ b/tests/performance/test-cases/param-srl/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 param-srl diff --git a/tests/performance/test-cases/pom.xml b/tests/performance/test-cases/pom.xml index 366cb54b44..8dc309e0cb 100644 --- a/tests/performance/test-cases/pom.xml +++ b/tests/performance/test-cases/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.tests.performance.testcases diff --git a/tests/performance/test-cases/proxy-injection/pom.xml b/tests/performance/test-cases/proxy-injection/pom.xml index 4897bfd08f..1aabea1667 100644 --- a/tests/performance/test-cases/proxy-injection/pom.xml +++ b/tests/performance/test-cases/proxy-injection/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.1.0-SNAPSHOT + 3.0.3 proxy-injection diff --git a/tests/performance/tools/pom.xml b/tests/performance/tools/pom.xml index fa4883d878..d7e0ab15ff 100644 --- a/tests/performance/tools/pom.xml +++ b/tests/performance/tools/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.tests.performance.tools performance-test-tools diff --git a/tests/pom.xml b/tests/pom.xml index ca0cccf3fd..e8bfb6754e 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.1.0-SNAPSHOT + 3.0.3 org.glassfish.jersey.tests diff --git a/tests/stress/pom.xml b/tests/stress/pom.xml index f1493b9153..53a8f51268 100644 --- a/tests/stress/pom.xml +++ b/tests/stress/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.1.0-SNAPSHOT + 3.0.3 stress From 05f2f0fde7b5b2a23cd4d13a0cb5f83d8dbc7183 Mon Sep 17 00:00:00 2001 From: jersey-bot Date: Mon, 20 Sep 2021 14:54:18 +0000 Subject: [PATCH 03/20] 3.1.0-SNAPSHOT --- archetypes/jersey-example-java8-webapp/pom.xml | 2 +- archetypes/jersey-heroku-webapp/pom.xml | 2 +- archetypes/jersey-quickstart-grizzly2/pom.xml | 2 +- archetypes/jersey-quickstart-webapp/pom.xml | 2 +- archetypes/pom.xml | 2 +- bom/pom.xml | 2 +- bundles/apidocs/pom.xml | 2 +- bundles/examples/pom.xml | 2 +- bundles/jaxrs-ri/pom.xml | 2 +- bundles/pom.xml | 2 +- connectors/apache-connector/pom.xml | 2 +- connectors/grizzly-connector/pom.xml | 2 +- connectors/helidon-connector/pom.xml | 2 +- connectors/jdk-connector/pom.xml | 2 +- connectors/jetty-connector/pom.xml | 2 +- connectors/netty-connector/pom.xml | 2 +- connectors/pom.xml | 2 +- containers/glassfish/jersey-gf-ejb/pom.xml | 2 +- containers/glassfish/pom.xml | 2 +- containers/grizzly2-http/pom.xml | 2 +- containers/grizzly2-servlet/pom.xml | 2 +- containers/jdk-http/pom.xml | 2 +- containers/jersey-servlet-core/pom.xml | 2 +- containers/jersey-servlet/pom.xml | 2 +- containers/jetty-http/pom.xml | 2 +- containers/jetty-servlet/pom.xml | 2 +- containers/netty-http/pom.xml | 2 +- containers/pom.xml | 2 +- containers/simple-http/pom.xml | 2 +- core-client/pom.xml | 2 +- core-common/pom.xml | 2 +- core-server/pom.xml | 2 +- docs/pom.xml | 2 +- examples/assemblies/pom.xml | 2 +- examples/bookstore-webapp/pom.xml | 2 +- examples/cdi-webapp/pom.xml | 2 +- examples/clipboard-programmatic/pom.xml | 2 +- examples/clipboard/pom.xml | 2 +- examples/declarative-linking/pom.xml | 2 +- examples/entity-filtering-security/pom.xml | 2 +- examples/entity-filtering-selectable/pom.xml | 2 +- examples/entity-filtering/pom.xml | 2 +- examples/exception-mapping/pom.xml | 2 +- examples/freemarker-webapp/pom.xml | 2 +- examples/groovy/pom.xml | 2 +- examples/helloworld-benchmark/pom.xml | 2 +- examples/helloworld-cdi2-se/pom.xml | 2 +- examples/helloworld-netty/pom.xml | 2 +- examples/helloworld-programmatic/pom.xml | 2 +- examples/helloworld-pure-jax-rs/pom.xml | 2 +- examples/helloworld-webapp/pom.xml | 2 +- examples/helloworld-weld/pom.xml | 2 +- examples/helloworld/pom.xml | 2 +- examples/http-patch/pom.xml | 2 +- examples/http-trace/pom.xml | 2 +- examples/https-clientserver-grizzly/pom.xml | 2 +- examples/https-server-glassfish/pom.xml | 2 +- examples/java8-webapp/pom.xml | 2 +- examples/jaxb/pom.xml | 2 +- examples/jaxrs-types-injection/pom.xml | 2 +- examples/jersey-ejb/pom.xml | 2 +- examples/json-binding-webapp/pom.xml | 2 +- examples/json-jackson/pom.xml | 2 +- examples/json-jettison/pom.xml | 2 +- examples/json-moxy/pom.xml | 2 +- examples/json-processing-webapp/pom.xml | 2 +- examples/json-with-padding/pom.xml | 2 +- examples/managed-beans-webapp/pom.xml | 2 +- examples/managed-client-simple-webapp/pom.xml | 2 +- examples/managed-client-webapp/pom.xml | 2 +- examples/managed-client/pom.xml | 2 +- examples/multipart-webapp/pom.xml | 2 +- examples/open-tracing/pom.xml | 2 +- examples/pom.xml | 2 +- examples/rx-client-webapp/pom.xml | 2 +- examples/server-async-managed/pom.xml | 2 +- examples/server-async-standalone/client/pom.xml | 2 +- examples/server-async-standalone/pom.xml | 2 +- examples/server-async-standalone/webapp/pom.xml | 2 +- examples/server-async/pom.xml | 2 +- examples/server-sent-events-jaxrs/pom.xml | 2 +- examples/server-sent-events-jersey/pom.xml | 2 +- examples/servlet3-webapp/pom.xml | 2 +- examples/simple-console/pom.xml | 2 +- examples/sse-item-store-jaxrs-webapp/pom.xml | 2 +- examples/sse-item-store-jersey-webapp/pom.xml | 2 +- examples/sse-twitter-aggregator/pom.xml | 2 +- examples/system-properties-example/pom.xml | 2 +- examples/webapp-example-parent/pom.xml | 2 +- examples/xml-moxy/pom.xml | 2 +- ext/bean-validation/pom.xml | 2 +- ext/cdi/jersey-cdi-rs-inject/pom.xml | 2 +- ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml | 2 +- ext/cdi/jersey-cdi1x-servlet/pom.xml | 2 +- ext/cdi/jersey-cdi1x-transaction/pom.xml | 2 +- ext/cdi/jersey-cdi1x-validation/pom.xml | 2 +- ext/cdi/jersey-cdi1x/pom.xml | 2 +- ext/cdi/jersey-weld2-se/pom.xml | 2 +- ext/cdi/pom.xml | 2 +- ext/entity-filtering/pom.xml | 2 +- ext/metainf-services/pom.xml | 2 +- ext/microprofile/mp-config/pom.xml | 2 +- ext/microprofile/pom.xml | 2 +- ext/mvc-bean-validation/pom.xml | 2 +- ext/mvc-freemarker/pom.xml | 2 +- ext/mvc-jsp/pom.xml | 2 +- ext/mvc-mustache/pom.xml | 2 +- ext/mvc/pom.xml | 2 +- ext/pom.xml | 2 +- ext/proxy-client/pom.xml | 2 +- ext/rx/pom.xml | 2 +- ext/rx/rx-client-guava/pom.xml | 2 +- ext/rx/rx-client-rxjava/pom.xml | 2 +- ext/rx/rx-client-rxjava2/pom.xml | 2 +- ext/wadl-doclet/pom.xml | 2 +- incubator/cdi-inject-weld/pom.xml | 2 +- incubator/declarative-linking/pom.xml | 2 +- incubator/gae-integration/pom.xml | 2 +- incubator/html-json/pom.xml | 2 +- incubator/kryo/pom.xml | 2 +- incubator/open-tracing/pom.xml | 2 +- incubator/pom.xml | 2 +- inject/cdi2-se/pom.xml | 2 +- inject/hk2/pom.xml | 2 +- inject/pom.xml | 2 +- media/jaxb/pom.xml | 2 +- media/json-binding/pom.xml | 2 +- media/json-jackson/pom.xml | 2 +- media/json-jettison/pom.xml | 2 +- media/json-processing/pom.xml | 2 +- media/moxy/pom.xml | 2 +- media/multipart/pom.xml | 2 +- media/pom.xml | 2 +- media/sse/pom.xml | 2 +- pom.xml | 2 +- security/oauth1-client/pom.xml | 2 +- security/oauth1-server/pom.xml | 2 +- security/oauth1-signature/pom.xml | 2 +- security/oauth2-client/pom.xml | 2 +- security/pom.xml | 2 +- test-framework/core/pom.xml | 2 +- test-framework/maven/container-runner-maven-plugin/pom.xml | 2 +- test-framework/maven/custom-enforcer-rules/pom.xml | 2 +- test-framework/maven/pom.xml | 2 +- test-framework/memleak-test-common/pom.xml | 2 +- test-framework/pom.xml | 2 +- test-framework/providers/bundle/pom.xml | 2 +- test-framework/providers/external/pom.xml | 2 +- test-framework/providers/grizzly2/pom.xml | 2 +- test-framework/providers/inmemory/pom.xml | 2 +- test-framework/providers/jdk-http/pom.xml | 2 +- test-framework/providers/jetty/pom.xml | 2 +- test-framework/providers/netty/pom.xml | 2 +- test-framework/providers/pom.xml | 2 +- test-framework/providers/simple/pom.xml | 2 +- test-framework/util/pom.xml | 2 +- tests/e2e-client/pom.xml | 2 +- tests/e2e-core-common/pom.xml | 2 +- tests/e2e-entity/pom.xml | 2 +- tests/e2e-inject/cdi-inject-weld/pom.xml | 2 +- tests/e2e-inject/cdi2-se/pom.xml | 2 +- tests/e2e-inject/hk2/pom.xml | 2 +- tests/e2e-inject/pom.xml | 2 +- tests/e2e-server/pom.xml | 2 +- tests/e2e-testng/pom.xml | 2 +- tests/e2e/pom.xml | 2 +- tests/integration/asm/pom.xml | 2 +- tests/integration/async-jersey-filter/pom.xml | 2 +- .../cdi-integration/cdi-beanvalidation-webapp/pom.xml | 2 +- .../integration/cdi-integration/cdi-client-on-server/pom.xml | 2 +- tests/integration/cdi-integration/cdi-client/pom.xml | 2 +- tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml | 2 +- .../cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml | 2 +- tests/integration/cdi-integration/cdi-log-check/pom.xml | 2 +- tests/integration/cdi-integration/cdi-manually-bound/pom.xml | 2 +- tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml | 2 +- tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml | 2 +- tests/integration/cdi-integration/cdi-multimodule/pom.xml | 2 +- .../integration/cdi-integration/cdi-multimodule/war1/pom.xml | 2 +- .../integration/cdi-integration/cdi-multimodule/war2/pom.xml | 2 +- .../integration/cdi-integration/cdi-multipart-webapp/pom.xml | 2 +- .../cdi-integration/cdi-resource-with-at-context/pom.xml | 2 +- tests/integration/cdi-integration/cdi-singleton/pom.xml | 2 +- tests/integration/cdi-integration/cdi-test-webapp/pom.xml | 2 +- .../cdi-with-jersey-injection-custom-cfg-webapp/pom.xml | 2 +- .../pom.xml | 2 +- .../cdi-integration/cdi-with-jersey-injection-webapp/pom.xml | 2 +- .../cdi-integration/context-inject-on-server/pom.xml | 2 +- tests/integration/cdi-integration/pom.xml | 2 +- tests/integration/client-connector-provider/pom.xml | 2 +- tests/integration/ejb-multimodule-reload/ear/pom.xml | 2 +- tests/integration/ejb-multimodule-reload/lib/pom.xml | 2 +- tests/integration/ejb-multimodule-reload/pom.xml | 2 +- tests/integration/ejb-multimodule-reload/war1/pom.xml | 2 +- tests/integration/ejb-multimodule-reload/war2/pom.xml | 2 +- tests/integration/ejb-multimodule/ear/pom.xml | 2 +- tests/integration/ejb-multimodule/lib/pom.xml | 2 +- tests/integration/ejb-multimodule/pom.xml | 2 +- tests/integration/ejb-multimodule/war/pom.xml | 2 +- tests/integration/ejb-test-webapp/pom.xml | 2 +- tests/integration/externalproperties/pom.xml | 2 +- tests/integration/j-376/pom.xml | 2 +- tests/integration/j-441/ear/pom.xml | 2 +- tests/integration/j-441/pom.xml | 2 +- tests/integration/j-441/war1/pom.xml | 2 +- tests/integration/j-441/war2/pom.xml | 2 +- tests/integration/j-59/ear/pom.xml | 2 +- tests/integration/j-59/lib/pom.xml | 2 +- tests/integration/j-59/pom.xml | 2 +- tests/integration/j-59/war/pom.xml | 2 +- tests/integration/jaxrs-component-inject/pom.xml | 2 +- tests/integration/jersey-1107/pom.xml | 2 +- tests/integration/jersey-1223/pom.xml | 2 +- tests/integration/jersey-1604/pom.xml | 2 +- tests/integration/jersey-1667/pom.xml | 2 +- tests/integration/jersey-1883/pom.xml | 2 +- tests/integration/jersey-1928/pom.xml | 2 +- tests/integration/jersey-1960/pom.xml | 2 +- tests/integration/jersey-1964/pom.xml | 2 +- tests/integration/jersey-2031/pom.xml | 2 +- tests/integration/jersey-2136/pom.xml | 2 +- tests/integration/jersey-2137/pom.xml | 2 +- tests/integration/jersey-2154/pom.xml | 2 +- tests/integration/jersey-2160/pom.xml | 2 +- tests/integration/jersey-2164/pom.xml | 2 +- tests/integration/jersey-2167/pom.xml | 2 +- tests/integration/jersey-2176/pom.xml | 2 +- tests/integration/jersey-2184/pom.xml | 2 +- tests/integration/jersey-2255/pom.xml | 2 +- tests/integration/jersey-2322/pom.xml | 2 +- tests/integration/jersey-2335/pom.xml | 2 +- tests/integration/jersey-2421/pom.xml | 2 +- tests/integration/jersey-2551/pom.xml | 2 +- tests/integration/jersey-2612/pom.xml | 2 +- tests/integration/jersey-2637/pom.xml | 2 +- tests/integration/jersey-2654/pom.xml | 2 +- tests/integration/jersey-2673/pom.xml | 2 +- tests/integration/jersey-2689/pom.xml | 2 +- tests/integration/jersey-2704/pom.xml | 2 +- tests/integration/jersey-2776/pom.xml | 2 +- tests/integration/jersey-2794/pom.xml | 2 +- tests/integration/jersey-2846/pom.xml | 2 +- tests/integration/jersey-2878/pom.xml | 2 +- tests/integration/jersey-2892/pom.xml | 2 +- tests/integration/jersey-3662/pom.xml | 2 +- tests/integration/jersey-3670/pom.xml | 2 +- tests/integration/jersey-3796/pom.xml | 2 +- tests/integration/jersey-3992/pom.xml | 2 +- tests/integration/jersey-4003/pom.xml | 2 +- tests/integration/jersey-4099/pom.xml | 2 +- tests/integration/jersey-4321/pom.xml | 2 +- tests/integration/jersey-4507/pom.xml | 2 +- tests/integration/jersey-4542/pom.xml | 2 +- tests/integration/jersey-4697/pom.xml | 2 +- tests/integration/jersey-4722/pom.xml | 2 +- tests/integration/jersey-780/pom.xml | 2 +- tests/integration/microprofile/config/helidon/pom.xml | 2 +- tests/integration/microprofile/config/pom.xml | 2 +- tests/integration/microprofile/config/webapp/pom.xml | 2 +- tests/integration/microprofile/pom.xml | 2 +- tests/integration/pom.xml | 2 +- tests/integration/property-check/pom.xml | 2 +- tests/integration/reactive-streams/pom.xml | 2 +- tests/integration/reactive-streams/sse/pom.xml | 2 +- tests/integration/security-digest/pom.xml | 2 +- tests/integration/servlet-2.5-autodiscovery-1/pom.xml | 2 +- tests/integration/servlet-2.5-autodiscovery-2/pom.xml | 2 +- tests/integration/servlet-2.5-filter/pom.xml | 2 +- tests/integration/servlet-2.5-inflector-1/pom.xml | 2 +- tests/integration/servlet-2.5-init-1/pom.xml | 2 +- tests/integration/servlet-2.5-init-2/pom.xml | 2 +- tests/integration/servlet-2.5-init-3/pom.xml | 2 +- tests/integration/servlet-2.5-init-4/pom.xml | 2 +- tests/integration/servlet-2.5-init-5/pom.xml | 2 +- tests/integration/servlet-2.5-init-6/pom.xml | 2 +- tests/integration/servlet-2.5-init-7/pom.xml | 2 +- tests/integration/servlet-2.5-init-8/pom.xml | 2 +- tests/integration/servlet-2.5-mvc-1/pom.xml | 2 +- tests/integration/servlet-2.5-mvc-2/pom.xml | 2 +- tests/integration/servlet-2.5-mvc-3/pom.xml | 2 +- tests/integration/servlet-2.5-reload/pom.xml | 2 +- tests/integration/servlet-3-async/pom.xml | 2 +- tests/integration/servlet-3-chunked-io/pom.xml | 2 +- tests/integration/servlet-3-filter/pom.xml | 2 +- tests/integration/servlet-3-gf-async/pom.xml | 2 +- tests/integration/servlet-3-inflector-1/pom.xml | 2 +- tests/integration/servlet-3-init-1/pom.xml | 2 +- tests/integration/servlet-3-init-2/pom.xml | 2 +- tests/integration/servlet-3-init-3/pom.xml | 2 +- tests/integration/servlet-3-init-4/pom.xml | 2 +- tests/integration/servlet-3-init-5/pom.xml | 2 +- tests/integration/servlet-3-init-6/pom.xml | 2 +- tests/integration/servlet-3-init-7/pom.xml | 2 +- tests/integration/servlet-3-init-8/pom.xml | 2 +- tests/integration/servlet-3-init-9/pom.xml | 2 +- tests/integration/servlet-3-init-provider/pom.xml | 2 +- tests/integration/servlet-3-params/pom.xml | 2 +- tests/integration/servlet-3-sse-1/pom.xml | 2 +- tests/integration/servlet-4.0-mvc-1/pom.xml | 2 +- tests/integration/servlet-request-wrapper-binding-2/pom.xml | 2 +- tests/integration/servlet-request-wrapper-binding/pom.xml | 2 +- tests/integration/servlet-tests/pom.xml | 2 +- tests/integration/sonar-test/pom.xml | 2 +- tests/integration/tracing-support/pom.xml | 2 +- tests/jmockit/pom.xml | 2 +- tests/mem-leaks/pom.xml | 2 +- tests/mem-leaks/redeployment/pom.xml | 2 +- .../redeployment/redeployment-hello-world-app-ref/pom.xml | 4 ++-- .../redeployment/redeployment-leaking-test-app/pom.xml | 2 +- .../mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml | 2 +- .../redeployment/redeployment-threadlocals-app/pom.xml | 2 +- tests/mem-leaks/test-cases/bean-param-leak/pom.xml | 2 +- tests/mem-leaks/test-cases/leaking-test-app/pom.xml | 2 +- tests/mem-leaks/test-cases/pom.xml | 2 +- tests/mem-leaks/test-cases/shutdown-hook-leak-client/pom.xml | 2 +- tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml | 2 +- tests/osgi/functional/pom.xml | 2 +- tests/osgi/pom.xml | 2 +- tests/performance/benchmarks/pom.xml | 2 +- tests/performance/pom.xml | 2 +- tests/performance/runners/jersey-grizzly-runner/pom.xml | 2 +- tests/performance/runners/pom.xml | 2 +- tests/performance/test-cases/assemblies/pom.xml | 2 +- tests/performance/test-cases/filter-dynamic/pom.xml | 2 +- tests/performance/test-cases/filter-global/pom.xml | 2 +- tests/performance/test-cases/filter-name/pom.xml | 2 +- tests/performance/test-cases/interceptor-dynamic/pom.xml | 2 +- tests/performance/test-cases/interceptor-global/pom.xml | 2 +- tests/performance/test-cases/interceptor-name/pom.xml | 2 +- tests/performance/test-cases/mbw-custom-provider/pom.xml | 2 +- tests/performance/test-cases/mbw-json-jackson/pom.xml | 2 +- tests/performance/test-cases/mbw-json-moxy/pom.xml | 2 +- tests/performance/test-cases/mbw-kryo/pom.xml | 2 +- tests/performance/test-cases/mbw-text-plain/pom.xml | 2 +- tests/performance/test-cases/mbw-xml-jaxb/pom.xml | 2 +- tests/performance/test-cases/mbw-xml-moxy/pom.xml | 2 +- tests/performance/test-cases/param-srl/pom.xml | 2 +- tests/performance/test-cases/pom.xml | 2 +- tests/performance/test-cases/proxy-injection/pom.xml | 2 +- tests/performance/tools/pom.xml | 2 +- tests/pom.xml | 2 +- tests/stress/pom.xml | 2 +- 342 files changed, 343 insertions(+), 343 deletions(-) diff --git a/archetypes/jersey-example-java8-webapp/pom.xml b/archetypes/jersey-example-java8-webapp/pom.xml index b9f98c7c07..93ec6876a7 100644 --- a/archetypes/jersey-example-java8-webapp/pom.xml +++ b/archetypes/jersey-example-java8-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.archetypes project - 3.0.3 + 3.1.0-SNAPSHOT jersey-example-java8-webapp diff --git a/archetypes/jersey-heroku-webapp/pom.xml b/archetypes/jersey-heroku-webapp/pom.xml index 0ebfb2a66d..53d21df1af 100644 --- a/archetypes/jersey-heroku-webapp/pom.xml +++ b/archetypes/jersey-heroku-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.archetypes project - 3.0.3 + 3.1.0-SNAPSHOT maven-archetype diff --git a/archetypes/jersey-quickstart-grizzly2/pom.xml b/archetypes/jersey-quickstart-grizzly2/pom.xml index fe8329031d..5f8f7678a1 100644 --- a/archetypes/jersey-quickstart-grizzly2/pom.xml +++ b/archetypes/jersey-quickstart-grizzly2/pom.xml @@ -21,7 +21,7 @@ org.glassfish.jersey.archetypes project - 3.0.3 + 3.1.0-SNAPSHOT jersey-quickstart-grizzly2 maven-archetype diff --git a/archetypes/jersey-quickstart-webapp/pom.xml b/archetypes/jersey-quickstart-webapp/pom.xml index 6d6f47a267..94c9f2a36e 100644 --- a/archetypes/jersey-quickstart-webapp/pom.xml +++ b/archetypes/jersey-quickstart-webapp/pom.xml @@ -21,7 +21,7 @@ org.glassfish.jersey.archetypes project - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 maven-archetype diff --git a/archetypes/pom.xml b/archetypes/pom.xml index 538fe11f9a..bc619fe79c 100644 --- a/archetypes/pom.xml +++ b/archetypes/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.archetypes diff --git a/bom/pom.xml b/bom/pom.xml index 968f103881..a54b744c74 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -30,7 +30,7 @@ org.glassfish.jersey jersey-bom - 3.0.3 + 3.1.0-SNAPSHOT pom jersey-bom diff --git a/bundles/apidocs/pom.xml b/bundles/apidocs/pom.xml index 210aa25d2f..40ebdd9016 100644 --- a/bundles/apidocs/pom.xml +++ b/bundles/apidocs/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.bundles project - 3.0.3 + 3.1.0-SNAPSHOT apidocs diff --git a/bundles/examples/pom.xml b/bundles/examples/pom.xml index 210f847138..a3e5e7b414 100644 --- a/bundles/examples/pom.xml +++ b/bundles/examples/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.bundles project - 3.0.3 + 3.1.0-SNAPSHOT jersey-examples diff --git a/bundles/jaxrs-ri/pom.xml b/bundles/jaxrs-ri/pom.xml index 98460224e4..09982bdf98 100644 --- a/bundles/jaxrs-ri/pom.xml +++ b/bundles/jaxrs-ri/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.bundles project - 3.0.3 + 3.1.0-SNAPSHOT jaxrs-ri diff --git a/bundles/pom.xml b/bundles/pom.xml index 94dcbd5b20..2e01ca35a3 100644 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.bundles diff --git a/connectors/apache-connector/pom.xml b/connectors/apache-connector/pom.xml index d96d7a0612..5f7b8bf5f3 100644 --- a/connectors/apache-connector/pom.xml +++ b/connectors/apache-connector/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.connectors project - 3.0.3 + 3.1.0-SNAPSHOT jersey-apache-connector diff --git a/connectors/grizzly-connector/pom.xml b/connectors/grizzly-connector/pom.xml index e46b32242c..670e7152ba 100644 --- a/connectors/grizzly-connector/pom.xml +++ b/connectors/grizzly-connector/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.connectors project - 3.0.3 + 3.1.0-SNAPSHOT jersey-grizzly-connector diff --git a/connectors/helidon-connector/pom.xml b/connectors/helidon-connector/pom.xml index ea30439081..ec4b69a07d 100644 --- a/connectors/helidon-connector/pom.xml +++ b/connectors/helidon-connector/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.connectors - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/connectors/jdk-connector/pom.xml b/connectors/jdk-connector/pom.xml index 7aefaa49eb..15b8cdc8fb 100644 --- a/connectors/jdk-connector/pom.xml +++ b/connectors/jdk-connector/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.connectors project - 3.0.3 + 3.1.0-SNAPSHOT jersey-jdk-connector diff --git a/connectors/jetty-connector/pom.xml b/connectors/jetty-connector/pom.xml index 838643743a..90761ac50a 100644 --- a/connectors/jetty-connector/pom.xml +++ b/connectors/jetty-connector/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.connectors project - 3.0.3 + 3.1.0-SNAPSHOT jersey-jetty-connector diff --git a/connectors/netty-connector/pom.xml b/connectors/netty-connector/pom.xml index c6d9f064b0..aa1fccf4d2 100644 --- a/connectors/netty-connector/pom.xml +++ b/connectors/netty-connector/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.connectors project - 3.0.3 + 3.1.0-SNAPSHOT jersey-netty-connector diff --git a/connectors/pom.xml b/connectors/pom.xml index b31da1bfc1..332ec68765 100644 --- a/connectors/pom.xml +++ b/connectors/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.connectors diff --git a/containers/glassfish/jersey-gf-ejb/pom.xml b/containers/glassfish/jersey-gf-ejb/pom.xml index 5d0a0aadba..d1174a4405 100644 --- a/containers/glassfish/jersey-gf-ejb/pom.xml +++ b/containers/glassfish/jersey-gf-ejb/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers.glassfish project - 3.0.3 + 3.1.0-SNAPSHOT jersey-gf-ejb diff --git a/containers/glassfish/pom.xml b/containers/glassfish/pom.xml index 580ae13779..031e637d85 100644 --- a/containers/glassfish/pom.xml +++ b/containers/glassfish/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.containers.glassfish diff --git a/containers/grizzly2-http/pom.xml b/containers/grizzly2-http/pom.xml index 634cb0635b..4969da9e46 100644 --- a/containers/grizzly2-http/pom.xml +++ b/containers/grizzly2-http/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.containers project - 3.0.3 + 3.1.0-SNAPSHOT jersey-container-grizzly2-http diff --git a/containers/grizzly2-servlet/pom.xml b/containers/grizzly2-servlet/pom.xml index 2825374dcf..04f334895f 100644 --- a/containers/grizzly2-servlet/pom.xml +++ b/containers/grizzly2-servlet/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.0.3 + 3.1.0-SNAPSHOT jersey-container-grizzly2-servlet diff --git a/containers/jdk-http/pom.xml b/containers/jdk-http/pom.xml index 7f89cb27ba..4ef3d77648 100644 --- a/containers/jdk-http/pom.xml +++ b/containers/jdk-http/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.0.3 + 3.1.0-SNAPSHOT jersey-container-jdk-http diff --git a/containers/jersey-servlet-core/pom.xml b/containers/jersey-servlet-core/pom.xml index e8da620e37..1e69b906dd 100644 --- a/containers/jersey-servlet-core/pom.xml +++ b/containers/jersey-servlet-core/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.0.3 + 3.1.0-SNAPSHOT jersey-container-servlet-core diff --git a/containers/jersey-servlet/pom.xml b/containers/jersey-servlet/pom.xml index 9581f07b6e..e174f4101d 100644 --- a/containers/jersey-servlet/pom.xml +++ b/containers/jersey-servlet/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.0.3 + 3.1.0-SNAPSHOT jersey-container-servlet diff --git a/containers/jetty-http/pom.xml b/containers/jetty-http/pom.xml index afc799a4ac..f596934530 100644 --- a/containers/jetty-http/pom.xml +++ b/containers/jetty-http/pom.xml @@ -23,7 +23,7 @@ project org.glassfish.jersey.containers - 3.0.3 + 3.1.0-SNAPSHOT jersey-container-jetty-http diff --git a/containers/jetty-servlet/pom.xml b/containers/jetty-servlet/pom.xml index 9db85657ad..7f483ec8e8 100644 --- a/containers/jetty-servlet/pom.xml +++ b/containers/jetty-servlet/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.0.3 + 3.1.0-SNAPSHOT jersey-container-jetty-servlet diff --git a/containers/netty-http/pom.xml b/containers/netty-http/pom.xml index 3c4ee0b401..757d0f71ec 100644 --- a/containers/netty-http/pom.xml +++ b/containers/netty-http/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.0.3 + 3.1.0-SNAPSHOT jersey-container-netty-http diff --git a/containers/pom.xml b/containers/pom.xml index c21ea219c9..c245bceea3 100644 --- a/containers/pom.xml +++ b/containers/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.containers diff --git a/containers/simple-http/pom.xml b/containers/simple-http/pom.xml index 4e7472aedc..4de8d497e5 100644 --- a/containers/simple-http/pom.xml +++ b/containers/simple-http/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.containers project - 3.0.3 + 3.1.0-SNAPSHOT jersey-container-simple-http diff --git a/core-client/pom.xml b/core-client/pom.xml index ed78c389c2..7639c19661 100644 --- a/core-client/pom.xml +++ b/core-client/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.core diff --git a/core-common/pom.xml b/core-common/pom.xml index b5f1c0f969..44a380137d 100644 --- a/core-common/pom.xml +++ b/core-common/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.core diff --git a/core-server/pom.xml b/core-server/pom.xml index bdfa5ff160..12a183fba4 100644 --- a/core-server/pom.xml +++ b/core-server/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.core diff --git a/docs/pom.xml b/docs/pom.xml index 68a63802d2..8210134b91 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT jersey-documentation pom diff --git a/examples/assemblies/pom.xml b/examples/assemblies/pom.xml index e8486afd1f..f021c2f343 100644 --- a/examples/assemblies/pom.xml +++ b/examples/assemblies/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT assemblies diff --git a/examples/bookstore-webapp/pom.xml b/examples/bookstore-webapp/pom.xml index c277cd0bcd..20f9774d81 100644 --- a/examples/bookstore-webapp/pom.xml +++ b/examples/bookstore-webapp/pom.xml @@ -35,7 +35,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT bookstore-webapp diff --git a/examples/cdi-webapp/pom.xml b/examples/cdi-webapp/pom.xml index eba75544c2..2b80d43c85 100644 --- a/examples/cdi-webapp/pom.xml +++ b/examples/cdi-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT cdi-webapp diff --git a/examples/clipboard-programmatic/pom.xml b/examples/clipboard-programmatic/pom.xml index 0634c5499b..82fe029b07 100644 --- a/examples/clipboard-programmatic/pom.xml +++ b/examples/clipboard-programmatic/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT clipboard-programmatic diff --git a/examples/clipboard/pom.xml b/examples/clipboard/pom.xml index 1b475c03e5..695855f083 100644 --- a/examples/clipboard/pom.xml +++ b/examples/clipboard/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT clipboard diff --git a/examples/declarative-linking/pom.xml b/examples/declarative-linking/pom.xml index 0ff82acde3..3fdd6ac1ac 100644 --- a/examples/declarative-linking/pom.xml +++ b/examples/declarative-linking/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT declarative-linking diff --git a/examples/entity-filtering-security/pom.xml b/examples/entity-filtering-security/pom.xml index cb8730b874..98a441e31c 100644 --- a/examples/entity-filtering-security/pom.xml +++ b/examples/entity-filtering-security/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT entity-filtering-security diff --git a/examples/entity-filtering-selectable/pom.xml b/examples/entity-filtering-selectable/pom.xml index fbc181799d..503931310b 100644 --- a/examples/entity-filtering-selectable/pom.xml +++ b/examples/entity-filtering-selectable/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT entity-filtering-selectable diff --git a/examples/entity-filtering/pom.xml b/examples/entity-filtering/pom.xml index 145bf685b2..5dd460f66e 100644 --- a/examples/entity-filtering/pom.xml +++ b/examples/entity-filtering/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT entity-filtering diff --git a/examples/exception-mapping/pom.xml b/examples/exception-mapping/pom.xml index 6d95b4ee88..44af64e60a 100644 --- a/examples/exception-mapping/pom.xml +++ b/examples/exception-mapping/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT exception-mapping diff --git a/examples/freemarker-webapp/pom.xml b/examples/freemarker-webapp/pom.xml index 49ddc5a466..b6826c2bea 100644 --- a/examples/freemarker-webapp/pom.xml +++ b/examples/freemarker-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT freemarker-webapp diff --git a/examples/groovy/pom.xml b/examples/groovy/pom.xml index 6e6d196d73..93b3ccefb2 100644 --- a/examples/groovy/pom.xml +++ b/examples/groovy/pom.xml @@ -16,7 +16,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT groovy jar diff --git a/examples/helloworld-benchmark/pom.xml b/examples/helloworld-benchmark/pom.xml index d7500fff80..175c136aa5 100644 --- a/examples/helloworld-benchmark/pom.xml +++ b/examples/helloworld-benchmark/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT helloworld-benchmark diff --git a/examples/helloworld-cdi2-se/pom.xml b/examples/helloworld-cdi2-se/pom.xml index ebdfc0779e..433e9b3445 100644 --- a/examples/helloworld-cdi2-se/pom.xml +++ b/examples/helloworld-cdi2-se/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT helloworld-cdi2-se diff --git a/examples/helloworld-netty/pom.xml b/examples/helloworld-netty/pom.xml index b71bebdc67..769fc84104 100644 --- a/examples/helloworld-netty/pom.xml +++ b/examples/helloworld-netty/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT helloworld-netty diff --git a/examples/helloworld-programmatic/pom.xml b/examples/helloworld-programmatic/pom.xml index b98cc1b338..03dd6fd3fc 100644 --- a/examples/helloworld-programmatic/pom.xml +++ b/examples/helloworld-programmatic/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT helloworld-programmatic diff --git a/examples/helloworld-pure-jax-rs/pom.xml b/examples/helloworld-pure-jax-rs/pom.xml index 838d39f2eb..42933b9a7d 100644 --- a/examples/helloworld-pure-jax-rs/pom.xml +++ b/examples/helloworld-pure-jax-rs/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT helloworld-pure-jax-rs diff --git a/examples/helloworld-webapp/pom.xml b/examples/helloworld-webapp/pom.xml index 7904e3e7fd..88957803c6 100644 --- a/examples/helloworld-webapp/pom.xml +++ b/examples/helloworld-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT helloworld-webapp diff --git a/examples/helloworld-weld/pom.xml b/examples/helloworld-weld/pom.xml index e2a988e467..4ad42c1948 100644 --- a/examples/helloworld-weld/pom.xml +++ b/examples/helloworld-weld/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT helloworld-weld diff --git a/examples/helloworld/pom.xml b/examples/helloworld/pom.xml index 3e478491d5..1fa02a0fbf 100644 --- a/examples/helloworld/pom.xml +++ b/examples/helloworld/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT helloworld diff --git a/examples/http-patch/pom.xml b/examples/http-patch/pom.xml index 769f16f0f3..5f58858528 100644 --- a/examples/http-patch/pom.xml +++ b/examples/http-patch/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT http-patch diff --git a/examples/http-trace/pom.xml b/examples/http-trace/pom.xml index f09fc54f7c..1feb5d2e4a 100644 --- a/examples/http-trace/pom.xml +++ b/examples/http-trace/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT http-trace diff --git a/examples/https-clientserver-grizzly/pom.xml b/examples/https-clientserver-grizzly/pom.xml index 136e67f52f..9a68afc48d 100644 --- a/examples/https-clientserver-grizzly/pom.xml +++ b/examples/https-clientserver-grizzly/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT https-clientserver-grizzly diff --git a/examples/https-server-glassfish/pom.xml b/examples/https-server-glassfish/pom.xml index e45527be9d..b02b885d10 100644 --- a/examples/https-server-glassfish/pom.xml +++ b/examples/https-server-glassfish/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT https-server-glassfish diff --git a/examples/java8-webapp/pom.xml b/examples/java8-webapp/pom.xml index f84cdd4c04..7513db6bbe 100644 --- a/examples/java8-webapp/pom.xml +++ b/examples/java8-webapp/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT java8-webapp diff --git a/examples/jaxb/pom.xml b/examples/jaxb/pom.xml index 75ed075ea3..aae56c4fe9 100644 --- a/examples/jaxb/pom.xml +++ b/examples/jaxb/pom.xml @@ -16,7 +16,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT jaxb diff --git a/examples/jaxrs-types-injection/pom.xml b/examples/jaxrs-types-injection/pom.xml index 24a8ad951e..2a054a044e 100644 --- a/examples/jaxrs-types-injection/pom.xml +++ b/examples/jaxrs-types-injection/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT jaxrs-types-injection diff --git a/examples/jersey-ejb/pom.xml b/examples/jersey-ejb/pom.xml index 8009db4770..d424f33bd3 100644 --- a/examples/jersey-ejb/pom.xml +++ b/examples/jersey-ejb/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT jersey-ejb diff --git a/examples/json-binding-webapp/pom.xml b/examples/json-binding-webapp/pom.xml index 1c34315696..f08b361db2 100644 --- a/examples/json-binding-webapp/pom.xml +++ b/examples/json-binding-webapp/pom.xml @@ -16,7 +16,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT json-binding-webapp diff --git a/examples/json-jackson/pom.xml b/examples/json-jackson/pom.xml index c35d952980..dc41e074b7 100644 --- a/examples/json-jackson/pom.xml +++ b/examples/json-jackson/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT json-jackson diff --git a/examples/json-jettison/pom.xml b/examples/json-jettison/pom.xml index 1f3e910148..7d0edec20d 100644 --- a/examples/json-jettison/pom.xml +++ b/examples/json-jettison/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT json-jettison diff --git a/examples/json-moxy/pom.xml b/examples/json-moxy/pom.xml index bc120db8cc..4bac67cf34 100644 --- a/examples/json-moxy/pom.xml +++ b/examples/json-moxy/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT json-moxy diff --git a/examples/json-processing-webapp/pom.xml b/examples/json-processing-webapp/pom.xml index ebddabe17c..e72b53d456 100644 --- a/examples/json-processing-webapp/pom.xml +++ b/examples/json-processing-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT json-processing-webapp diff --git a/examples/json-with-padding/pom.xml b/examples/json-with-padding/pom.xml index 1f0d1de0cc..0526192741 100644 --- a/examples/json-with-padding/pom.xml +++ b/examples/json-with-padding/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT json-with-padding diff --git a/examples/managed-beans-webapp/pom.xml b/examples/managed-beans-webapp/pom.xml index 153df3c224..49901dea35 100644 --- a/examples/managed-beans-webapp/pom.xml +++ b/examples/managed-beans-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT managed-beans-webapp diff --git a/examples/managed-client-simple-webapp/pom.xml b/examples/managed-client-simple-webapp/pom.xml index 933ac7c9d7..63baeb4f01 100644 --- a/examples/managed-client-simple-webapp/pom.xml +++ b/examples/managed-client-simple-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT managed-client-simple-webapp diff --git a/examples/managed-client-webapp/pom.xml b/examples/managed-client-webapp/pom.xml index 00b1a95061..b127c5bd5c 100644 --- a/examples/managed-client-webapp/pom.xml +++ b/examples/managed-client-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT managed-client-webapp diff --git a/examples/managed-client/pom.xml b/examples/managed-client/pom.xml index 156069384b..5849c9c6e5 100644 --- a/examples/managed-client/pom.xml +++ b/examples/managed-client/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT managed-client diff --git a/examples/multipart-webapp/pom.xml b/examples/multipart-webapp/pom.xml index d42ef237f6..3126219d4f 100644 --- a/examples/multipart-webapp/pom.xml +++ b/examples/multipart-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT multipart-webapp diff --git a/examples/open-tracing/pom.xml b/examples/open-tracing/pom.xml index 6dba7afe9b..41269fcf43 100644 --- a/examples/open-tracing/pom.xml +++ b/examples/open-tracing/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT open-tracing diff --git a/examples/pom.xml b/examples/pom.xml index 4755312d93..6fa1b983fd 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT diff --git a/examples/rx-client-webapp/pom.xml b/examples/rx-client-webapp/pom.xml index 3be91dc705..08d0bdc063 100644 --- a/examples/rx-client-webapp/pom.xml +++ b/examples/rx-client-webapp/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT rx-client-webapp diff --git a/examples/server-async-managed/pom.xml b/examples/server-async-managed/pom.xml index a620646b69..f4e1a34570 100644 --- a/examples/server-async-managed/pom.xml +++ b/examples/server-async-managed/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT server-async-managed diff --git a/examples/server-async-standalone/client/pom.xml b/examples/server-async-standalone/client/pom.xml index 8751a08f06..0670cee746 100644 --- a/examples/server-async-standalone/client/pom.xml +++ b/examples/server-async-standalone/client/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples server-async-standalone - 3.0.3 + 3.1.0-SNAPSHOT server-async-standalone-client diff --git a/examples/server-async-standalone/pom.xml b/examples/server-async-standalone/pom.xml index 9ed2829035..302fc951ff 100644 --- a/examples/server-async-standalone/pom.xml +++ b/examples/server-async-standalone/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT server-async-standalone diff --git a/examples/server-async-standalone/webapp/pom.xml b/examples/server-async-standalone/webapp/pom.xml index 3d33237467..b00d0c3750 100644 --- a/examples/server-async-standalone/webapp/pom.xml +++ b/examples/server-async-standalone/webapp/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples server-async-standalone - 3.0.3 + 3.1.0-SNAPSHOT server-async-standalone-webapp diff --git a/examples/server-async/pom.xml b/examples/server-async/pom.xml index 04209ee92c..3e3da8ae66 100644 --- a/examples/server-async/pom.xml +++ b/examples/server-async/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT server-async diff --git a/examples/server-sent-events-jaxrs/pom.xml b/examples/server-sent-events-jaxrs/pom.xml index 7047374084..ac547cb1d5 100644 --- a/examples/server-sent-events-jaxrs/pom.xml +++ b/examples/server-sent-events-jaxrs/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT server-sent-events-jaxrs diff --git a/examples/server-sent-events-jersey/pom.xml b/examples/server-sent-events-jersey/pom.xml index 838c17676a..421eb86a5c 100644 --- a/examples/server-sent-events-jersey/pom.xml +++ b/examples/server-sent-events-jersey/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT server-sent-events-jersey diff --git a/examples/servlet3-webapp/pom.xml b/examples/servlet3-webapp/pom.xml index 4e44af8e14..f8442e53de 100644 --- a/examples/servlet3-webapp/pom.xml +++ b/examples/servlet3-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT servlet3-webapp diff --git a/examples/simple-console/pom.xml b/examples/simple-console/pom.xml index 4ac3adf8d3..3397414083 100644 --- a/examples/simple-console/pom.xml +++ b/examples/simple-console/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT simple-console diff --git a/examples/sse-item-store-jaxrs-webapp/pom.xml b/examples/sse-item-store-jaxrs-webapp/pom.xml index 93db270433..db257dbfb4 100644 --- a/examples/sse-item-store-jaxrs-webapp/pom.xml +++ b/examples/sse-item-store-jaxrs-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT sse-item-store-jaxrs-webapp diff --git a/examples/sse-item-store-jersey-webapp/pom.xml b/examples/sse-item-store-jersey-webapp/pom.xml index 6e5eb1bb88..1d7a283ac3 100644 --- a/examples/sse-item-store-jersey-webapp/pom.xml +++ b/examples/sse-item-store-jersey-webapp/pom.xml @@ -19,7 +19,7 @@ org.glassfish.jersey.examples webapp-example-parent ../webapp-example-parent/pom.xml - 3.0.3 + 3.1.0-SNAPSHOT sse-item-store-jersey-webapp diff --git a/examples/sse-twitter-aggregator/pom.xml b/examples/sse-twitter-aggregator/pom.xml index c81714dab4..42156c20c6 100644 --- a/examples/sse-twitter-aggregator/pom.xml +++ b/examples/sse-twitter-aggregator/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT sse-twitter-aggregator diff --git a/examples/system-properties-example/pom.xml b/examples/system-properties-example/pom.xml index 1f2e96e07a..0989641b49 100644 --- a/examples/system-properties-example/pom.xml +++ b/examples/system-properties-example/pom.xml @@ -17,7 +17,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT system-properties-example diff --git a/examples/webapp-example-parent/pom.xml b/examples/webapp-example-parent/pom.xml index 9be34369a2..52b3728c07 100644 --- a/examples/webapp-example-parent/pom.xml +++ b/examples/webapp-example-parent/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT webapp-example-parent diff --git a/examples/xml-moxy/pom.xml b/examples/xml-moxy/pom.xml index 464e5cac9f..e753405715 100644 --- a/examples/xml-moxy/pom.xml +++ b/examples/xml-moxy/pom.xml @@ -16,7 +16,7 @@ org.glassfish.jersey.examples project - 3.0.3 + 3.1.0-SNAPSHOT xml-moxy diff --git a/ext/bean-validation/pom.xml b/ext/bean-validation/pom.xml index bdd6ba5acd..6371303f28 100644 --- a/ext/bean-validation/pom.xml +++ b/ext/bean-validation/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.ext project - 3.0.3 + 3.1.0-SNAPSHOT jersey-bean-validation diff --git a/ext/cdi/jersey-cdi-rs-inject/pom.xml b/ext/cdi/jersey-cdi-rs-inject/pom.xml index b0a5956ae6..43072b2c94 100644 --- a/ext/cdi/jersey-cdi-rs-inject/pom.xml +++ b/ext/cdi/jersey-cdi-rs-inject/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.ext.cdi - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml b/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml index 9827f69a18..4730b28ac4 100644 --- a/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml +++ b/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.cdi project - 3.0.3 + 3.1.0-SNAPSHOT jersey-cdi1x-ban-custom-hk2-binding diff --git a/ext/cdi/jersey-cdi1x-servlet/pom.xml b/ext/cdi/jersey-cdi1x-servlet/pom.xml index b401fc6aea..db579a866a 100644 --- a/ext/cdi/jersey-cdi1x-servlet/pom.xml +++ b/ext/cdi/jersey-cdi1x-servlet/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.cdi project - 3.0.3 + 3.1.0-SNAPSHOT jersey-cdi1x-servlet diff --git a/ext/cdi/jersey-cdi1x-transaction/pom.xml b/ext/cdi/jersey-cdi1x-transaction/pom.xml index cdcd78e3d0..e63aeb88ba 100644 --- a/ext/cdi/jersey-cdi1x-transaction/pom.xml +++ b/ext/cdi/jersey-cdi1x-transaction/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.cdi project - 3.0.3 + 3.1.0-SNAPSHOT jersey-cdi1x-transaction diff --git a/ext/cdi/jersey-cdi1x-validation/pom.xml b/ext/cdi/jersey-cdi1x-validation/pom.xml index b5cb814505..8dfe43e662 100644 --- a/ext/cdi/jersey-cdi1x-validation/pom.xml +++ b/ext/cdi/jersey-cdi1x-validation/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.cdi project - 3.0.3 + 3.1.0-SNAPSHOT jersey-cdi1x-validation diff --git a/ext/cdi/jersey-cdi1x/pom.xml b/ext/cdi/jersey-cdi1x/pom.xml index 75a21b1f6a..ced26bfcaf 100644 --- a/ext/cdi/jersey-cdi1x/pom.xml +++ b/ext/cdi/jersey-cdi1x/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.cdi project - 3.0.3 + 3.1.0-SNAPSHOT jersey-cdi1x diff --git a/ext/cdi/jersey-weld2-se/pom.xml b/ext/cdi/jersey-weld2-se/pom.xml index 759fc9d83e..d239fd9ee3 100644 --- a/ext/cdi/jersey-weld2-se/pom.xml +++ b/ext/cdi/jersey-weld2-se/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.cdi project - 3.0.3 + 3.1.0-SNAPSHOT jersey-weld2-se diff --git a/ext/cdi/pom.xml b/ext/cdi/pom.xml index d461355537..7dcbac2e05 100644 --- a/ext/cdi/pom.xml +++ b/ext/cdi/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.ext.cdi diff --git a/ext/entity-filtering/pom.xml b/ext/entity-filtering/pom.xml index 6b4c3ccbd7..854640a719 100644 --- a/ext/entity-filtering/pom.xml +++ b/ext/entity-filtering/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.0.3 + 3.1.0-SNAPSHOT jersey-entity-filtering diff --git a/ext/metainf-services/pom.xml b/ext/metainf-services/pom.xml index 9d8a9517d5..5520ed0d7e 100644 --- a/ext/metainf-services/pom.xml +++ b/ext/metainf-services/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.0.3 + 3.1.0-SNAPSHOT jersey-metainf-services diff --git a/ext/microprofile/mp-config/pom.xml b/ext/microprofile/mp-config/pom.xml index 5bb7a41b85..eebc242422 100644 --- a/ext/microprofile/mp-config/pom.xml +++ b/ext/microprofile/mp-config/pom.xml @@ -23,7 +23,7 @@ project org.glassfish.jersey.ext.microprofile - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/ext/microprofile/pom.xml b/ext/microprofile/pom.xml index ee7e7a08ef..6bc3d24fe5 100644 --- a/ext/microprofile/pom.xml +++ b/ext/microprofile/pom.xml @@ -23,7 +23,7 @@ project org.glassfish.jersey.ext - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/ext/mvc-bean-validation/pom.xml b/ext/mvc-bean-validation/pom.xml index c6f7053135..a030400e8f 100644 --- a/ext/mvc-bean-validation/pom.xml +++ b/ext/mvc-bean-validation/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.0.3 + 3.1.0-SNAPSHOT jersey-mvc-bean-validation diff --git a/ext/mvc-freemarker/pom.xml b/ext/mvc-freemarker/pom.xml index 0f2d5d7afd..029cbd0195 100644 --- a/ext/mvc-freemarker/pom.xml +++ b/ext/mvc-freemarker/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.0.3 + 3.1.0-SNAPSHOT jersey-mvc-freemarker diff --git a/ext/mvc-jsp/pom.xml b/ext/mvc-jsp/pom.xml index 6fc7a0a2a2..1235bbc540 100644 --- a/ext/mvc-jsp/pom.xml +++ b/ext/mvc-jsp/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.0.3 + 3.1.0-SNAPSHOT jersey-mvc-jsp diff --git a/ext/mvc-mustache/pom.xml b/ext/mvc-mustache/pom.xml index af136c6c5c..012bb364a3 100644 --- a/ext/mvc-mustache/pom.xml +++ b/ext/mvc-mustache/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.0.3 + 3.1.0-SNAPSHOT jersey-mvc-mustache diff --git a/ext/mvc/pom.xml b/ext/mvc/pom.xml index f956d5a0af..168afa700f 100644 --- a/ext/mvc/pom.xml +++ b/ext/mvc/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.0.3 + 3.1.0-SNAPSHOT jersey-mvc diff --git a/ext/pom.xml b/ext/pom.xml index 66870396eb..c4f3784fda 100644 --- a/ext/pom.xml +++ b/ext/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.ext diff --git a/ext/proxy-client/pom.xml b/ext/proxy-client/pom.xml index 7e1ec7c040..3aef09483a 100644 --- a/ext/proxy-client/pom.xml +++ b/ext/proxy-client/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.0.3 + 3.1.0-SNAPSHOT jersey-proxy-client diff --git a/ext/rx/pom.xml b/ext/rx/pom.xml index 50478c8972..6b88f86ca6 100644 --- a/ext/rx/pom.xml +++ b/ext/rx/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.ext.rx diff --git a/ext/rx/rx-client-guava/pom.xml b/ext/rx/rx-client-guava/pom.xml index 44dab0bd51..a753c89107 100644 --- a/ext/rx/rx-client-guava/pom.xml +++ b/ext/rx/rx-client-guava/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.rx project - 3.0.3 + 3.1.0-SNAPSHOT jersey-rx-client-guava diff --git a/ext/rx/rx-client-rxjava/pom.xml b/ext/rx/rx-client-rxjava/pom.xml index 2f711aa355..28b3cab676 100644 --- a/ext/rx/rx-client-rxjava/pom.xml +++ b/ext/rx/rx-client-rxjava/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.rx project - 3.0.3 + 3.1.0-SNAPSHOT jersey-rx-client-rxjava diff --git a/ext/rx/rx-client-rxjava2/pom.xml b/ext/rx/rx-client-rxjava2/pom.xml index cc908c3593..ad824b8556 100644 --- a/ext/rx/rx-client-rxjava2/pom.xml +++ b/ext/rx/rx-client-rxjava2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.ext.rx project - 3.0.3 + 3.1.0-SNAPSHOT jersey-rx-client-rxjava2 diff --git a/ext/wadl-doclet/pom.xml b/ext/wadl-doclet/pom.xml index 7bdeca9162..d742e7de16 100644 --- a/ext/wadl-doclet/pom.xml +++ b/ext/wadl-doclet/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.ext - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 jersey-wadl-doclet diff --git a/incubator/cdi-inject-weld/pom.xml b/incubator/cdi-inject-weld/pom.xml index 9af1ec40b3..cc548c0233 100644 --- a/incubator/cdi-inject-weld/pom.xml +++ b/incubator/cdi-inject-weld/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.incubator project - 3.0.3 + 3.1.0-SNAPSHOT jersey-cdi-inject-weld diff --git a/incubator/declarative-linking/pom.xml b/incubator/declarative-linking/pom.xml index badd250e33..0fa4aa05c4 100644 --- a/incubator/declarative-linking/pom.xml +++ b/incubator/declarative-linking/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.incubator project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.ext diff --git a/incubator/gae-integration/pom.xml b/incubator/gae-integration/pom.xml index 4a219112a9..bb0225668f 100644 --- a/incubator/gae-integration/pom.xml +++ b/incubator/gae-integration/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.incubator project - 3.0.3 + 3.1.0-SNAPSHOT jersey-gae-integration diff --git a/incubator/html-json/pom.xml b/incubator/html-json/pom.xml index 7970da13d7..9a778b3fed 100644 --- a/incubator/html-json/pom.xml +++ b/incubator/html-json/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.incubator project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.media diff --git a/incubator/kryo/pom.xml b/incubator/kryo/pom.xml index 0abf0e1556..3e7eda623c 100644 --- a/incubator/kryo/pom.xml +++ b/incubator/kryo/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.incubator project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.media diff --git a/incubator/open-tracing/pom.xml b/incubator/open-tracing/pom.xml index 32494ae533..dc747005d6 100644 --- a/incubator/open-tracing/pom.xml +++ b/incubator/open-tracing/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.incubator project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.incubator diff --git a/incubator/pom.xml b/incubator/pom.xml index 31c1dce415..f9733949e5 100644 --- a/incubator/pom.xml +++ b/incubator/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.incubator diff --git a/inject/cdi2-se/pom.xml b/inject/cdi2-se/pom.xml index 2cf6e10423..580350f89c 100644 --- a/inject/cdi2-se/pom.xml +++ b/inject/cdi2-se/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.inject project - 3.0.3 + 3.1.0-SNAPSHOT jersey-cdi2-se diff --git a/inject/hk2/pom.xml b/inject/hk2/pom.xml index ac4ecaf13d..0e94b18de9 100644 --- a/inject/hk2/pom.xml +++ b/inject/hk2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.inject project - 3.0.3 + 3.1.0-SNAPSHOT jersey-hk2 diff --git a/inject/pom.xml b/inject/pom.xml index f554044342..7e39ebddc3 100644 --- a/inject/pom.xml +++ b/inject/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.inject diff --git a/media/jaxb/pom.xml b/media/jaxb/pom.xml index c84509bbd2..da75386c2e 100644 --- a/media/jaxb/pom.xml +++ b/media/jaxb/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.0.3 + 3.1.0-SNAPSHOT jersey-media-jaxb diff --git a/media/json-binding/pom.xml b/media/json-binding/pom.xml index b5e4df9150..bae44fa3ff 100644 --- a/media/json-binding/pom.xml +++ b/media/json-binding/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.0.3 + 3.1.0-SNAPSHOT jersey-media-json-binding diff --git a/media/json-jackson/pom.xml b/media/json-jackson/pom.xml index f2e766868b..cbc01771b5 100644 --- a/media/json-jackson/pom.xml +++ b/media/json-jackson/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.0.3 + 3.1.0-SNAPSHOT jersey-media-json-jackson diff --git a/media/json-jettison/pom.xml b/media/json-jettison/pom.xml index face80b8a9..78748cccbb 100644 --- a/media/json-jettison/pom.xml +++ b/media/json-jettison/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.0.3 + 3.1.0-SNAPSHOT jersey-media-json-jettison diff --git a/media/json-processing/pom.xml b/media/json-processing/pom.xml index 1051dc8506..834aef8133 100644 --- a/media/json-processing/pom.xml +++ b/media/json-processing/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.0.3 + 3.1.0-SNAPSHOT jersey-media-json-processing diff --git a/media/moxy/pom.xml b/media/moxy/pom.xml index 7093bfcb4c..e7401bc620 100644 --- a/media/moxy/pom.xml +++ b/media/moxy/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.0.3 + 3.1.0-SNAPSHOT jersey-media-moxy diff --git a/media/multipart/pom.xml b/media/multipart/pom.xml index cac2f69826..b4f2a65d9e 100644 --- a/media/multipart/pom.xml +++ b/media/multipart/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.0.3 + 3.1.0-SNAPSHOT jersey-media-multipart diff --git a/media/pom.xml b/media/pom.xml index 4b2bf41816..b1028e8492 100644 --- a/media/pom.xml +++ b/media/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.media diff --git a/media/sse/pom.xml b/media/sse/pom.xml index be622160c1..268aab1e1f 100644 --- a/media/sse/pom.xml +++ b/media/sse/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.media project - 3.0.3 + 3.1.0-SNAPSHOT jersey-media-sse diff --git a/pom.xml b/pom.xml index fe899b7228..fd031610fa 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ org.glassfish.jersey project pom - 3.0.3 + 3.1.0-SNAPSHOT jersey Eclipse Jersey is the open source (under dual EPL+GPL license) Jakarta RESTful WebServices 3.0 diff --git a/security/oauth1-client/pom.xml b/security/oauth1-client/pom.xml index c28ebdec03..09be3d2887 100644 --- a/security/oauth1-client/pom.xml +++ b/security/oauth1-client/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.security project - 3.0.3 + 3.1.0-SNAPSHOT oauth1-client diff --git a/security/oauth1-server/pom.xml b/security/oauth1-server/pom.xml index 83b91fba31..53095659f5 100644 --- a/security/oauth1-server/pom.xml +++ b/security/oauth1-server/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.security project - 3.0.3 + 3.1.0-SNAPSHOT oauth1-server diff --git a/security/oauth1-signature/pom.xml b/security/oauth1-signature/pom.xml index 5f4e3bfb3c..b96a096229 100644 --- a/security/oauth1-signature/pom.xml +++ b/security/oauth1-signature/pom.xml @@ -21,7 +21,7 @@ org.glassfish.jersey.security project - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/security/oauth2-client/pom.xml b/security/oauth2-client/pom.xml index 05b6486c1c..dc1923acae 100644 --- a/security/oauth2-client/pom.xml +++ b/security/oauth2-client/pom.xml @@ -21,7 +21,7 @@ org.glassfish.jersey.security project - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/security/pom.xml b/security/pom.xml index 283c348b71..8d2e7bd87d 100644 --- a/security/pom.xml +++ b/security/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.security diff --git a/test-framework/core/pom.xml b/test-framework/core/pom.xml index d6c40d4c96..dbf30c7da7 100644 --- a/test-framework/core/pom.xml +++ b/test-framework/core/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework project - 3.0.3 + 3.1.0-SNAPSHOT jersey-test-framework-core diff --git a/test-framework/maven/container-runner-maven-plugin/pom.xml b/test-framework/maven/container-runner-maven-plugin/pom.xml index 690fc7a9c8..2c2c1694cf 100644 --- a/test-framework/maven/container-runner-maven-plugin/pom.xml +++ b/test-framework/maven/container-runner-maven-plugin/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.maven project - 3.0.3 + 3.1.0-SNAPSHOT container-runner-maven-plugin diff --git a/test-framework/maven/custom-enforcer-rules/pom.xml b/test-framework/maven/custom-enforcer-rules/pom.xml index f30f32fccf..8956e02088 100644 --- a/test-framework/maven/custom-enforcer-rules/pom.xml +++ b/test-framework/maven/custom-enforcer-rules/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.maven project - 3.0.3 + 3.1.0-SNAPSHOT custom-enforcer-rules diff --git a/test-framework/maven/pom.xml b/test-framework/maven/pom.xml index b711584054..5bdb5a3407 100644 --- a/test-framework/maven/pom.xml +++ b/test-framework/maven/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.test-framework project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.test-framework.maven diff --git a/test-framework/memleak-test-common/pom.xml b/test-framework/memleak-test-common/pom.xml index 36fafcfe90..ffef988d10 100644 --- a/test-framework/memleak-test-common/pom.xml +++ b/test-framework/memleak-test-common/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework project - 3.0.3 + 3.1.0-SNAPSHOT memleak-test-common diff --git a/test-framework/pom.xml b/test-framework/pom.xml index a1546d3ebe..25fbfb3ee1 100644 --- a/test-framework/pom.xml +++ b/test-framework/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.test-framework diff --git a/test-framework/providers/bundle/pom.xml b/test-framework/providers/bundle/pom.xml index dfc346dde5..2101fb6e19 100644 --- a/test-framework/providers/bundle/pom.xml +++ b/test-framework/providers/bundle/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.providers project - 3.0.3 + 3.1.0-SNAPSHOT jersey-test-framework-provider-bundle diff --git a/test-framework/providers/external/pom.xml b/test-framework/providers/external/pom.xml index c454e5c366..b219cec2b0 100644 --- a/test-framework/providers/external/pom.xml +++ b/test-framework/providers/external/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.providers project - 3.0.3 + 3.1.0-SNAPSHOT jersey-test-framework-provider-external diff --git a/test-framework/providers/grizzly2/pom.xml b/test-framework/providers/grizzly2/pom.xml index 3ffe9ec9d9..efcf674c92 100644 --- a/test-framework/providers/grizzly2/pom.xml +++ b/test-framework/providers/grizzly2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.providers project - 3.0.3 + 3.1.0-SNAPSHOT jersey-test-framework-provider-grizzly2 diff --git a/test-framework/providers/inmemory/pom.xml b/test-framework/providers/inmemory/pom.xml index f8a6894b3d..d2630857a0 100644 --- a/test-framework/providers/inmemory/pom.xml +++ b/test-framework/providers/inmemory/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.providers project - 3.0.3 + 3.1.0-SNAPSHOT jersey-test-framework-provider-inmemory diff --git a/test-framework/providers/jdk-http/pom.xml b/test-framework/providers/jdk-http/pom.xml index a08bf4ae49..a2bb0e8bbf 100644 --- a/test-framework/providers/jdk-http/pom.xml +++ b/test-framework/providers/jdk-http/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.providers project - 3.0.3 + 3.1.0-SNAPSHOT jersey-test-framework-provider-jdk-http diff --git a/test-framework/providers/jetty/pom.xml b/test-framework/providers/jetty/pom.xml index b2f0f385a2..5436e9b25e 100644 --- a/test-framework/providers/jetty/pom.xml +++ b/test-framework/providers/jetty/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.test-framework.providers - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/test-framework/providers/netty/pom.xml b/test-framework/providers/netty/pom.xml index 428434d394..db110cf02a 100644 --- a/test-framework/providers/netty/pom.xml +++ b/test-framework/providers/netty/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework.providers project - 3.0.3 + 3.1.0-SNAPSHOT jersey-test-framework-provider-netty diff --git a/test-framework/providers/pom.xml b/test-framework/providers/pom.xml index 90989bf8bb..6671a27820 100644 --- a/test-framework/providers/pom.xml +++ b/test-framework/providers/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.test-framework.providers diff --git a/test-framework/providers/simple/pom.xml b/test-framework/providers/simple/pom.xml index c286d2e2d2..49b7e990d6 100644 --- a/test-framework/providers/simple/pom.xml +++ b/test-framework/providers/simple/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.test-framework.providers - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/test-framework/util/pom.xml b/test-framework/util/pom.xml index 0af34e5c17..a5663ae10a 100644 --- a/test-framework/util/pom.xml +++ b/test-framework/util/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.test-framework project - 3.0.3 + 3.1.0-SNAPSHOT jersey-test-framework-util diff --git a/tests/e2e-client/pom.xml b/tests/e2e-client/pom.xml index 17c9d51e59..55e95d3ae9 100644 --- a/tests/e2e-client/pom.xml +++ b/tests/e2e-client/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.0.3 + 3.1.0-SNAPSHOT e2e-client diff --git a/tests/e2e-core-common/pom.xml b/tests/e2e-core-common/pom.xml index 3b2fc93541..172e277c25 100644 --- a/tests/e2e-core-common/pom.xml +++ b/tests/e2e-core-common/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.0.3 + 3.1.0-SNAPSHOT e2e-core-common diff --git a/tests/e2e-entity/pom.xml b/tests/e2e-entity/pom.xml index 999b10e722..00e56b9f64 100644 --- a/tests/e2e-entity/pom.xml +++ b/tests/e2e-entity/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.0.3 + 3.1.0-SNAPSHOT e2e-entity diff --git a/tests/e2e-inject/cdi-inject-weld/pom.xml b/tests/e2e-inject/cdi-inject-weld/pom.xml index b5f998550c..2289a5e261 100644 --- a/tests/e2e-inject/cdi-inject-weld/pom.xml +++ b/tests/e2e-inject/cdi-inject-weld/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests e2e-inject - 3.0.3 + 3.1.0-SNAPSHOT e2e-inject-cdi-inject-weld diff --git a/tests/e2e-inject/cdi2-se/pom.xml b/tests/e2e-inject/cdi2-se/pom.xml index 03f1ae8788..6ba3e9a1ab 100644 --- a/tests/e2e-inject/cdi2-se/pom.xml +++ b/tests/e2e-inject/cdi2-se/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests e2e-inject - 3.0.3 + 3.1.0-SNAPSHOT e2e-inject-cdi2-se diff --git a/tests/e2e-inject/hk2/pom.xml b/tests/e2e-inject/hk2/pom.xml index 530ce21c7a..aac4c5c45d 100644 --- a/tests/e2e-inject/hk2/pom.xml +++ b/tests/e2e-inject/hk2/pom.xml @@ -23,7 +23,7 @@ e2e-inject org.glassfish.jersey.tests - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/e2e-inject/pom.xml b/tests/e2e-inject/pom.xml index 2c86a59469..d24ac03c99 100644 --- a/tests/e2e-inject/pom.xml +++ b/tests/e2e-inject/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.0.3 + 3.1.0-SNAPSHOT e2e-inject diff --git a/tests/e2e-server/pom.xml b/tests/e2e-server/pom.xml index 728c132e1c..65872af0d1 100644 --- a/tests/e2e-server/pom.xml +++ b/tests/e2e-server/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.0.3 + 3.1.0-SNAPSHOT e2e-server diff --git a/tests/e2e-testng/pom.xml b/tests/e2e-testng/pom.xml index b76b92eae9..8c514205e3 100644 --- a/tests/e2e-testng/pom.xml +++ b/tests/e2e-testng/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.tests project - 3.0.3 + 3.1.0-SNAPSHOT e2e-testng diff --git a/tests/e2e/pom.xml b/tests/e2e/pom.xml index ee3a62223f..179e28bb14 100644 --- a/tests/e2e/pom.xml +++ b/tests/e2e/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.0.3 + 3.1.0-SNAPSHOT e2e diff --git a/tests/integration/asm/pom.xml b/tests/integration/asm/pom.xml index 39c8fb8871..d28ead4717 100644 --- a/tests/integration/asm/pom.xml +++ b/tests/integration/asm/pom.xml @@ -23,7 +23,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/integration/async-jersey-filter/pom.xml b/tests/integration/async-jersey-filter/pom.xml index d64eb83e42..5d424e70fe 100644 --- a/tests/integration/async-jersey-filter/pom.xml +++ b/tests/integration/async-jersey-filter/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT async-jersey-filter diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml index 7f07ca4e91..18950ce94d 100644 --- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT cdi-beanvalidation-webapp diff --git a/tests/integration/cdi-integration/cdi-client-on-server/pom.xml b/tests/integration/cdi-integration/cdi-client-on-server/pom.xml index db97eef8c7..b4d76a6bf3 100644 --- a/tests/integration/cdi-integration/cdi-client-on-server/pom.xml +++ b/tests/integration/cdi-integration/cdi-client-on-server/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT cdi-client-on-server diff --git a/tests/integration/cdi-integration/cdi-client/pom.xml b/tests/integration/cdi-integration/cdi-client/pom.xml index d343eadfb7..e51e5540ea 100644 --- a/tests/integration/cdi-integration/cdi-client/pom.xml +++ b/tests/integration/cdi-integration/cdi-client/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT cdi-client diff --git a/tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml b/tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml index 4e1fe79304..5cc62c5bd4 100644 --- a/tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT cdi-ejb-test-webapp diff --git a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml index 8b1c9b483a..289012251b 100644 --- a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT cdi-iface-with-non-jaxrs-impl-test-webapp diff --git a/tests/integration/cdi-integration/cdi-log-check/pom.xml b/tests/integration/cdi-integration/cdi-log-check/pom.xml index 08efa4d714..ec36e8f39c 100644 --- a/tests/integration/cdi-integration/cdi-log-check/pom.xml +++ b/tests/integration/cdi-integration/cdi-log-check/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT cdi-log-check diff --git a/tests/integration/cdi-integration/cdi-manually-bound/pom.xml b/tests/integration/cdi-integration/cdi-manually-bound/pom.xml index 64f933013f..a8289d2e69 100644 --- a/tests/integration/cdi-integration/cdi-manually-bound/pom.xml +++ b/tests/integration/cdi-integration/cdi-manually-bound/pom.xml @@ -23,7 +23,7 @@ cdi-integration-project org.glassfish.jersey.tests.integration.cdi - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml index a86e97df64..0c2d8d48ed 100644 --- a/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml +++ b/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml index b28dc712ca..99f073aa69 100644 --- a/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml +++ b/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/cdi-integration/cdi-multimodule/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/pom.xml index cc847dcca7..189f6264a2 100644 --- a/tests/integration/cdi-integration/cdi-multimodule/pom.xml +++ b/tests/integration/cdi-integration/cdi-multimodule/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT cdi-multimodule diff --git a/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml index 893a6503d6..8ffa7f32a2 100644 --- a/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml +++ b/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml index 44b8970cb2..922014573a 100644 --- a/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml +++ b/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml b/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml index bedd14d655..a54e94cf39 100644 --- a/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT cdi-multipart-webapp diff --git a/tests/integration/cdi-integration/cdi-resource-with-at-context/pom.xml b/tests/integration/cdi-integration/cdi-resource-with-at-context/pom.xml index 5add3a4626..464e1a4017 100644 --- a/tests/integration/cdi-integration/cdi-resource-with-at-context/pom.xml +++ b/tests/integration/cdi-integration/cdi-resource-with-at-context/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/integration/cdi-integration/cdi-singleton/pom.xml b/tests/integration/cdi-integration/cdi-singleton/pom.xml index 6de8930f9d..6aef2a0696 100644 --- a/tests/integration/cdi-integration/cdi-singleton/pom.xml +++ b/tests/integration/cdi-integration/cdi-singleton/pom.xml @@ -23,7 +23,7 @@ cdi-integration-project org.glassfish.jersey.tests.integration.cdi - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/integration/cdi-integration/cdi-test-webapp/pom.xml b/tests/integration/cdi-integration/cdi-test-webapp/pom.xml index 386fb3addd..48a6b75e7f 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-test-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT cdi-test-webapp diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml index 0c2ad9fa3a..579da311b7 100644 --- a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT cdi-with-jersey-injection-custom-cfg-webapp diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml index e5880508f4..2f9e905a0c 100644 --- a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT cdi-with-jersey-injection-custom-hk2-banned-webapp diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml index f0ec2e8d6a..c3c7849251 100644 --- a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT cdi-with-jersey-injection-webapp diff --git a/tests/integration/cdi-integration/context-inject-on-server/pom.xml b/tests/integration/cdi-integration/context-inject-on-server/pom.xml index 4412a2672d..856a3eeb27 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/pom.xml +++ b/tests/integration/cdi-integration/context-inject-on-server/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration.cdi cdi-integration-project - 3.0.3 + 3.1.0-SNAPSHOT context-inject-on-server diff --git a/tests/integration/cdi-integration/pom.xml b/tests/integration/cdi-integration/pom.xml index 1bccf2ce70..c4ed648e08 100644 --- a/tests/integration/cdi-integration/pom.xml +++ b/tests/integration/cdi-integration/pom.xml @@ -23,7 +23,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 pom diff --git a/tests/integration/client-connector-provider/pom.xml b/tests/integration/client-connector-provider/pom.xml index 21e12c5b09..19579b2329 100644 --- a/tests/integration/client-connector-provider/pom.xml +++ b/tests/integration/client-connector-provider/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT client-connector-provider diff --git a/tests/integration/ejb-multimodule-reload/ear/pom.xml b/tests/integration/ejb-multimodule-reload/ear/pom.xml index f6c314d256..7a2ba1b7d8 100644 --- a/tests/integration/ejb-multimodule-reload/ear/pom.xml +++ b/tests/integration/ejb-multimodule-reload/ear/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/ejb-multimodule-reload/lib/pom.xml b/tests/integration/ejb-multimodule-reload/lib/pom.xml index be3a6c1aa9..af8140326d 100644 --- a/tests/integration/ejb-multimodule-reload/lib/pom.xml +++ b/tests/integration/ejb-multimodule-reload/lib/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/ejb-multimodule-reload/pom.xml b/tests/integration/ejb-multimodule-reload/pom.xml index c90b1cf7ba..a37d861462 100644 --- a/tests/integration/ejb-multimodule-reload/pom.xml +++ b/tests/integration/ejb-multimodule-reload/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ejb-multimodule-reload diff --git a/tests/integration/ejb-multimodule-reload/war1/pom.xml b/tests/integration/ejb-multimodule-reload/war1/pom.xml index 105dea823d..68ba11053d 100644 --- a/tests/integration/ejb-multimodule-reload/war1/pom.xml +++ b/tests/integration/ejb-multimodule-reload/war1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/ejb-multimodule-reload/war2/pom.xml b/tests/integration/ejb-multimodule-reload/war2/pom.xml index 30daf00382..ce3e0c327f 100644 --- a/tests/integration/ejb-multimodule-reload/war2/pom.xml +++ b/tests/integration/ejb-multimodule-reload/war2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/ejb-multimodule/ear/pom.xml b/tests/integration/ejb-multimodule/ear/pom.xml index 943ccf397a..64a4091764 100644 --- a/tests/integration/ejb-multimodule/ear/pom.xml +++ b/tests/integration/ejb-multimodule/ear/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/ejb-multimodule/lib/pom.xml b/tests/integration/ejb-multimodule/lib/pom.xml index 0676c7ecd1..4a2170d47b 100644 --- a/tests/integration/ejb-multimodule/lib/pom.xml +++ b/tests/integration/ejb-multimodule/lib/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/ejb-multimodule/pom.xml b/tests/integration/ejb-multimodule/pom.xml index bcff26cfbc..a8531182a7 100644 --- a/tests/integration/ejb-multimodule/pom.xml +++ b/tests/integration/ejb-multimodule/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ejb-multimodule diff --git a/tests/integration/ejb-multimodule/war/pom.xml b/tests/integration/ejb-multimodule/war/pom.xml index 9693c03647..700e2e71fa 100644 --- a/tests/integration/ejb-multimodule/war/pom.xml +++ b/tests/integration/ejb-multimodule/war/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/ejb-test-webapp/pom.xml b/tests/integration/ejb-test-webapp/pom.xml index f243a39e1f..e0de691cd8 100644 --- a/tests/integration/ejb-test-webapp/pom.xml +++ b/tests/integration/ejb-test-webapp/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ejb-test-webapp diff --git a/tests/integration/externalproperties/pom.xml b/tests/integration/externalproperties/pom.xml index 18772f81d9..0d46fcf361 100644 --- a/tests/integration/externalproperties/pom.xml +++ b/tests/integration/externalproperties/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT externalproperties diff --git a/tests/integration/j-376/pom.xml b/tests/integration/j-376/pom.xml index fc54f84573..a740b6b745 100644 --- a/tests/integration/j-376/pom.xml +++ b/tests/integration/j-376/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT j-376 diff --git a/tests/integration/j-441/ear/pom.xml b/tests/integration/j-441/ear/pom.xml index a59dbbdaf8..685e244fe2 100644 --- a/tests/integration/j-441/ear/pom.xml +++ b/tests/integration/j-441/ear/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml j-441-ear diff --git a/tests/integration/j-441/pom.xml b/tests/integration/j-441/pom.xml index 8d62a39da0..971d45c72b 100644 --- a/tests/integration/j-441/pom.xml +++ b/tests/integration/j-441/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT j-441 diff --git a/tests/integration/j-441/war1/pom.xml b/tests/integration/j-441/war1/pom.xml index 9c885ce221..7b165bc3c3 100644 --- a/tests/integration/j-441/war1/pom.xml +++ b/tests/integration/j-441/war1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/j-441/war2/pom.xml b/tests/integration/j-441/war2/pom.xml index fa64fa4ac3..58cad9b3f9 100644 --- a/tests/integration/j-441/war2/pom.xml +++ b/tests/integration/j-441/war2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/j-59/ear/pom.xml b/tests/integration/j-59/ear/pom.xml index 65c6d4a0c8..ef96aa3209 100644 --- a/tests/integration/j-59/ear/pom.xml +++ b/tests/integration/j-59/ear/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/j-59/lib/pom.xml b/tests/integration/j-59/lib/pom.xml index 8371995480..4f4290b71e 100644 --- a/tests/integration/j-59/lib/pom.xml +++ b/tests/integration/j-59/lib/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/j-59/pom.xml b/tests/integration/j-59/pom.xml index 669089bfbf..f1a51ccc8f 100644 --- a/tests/integration/j-59/pom.xml +++ b/tests/integration/j-59/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT j-59 diff --git a/tests/integration/j-59/war/pom.xml b/tests/integration/j-59/war/pom.xml index d4f248b571..5743c6108d 100644 --- a/tests/integration/j-59/war/pom.xml +++ b/tests/integration/j-59/war/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT ../../pom.xml diff --git a/tests/integration/jaxrs-component-inject/pom.xml b/tests/integration/jaxrs-component-inject/pom.xml index 3f229832f8..49841117a9 100644 --- a/tests/integration/jaxrs-component-inject/pom.xml +++ b/tests/integration/jaxrs-component-inject/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jaxrs-component-inject diff --git a/tests/integration/jersey-1107/pom.xml b/tests/integration/jersey-1107/pom.xml index 10cac46646..96b953d40c 100644 --- a/tests/integration/jersey-1107/pom.xml +++ b/tests/integration/jersey-1107/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-1107 diff --git a/tests/integration/jersey-1223/pom.xml b/tests/integration/jersey-1223/pom.xml index 3ea8555593..b36bf24996 100644 --- a/tests/integration/jersey-1223/pom.xml +++ b/tests/integration/jersey-1223/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 jersey-1223 diff --git a/tests/integration/jersey-1604/pom.xml b/tests/integration/jersey-1604/pom.xml index 2d9ddfd8f5..aff35ea7f7 100644 --- a/tests/integration/jersey-1604/pom.xml +++ b/tests/integration/jersey-1604/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 jersey-1604 diff --git a/tests/integration/jersey-1667/pom.xml b/tests/integration/jersey-1667/pom.xml index 6734e8a084..caf5240291 100644 --- a/tests/integration/jersey-1667/pom.xml +++ b/tests/integration/jersey-1667/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-1667 diff --git a/tests/integration/jersey-1883/pom.xml b/tests/integration/jersey-1883/pom.xml index 074e5cd34c..a1af8ff0cb 100644 --- a/tests/integration/jersey-1883/pom.xml +++ b/tests/integration/jersey-1883/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-1883 diff --git a/tests/integration/jersey-1928/pom.xml b/tests/integration/jersey-1928/pom.xml index c0d5ec38ec..40d6caafe3 100644 --- a/tests/integration/jersey-1928/pom.xml +++ b/tests/integration/jersey-1928/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 jersey-1928 diff --git a/tests/integration/jersey-1960/pom.xml b/tests/integration/jersey-1960/pom.xml index 1c7b43251d..4787ec80f1 100644 --- a/tests/integration/jersey-1960/pom.xml +++ b/tests/integration/jersey-1960/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-1960 diff --git a/tests/integration/jersey-1964/pom.xml b/tests/integration/jersey-1964/pom.xml index cb13ebeb05..8f203f7bc4 100644 --- a/tests/integration/jersey-1964/pom.xml +++ b/tests/integration/jersey-1964/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-1964 diff --git a/tests/integration/jersey-2031/pom.xml b/tests/integration/jersey-2031/pom.xml index f902076cd9..a2ab3317c8 100644 --- a/tests/integration/jersey-2031/pom.xml +++ b/tests/integration/jersey-2031/pom.xml @@ -25,7 +25,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2031 diff --git a/tests/integration/jersey-2136/pom.xml b/tests/integration/jersey-2136/pom.xml index b637cca2c2..1cf9a81e0f 100644 --- a/tests/integration/jersey-2136/pom.xml +++ b/tests/integration/jersey-2136/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2136 diff --git a/tests/integration/jersey-2137/pom.xml b/tests/integration/jersey-2137/pom.xml index ef500dcf51..7fc7b92e5e 100644 --- a/tests/integration/jersey-2137/pom.xml +++ b/tests/integration/jersey-2137/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2137 diff --git a/tests/integration/jersey-2154/pom.xml b/tests/integration/jersey-2154/pom.xml index 28915ef3e8..3a97c879c1 100644 --- a/tests/integration/jersey-2154/pom.xml +++ b/tests/integration/jersey-2154/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2154 diff --git a/tests/integration/jersey-2160/pom.xml b/tests/integration/jersey-2160/pom.xml index 9c51766361..72e3d5fc9e 100644 --- a/tests/integration/jersey-2160/pom.xml +++ b/tests/integration/jersey-2160/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2160 diff --git a/tests/integration/jersey-2164/pom.xml b/tests/integration/jersey-2164/pom.xml index 7eac8f6ad9..9eb532b60a 100644 --- a/tests/integration/jersey-2164/pom.xml +++ b/tests/integration/jersey-2164/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2164 diff --git a/tests/integration/jersey-2167/pom.xml b/tests/integration/jersey-2167/pom.xml index 73c985340a..2d241f432a 100644 --- a/tests/integration/jersey-2167/pom.xml +++ b/tests/integration/jersey-2167/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2167 diff --git a/tests/integration/jersey-2176/pom.xml b/tests/integration/jersey-2176/pom.xml index 424a9642a5..d7ad02c218 100644 --- a/tests/integration/jersey-2176/pom.xml +++ b/tests/integration/jersey-2176/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2176 diff --git a/tests/integration/jersey-2184/pom.xml b/tests/integration/jersey-2184/pom.xml index a5547984cf..b607899838 100644 --- a/tests/integration/jersey-2184/pom.xml +++ b/tests/integration/jersey-2184/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2184 diff --git a/tests/integration/jersey-2255/pom.xml b/tests/integration/jersey-2255/pom.xml index 3991a455ef..23922703b2 100644 --- a/tests/integration/jersey-2255/pom.xml +++ b/tests/integration/jersey-2255/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2255 diff --git a/tests/integration/jersey-2322/pom.xml b/tests/integration/jersey-2322/pom.xml index 0a77a8dcdf..5b8de1799f 100644 --- a/tests/integration/jersey-2322/pom.xml +++ b/tests/integration/jersey-2322/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2322 diff --git a/tests/integration/jersey-2335/pom.xml b/tests/integration/jersey-2335/pom.xml index e4453c708b..f5fc34023b 100644 --- a/tests/integration/jersey-2335/pom.xml +++ b/tests/integration/jersey-2335/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2335 diff --git a/tests/integration/jersey-2421/pom.xml b/tests/integration/jersey-2421/pom.xml index d7858a2719..a239661cf9 100644 --- a/tests/integration/jersey-2421/pom.xml +++ b/tests/integration/jersey-2421/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2421 diff --git a/tests/integration/jersey-2551/pom.xml b/tests/integration/jersey-2551/pom.xml index 8086c25894..7a982aaee5 100644 --- a/tests/integration/jersey-2551/pom.xml +++ b/tests/integration/jersey-2551/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2551 diff --git a/tests/integration/jersey-2612/pom.xml b/tests/integration/jersey-2612/pom.xml index f2f6920e71..ea86ae2eb9 100644 --- a/tests/integration/jersey-2612/pom.xml +++ b/tests/integration/jersey-2612/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2612 diff --git a/tests/integration/jersey-2637/pom.xml b/tests/integration/jersey-2637/pom.xml index 30e0f1e299..e83e666098 100644 --- a/tests/integration/jersey-2637/pom.xml +++ b/tests/integration/jersey-2637/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2637 diff --git a/tests/integration/jersey-2654/pom.xml b/tests/integration/jersey-2654/pom.xml index ca4193a7bc..cba4a5e1c0 100644 --- a/tests/integration/jersey-2654/pom.xml +++ b/tests/integration/jersey-2654/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2654 diff --git a/tests/integration/jersey-2673/pom.xml b/tests/integration/jersey-2673/pom.xml index ccb09d0abd..866cb3faee 100644 --- a/tests/integration/jersey-2673/pom.xml +++ b/tests/integration/jersey-2673/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2673 diff --git a/tests/integration/jersey-2689/pom.xml b/tests/integration/jersey-2689/pom.xml index 97cbef6b6f..936f2aed18 100644 --- a/tests/integration/jersey-2689/pom.xml +++ b/tests/integration/jersey-2689/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2689 diff --git a/tests/integration/jersey-2704/pom.xml b/tests/integration/jersey-2704/pom.xml index ea57e0bfb8..4fac5ad7e8 100644 --- a/tests/integration/jersey-2704/pom.xml +++ b/tests/integration/jersey-2704/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2704 diff --git a/tests/integration/jersey-2776/pom.xml b/tests/integration/jersey-2776/pom.xml index 6b170afe2f..340e417c2c 100644 --- a/tests/integration/jersey-2776/pom.xml +++ b/tests/integration/jersey-2776/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2776 diff --git a/tests/integration/jersey-2794/pom.xml b/tests/integration/jersey-2794/pom.xml index 55699496c6..3a0d77b72a 100644 --- a/tests/integration/jersey-2794/pom.xml +++ b/tests/integration/jersey-2794/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2794 diff --git a/tests/integration/jersey-2846/pom.xml b/tests/integration/jersey-2846/pom.xml index d97a14ecdb..2c9613a0c2 100644 --- a/tests/integration/jersey-2846/pom.xml +++ b/tests/integration/jersey-2846/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2846 diff --git a/tests/integration/jersey-2878/pom.xml b/tests/integration/jersey-2878/pom.xml index 931e3f7316..148c488053 100644 --- a/tests/integration/jersey-2878/pom.xml +++ b/tests/integration/jersey-2878/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2878 diff --git a/tests/integration/jersey-2892/pom.xml b/tests/integration/jersey-2892/pom.xml index f84aa643c0..a7c8488b28 100644 --- a/tests/integration/jersey-2892/pom.xml +++ b/tests/integration/jersey-2892/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-2892 diff --git a/tests/integration/jersey-3662/pom.xml b/tests/integration/jersey-3662/pom.xml index 45a6ac87c8..a24a114e89 100644 --- a/tests/integration/jersey-3662/pom.xml +++ b/tests/integration/jersey-3662/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/integration/jersey-3670/pom.xml b/tests/integration/jersey-3670/pom.xml index aaf95928e8..230176176c 100644 --- a/tests/integration/jersey-3670/pom.xml +++ b/tests/integration/jersey-3670/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-3670 diff --git a/tests/integration/jersey-3796/pom.xml b/tests/integration/jersey-3796/pom.xml index 49d84b3df2..05d32919ec 100644 --- a/tests/integration/jersey-3796/pom.xml +++ b/tests/integration/jersey-3796/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-3796 diff --git a/tests/integration/jersey-3992/pom.xml b/tests/integration/jersey-3992/pom.xml index 7cda905735..87fb7da134 100644 --- a/tests/integration/jersey-3992/pom.xml +++ b/tests/integration/jersey-3992/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-3992 diff --git a/tests/integration/jersey-4003/pom.xml b/tests/integration/jersey-4003/pom.xml index 75acbb9eeb..4c4d4f14f4 100644 --- a/tests/integration/jersey-4003/pom.xml +++ b/tests/integration/jersey-4003/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/integration/jersey-4099/pom.xml b/tests/integration/jersey-4099/pom.xml index 12b6d2c2a6..66e19abc54 100644 --- a/tests/integration/jersey-4099/pom.xml +++ b/tests/integration/jersey-4099/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-4099 diff --git a/tests/integration/jersey-4321/pom.xml b/tests/integration/jersey-4321/pom.xml index 92fbc8212a..8138440c96 100644 --- a/tests/integration/jersey-4321/pom.xml +++ b/tests/integration/jersey-4321/pom.xml @@ -24,7 +24,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/integration/jersey-4507/pom.xml b/tests/integration/jersey-4507/pom.xml index e793fd7274..f64ec79018 100644 --- a/tests/integration/jersey-4507/pom.xml +++ b/tests/integration/jersey-4507/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/integration/jersey-4542/pom.xml b/tests/integration/jersey-4542/pom.xml index fd3a43669f..0fc86e36e3 100644 --- a/tests/integration/jersey-4542/pom.xml +++ b/tests/integration/jersey-4542/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/integration/jersey-4697/pom.xml b/tests/integration/jersey-4697/pom.xml index 3c13c1bd93..32514019e2 100644 --- a/tests/integration/jersey-4697/pom.xml +++ b/tests/integration/jersey-4697/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/integration/jersey-4722/pom.xml b/tests/integration/jersey-4722/pom.xml index 78f51e6683..2748c6ea53 100644 --- a/tests/integration/jersey-4722/pom.xml +++ b/tests/integration/jersey-4722/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/integration/jersey-780/pom.xml b/tests/integration/jersey-780/pom.xml index 43182d3566..5e6705064c 100644 --- a/tests/integration/jersey-780/pom.xml +++ b/tests/integration/jersey-780/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT jersey-780 diff --git a/tests/integration/microprofile/config/helidon/pom.xml b/tests/integration/microprofile/config/helidon/pom.xml index 071a7a8043..85770aeb83 100644 --- a/tests/integration/microprofile/config/helidon/pom.xml +++ b/tests/integration/microprofile/config/helidon/pom.xml @@ -22,7 +22,7 @@ microprofile-config-project org.glassfish.jersey.tests.integration.microprofile - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/integration/microprofile/config/pom.xml b/tests/integration/microprofile/config/pom.xml index 5062e1699a..89a35c954e 100644 --- a/tests/integration/microprofile/config/pom.xml +++ b/tests/integration/microprofile/config/pom.xml @@ -22,7 +22,7 @@ microprofile-integration-project org.glassfish.jersey.tests.integration.microprofile - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 pom diff --git a/tests/integration/microprofile/config/webapp/pom.xml b/tests/integration/microprofile/config/webapp/pom.xml index a46fe46adf..7ff3952726 100644 --- a/tests/integration/microprofile/config/webapp/pom.xml +++ b/tests/integration/microprofile/config/webapp/pom.xml @@ -22,7 +22,7 @@ microprofile-config-project org.glassfish.jersey.tests.integration.microprofile - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/integration/microprofile/pom.xml b/tests/integration/microprofile/pom.xml index 817ef81aac..e41fdaecfb 100644 --- a/tests/integration/microprofile/pom.xml +++ b/tests/integration/microprofile/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 pom diff --git a/tests/integration/pom.xml b/tests/integration/pom.xml index 48c0f32be6..c6e35a6204 100644 --- a/tests/integration/pom.xml +++ b/tests/integration/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.tests project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.tests.integration diff --git a/tests/integration/property-check/pom.xml b/tests/integration/property-check/pom.xml index abfc35c973..2d3985d5d8 100644 --- a/tests/integration/property-check/pom.xml +++ b/tests/integration/property-check/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT property-check diff --git a/tests/integration/reactive-streams/pom.xml b/tests/integration/reactive-streams/pom.xml index fe47c44756..53b12ee74d 100644 --- a/tests/integration/reactive-streams/pom.xml +++ b/tests/integration/reactive-streams/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 pom diff --git a/tests/integration/reactive-streams/sse/pom.xml b/tests/integration/reactive-streams/sse/pom.xml index f246b97bae..63831d224d 100644 --- a/tests/integration/reactive-streams/sse/pom.xml +++ b/tests/integration/reactive-streams/sse/pom.xml @@ -22,7 +22,7 @@ reactive-streams-integration-project org.glassfish.jersey.tests.integration.reactive - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/integration/security-digest/pom.xml b/tests/integration/security-digest/pom.xml index 931ca04fd7..0e93329e1a 100644 --- a/tests/integration/security-digest/pom.xml +++ b/tests/integration/security-digest/pom.xml @@ -21,7 +21,7 @@ project org.glassfish.jersey.tests.integration - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 security-digest diff --git a/tests/integration/servlet-2.5-autodiscovery-1/pom.xml b/tests/integration/servlet-2.5-autodiscovery-1/pom.xml index f02e13b1fe..5bcd396f5f 100644 --- a/tests/integration/servlet-2.5-autodiscovery-1/pom.xml +++ b/tests/integration/servlet-2.5-autodiscovery-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-autodiscovery-1 diff --git a/tests/integration/servlet-2.5-autodiscovery-2/pom.xml b/tests/integration/servlet-2.5-autodiscovery-2/pom.xml index a2870252b1..a528fe4fed 100644 --- a/tests/integration/servlet-2.5-autodiscovery-2/pom.xml +++ b/tests/integration/servlet-2.5-autodiscovery-2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-autodiscovery-2 diff --git a/tests/integration/servlet-2.5-filter/pom.xml b/tests/integration/servlet-2.5-filter/pom.xml index bfd0cd1b64..f00289f351 100644 --- a/tests/integration/servlet-2.5-filter/pom.xml +++ b/tests/integration/servlet-2.5-filter/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-filter diff --git a/tests/integration/servlet-2.5-inflector-1/pom.xml b/tests/integration/servlet-2.5-inflector-1/pom.xml index 1fc9a03e33..b6a4f15687 100644 --- a/tests/integration/servlet-2.5-inflector-1/pom.xml +++ b/tests/integration/servlet-2.5-inflector-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-inflector-1 diff --git a/tests/integration/servlet-2.5-init-1/pom.xml b/tests/integration/servlet-2.5-init-1/pom.xml index dbedc72546..c87fbb7fce 100644 --- a/tests/integration/servlet-2.5-init-1/pom.xml +++ b/tests/integration/servlet-2.5-init-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-init-1 diff --git a/tests/integration/servlet-2.5-init-2/pom.xml b/tests/integration/servlet-2.5-init-2/pom.xml index f3f7418925..ebfe4c159a 100644 --- a/tests/integration/servlet-2.5-init-2/pom.xml +++ b/tests/integration/servlet-2.5-init-2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-init-2 diff --git a/tests/integration/servlet-2.5-init-3/pom.xml b/tests/integration/servlet-2.5-init-3/pom.xml index 67d5afec0d..843bb40727 100644 --- a/tests/integration/servlet-2.5-init-3/pom.xml +++ b/tests/integration/servlet-2.5-init-3/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-init-3 diff --git a/tests/integration/servlet-2.5-init-4/pom.xml b/tests/integration/servlet-2.5-init-4/pom.xml index 8272e8d437..5d02efcceb 100644 --- a/tests/integration/servlet-2.5-init-4/pom.xml +++ b/tests/integration/servlet-2.5-init-4/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-init-4 diff --git a/tests/integration/servlet-2.5-init-5/pom.xml b/tests/integration/servlet-2.5-init-5/pom.xml index 42f52d1bf0..81ce7791c1 100644 --- a/tests/integration/servlet-2.5-init-5/pom.xml +++ b/tests/integration/servlet-2.5-init-5/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-init-5 diff --git a/tests/integration/servlet-2.5-init-6/pom.xml b/tests/integration/servlet-2.5-init-6/pom.xml index 738cd57d5f..b42c3515b8 100644 --- a/tests/integration/servlet-2.5-init-6/pom.xml +++ b/tests/integration/servlet-2.5-init-6/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-init-6 diff --git a/tests/integration/servlet-2.5-init-7/pom.xml b/tests/integration/servlet-2.5-init-7/pom.xml index bfe5c92436..a789216c34 100644 --- a/tests/integration/servlet-2.5-init-7/pom.xml +++ b/tests/integration/servlet-2.5-init-7/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-init-7 diff --git a/tests/integration/servlet-2.5-init-8/pom.xml b/tests/integration/servlet-2.5-init-8/pom.xml index b9bb8e2cce..b334d2a72b 100644 --- a/tests/integration/servlet-2.5-init-8/pom.xml +++ b/tests/integration/servlet-2.5-init-8/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-init-8 diff --git a/tests/integration/servlet-2.5-mvc-1/pom.xml b/tests/integration/servlet-2.5-mvc-1/pom.xml index 74923143b4..fae7e5176c 100644 --- a/tests/integration/servlet-2.5-mvc-1/pom.xml +++ b/tests/integration/servlet-2.5-mvc-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-mvc-1 diff --git a/tests/integration/servlet-2.5-mvc-2/pom.xml b/tests/integration/servlet-2.5-mvc-2/pom.xml index 5066f10b23..8e9f2bf130 100644 --- a/tests/integration/servlet-2.5-mvc-2/pom.xml +++ b/tests/integration/servlet-2.5-mvc-2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-mvc-2 diff --git a/tests/integration/servlet-2.5-mvc-3/pom.xml b/tests/integration/servlet-2.5-mvc-3/pom.xml index e2756c5108..9e1bfaf453 100644 --- a/tests/integration/servlet-2.5-mvc-3/pom.xml +++ b/tests/integration/servlet-2.5-mvc-3/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-mvc-3 diff --git a/tests/integration/servlet-2.5-reload/pom.xml b/tests/integration/servlet-2.5-reload/pom.xml index bf84ccc360..76abecc760 100644 --- a/tests/integration/servlet-2.5-reload/pom.xml +++ b/tests/integration/servlet-2.5-reload/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-2.5-reload diff --git a/tests/integration/servlet-3-async/pom.xml b/tests/integration/servlet-3-async/pom.xml index 9c5e8f0e1e..1a15a19e10 100644 --- a/tests/integration/servlet-3-async/pom.xml +++ b/tests/integration/servlet-3-async/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-async diff --git a/tests/integration/servlet-3-chunked-io/pom.xml b/tests/integration/servlet-3-chunked-io/pom.xml index f7d9aa55e5..ffd1bd083c 100644 --- a/tests/integration/servlet-3-chunked-io/pom.xml +++ b/tests/integration/servlet-3-chunked-io/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-chunked-io diff --git a/tests/integration/servlet-3-filter/pom.xml b/tests/integration/servlet-3-filter/pom.xml index ae1750893e..a090e95875 100644 --- a/tests/integration/servlet-3-filter/pom.xml +++ b/tests/integration/servlet-3-filter/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-filter diff --git a/tests/integration/servlet-3-gf-async/pom.xml b/tests/integration/servlet-3-gf-async/pom.xml index 798d85f2a7..8b195442fd 100644 --- a/tests/integration/servlet-3-gf-async/pom.xml +++ b/tests/integration/servlet-3-gf-async/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-gf-async diff --git a/tests/integration/servlet-3-inflector-1/pom.xml b/tests/integration/servlet-3-inflector-1/pom.xml index 2f400cc7af..e0eff7ccce 100644 --- a/tests/integration/servlet-3-inflector-1/pom.xml +++ b/tests/integration/servlet-3-inflector-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-inflector-1 diff --git a/tests/integration/servlet-3-init-1/pom.xml b/tests/integration/servlet-3-init-1/pom.xml index 928050a57a..27f7afe24a 100644 --- a/tests/integration/servlet-3-init-1/pom.xml +++ b/tests/integration/servlet-3-init-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-init-1 diff --git a/tests/integration/servlet-3-init-2/pom.xml b/tests/integration/servlet-3-init-2/pom.xml index 3a7b005071..29a4466afc 100644 --- a/tests/integration/servlet-3-init-2/pom.xml +++ b/tests/integration/servlet-3-init-2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-init-2 diff --git a/tests/integration/servlet-3-init-3/pom.xml b/tests/integration/servlet-3-init-3/pom.xml index a2bf7a93f1..c1219f2acf 100644 --- a/tests/integration/servlet-3-init-3/pom.xml +++ b/tests/integration/servlet-3-init-3/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-init-3 diff --git a/tests/integration/servlet-3-init-4/pom.xml b/tests/integration/servlet-3-init-4/pom.xml index 2fd26d2710..42e60071da 100644 --- a/tests/integration/servlet-3-init-4/pom.xml +++ b/tests/integration/servlet-3-init-4/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-init-4 diff --git a/tests/integration/servlet-3-init-5/pom.xml b/tests/integration/servlet-3-init-5/pom.xml index 85300bc071..1e711e8739 100644 --- a/tests/integration/servlet-3-init-5/pom.xml +++ b/tests/integration/servlet-3-init-5/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-init-5 diff --git a/tests/integration/servlet-3-init-6/pom.xml b/tests/integration/servlet-3-init-6/pom.xml index 5babdd487b..4e7758f6d8 100644 --- a/tests/integration/servlet-3-init-6/pom.xml +++ b/tests/integration/servlet-3-init-6/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-init-6 diff --git a/tests/integration/servlet-3-init-7/pom.xml b/tests/integration/servlet-3-init-7/pom.xml index 412cca7c66..1b092ea9c9 100644 --- a/tests/integration/servlet-3-init-7/pom.xml +++ b/tests/integration/servlet-3-init-7/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-init-7 diff --git a/tests/integration/servlet-3-init-8/pom.xml b/tests/integration/servlet-3-init-8/pom.xml index 0e04971ce8..b854701fe3 100644 --- a/tests/integration/servlet-3-init-8/pom.xml +++ b/tests/integration/servlet-3-init-8/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-init-8 diff --git a/tests/integration/servlet-3-init-9/pom.xml b/tests/integration/servlet-3-init-9/pom.xml index c0d4ab6a3b..48319aa1e0 100644 --- a/tests/integration/servlet-3-init-9/pom.xml +++ b/tests/integration/servlet-3-init-9/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-init-9 diff --git a/tests/integration/servlet-3-init-provider/pom.xml b/tests/integration/servlet-3-init-provider/pom.xml index 79f52f1a2a..184b69d0bb 100644 --- a/tests/integration/servlet-3-init-provider/pom.xml +++ b/tests/integration/servlet-3-init-provider/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-init-provider diff --git a/tests/integration/servlet-3-params/pom.xml b/tests/integration/servlet-3-params/pom.xml index e2079e3513..189ad608bc 100644 --- a/tests/integration/servlet-3-params/pom.xml +++ b/tests/integration/servlet-3-params/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-params diff --git a/tests/integration/servlet-3-sse-1/pom.xml b/tests/integration/servlet-3-sse-1/pom.xml index 88e2867fed..2ba4a49264 100644 --- a/tests/integration/servlet-3-sse-1/pom.xml +++ b/tests/integration/servlet-3-sse-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-3-sse-1 diff --git a/tests/integration/servlet-4.0-mvc-1/pom.xml b/tests/integration/servlet-4.0-mvc-1/pom.xml index a58771e784..23106f2795 100644 --- a/tests/integration/servlet-4.0-mvc-1/pom.xml +++ b/tests/integration/servlet-4.0-mvc-1/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-4.0-mvc-1 diff --git a/tests/integration/servlet-request-wrapper-binding-2/pom.xml b/tests/integration/servlet-request-wrapper-binding-2/pom.xml index b48c9bb448..706d18dfd5 100644 --- a/tests/integration/servlet-request-wrapper-binding-2/pom.xml +++ b/tests/integration/servlet-request-wrapper-binding-2/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-request-wrappper-binding-2 diff --git a/tests/integration/servlet-request-wrapper-binding/pom.xml b/tests/integration/servlet-request-wrapper-binding/pom.xml index e04a5c7b7e..3f6e4be054 100644 --- a/tests/integration/servlet-request-wrapper-binding/pom.xml +++ b/tests/integration/servlet-request-wrapper-binding/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-request-wrappper-binding diff --git a/tests/integration/servlet-tests/pom.xml b/tests/integration/servlet-tests/pom.xml index ca981cabe1..a272dd0762 100644 --- a/tests/integration/servlet-tests/pom.xml +++ b/tests/integration/servlet-tests/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT servlet-tests diff --git a/tests/integration/sonar-test/pom.xml b/tests/integration/sonar-test/pom.xml index bb917594e4..83697acdf0 100644 --- a/tests/integration/sonar-test/pom.xml +++ b/tests/integration/sonar-test/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT sonar-test diff --git a/tests/integration/tracing-support/pom.xml b/tests/integration/tracing-support/pom.xml index 970268b56c..b238dd5cd8 100644 --- a/tests/integration/tracing-support/pom.xml +++ b/tests/integration/tracing-support/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.integration project - 3.0.3 + 3.1.0-SNAPSHOT tracing-support diff --git a/tests/jmockit/pom.xml b/tests/jmockit/pom.xml index b8f2b3070e..2ffaaf33f9 100644 --- a/tests/jmockit/pom.xml +++ b/tests/jmockit/pom.xml @@ -23,7 +23,7 @@ project org.glassfish.jersey.tests - 3.0.3 + 3.1.0-SNAPSHOT 4.0.0 diff --git a/tests/mem-leaks/pom.xml b/tests/mem-leaks/pom.xml index e00357cd98..0b2105b98f 100644 --- a/tests/mem-leaks/pom.xml +++ b/tests/mem-leaks/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.tests.memleaks diff --git a/tests/mem-leaks/redeployment/pom.xml b/tests/mem-leaks/redeployment/pom.xml index a58e7e7dd5..3c1cdc090d 100644 --- a/tests/mem-leaks/redeployment/pom.xml +++ b/tests/mem-leaks/redeployment/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.tests.memleaks.redeployment diff --git a/tests/mem-leaks/redeployment/redeployment-hello-world-app-ref/pom.xml b/tests/mem-leaks/redeployment/redeployment-hello-world-app-ref/pom.xml index 714115fd33..f18ee82e16 100644 --- a/tests/mem-leaks/redeployment/redeployment-hello-world-app-ref/pom.xml +++ b/tests/mem-leaks/redeployment/redeployment-hello-world-app-ref/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks.redeployment project - 3.0.3 + 3.1.0-SNAPSHOT redeployment-hello-world-app-ref @@ -132,7 +132,7 @@ org.glassfish.jersey.examples helloworld-webapp war - 3.0.3 + 3.1.0-SNAPSHOT diff --git a/tests/mem-leaks/redeployment/redeployment-leaking-test-app/pom.xml b/tests/mem-leaks/redeployment/redeployment-leaking-test-app/pom.xml index c6f87bdbf2..268f3b4b4c 100644 --- a/tests/mem-leaks/redeployment/redeployment-leaking-test-app/pom.xml +++ b/tests/mem-leaks/redeployment/redeployment-leaking-test-app/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks.redeployment project - 3.0.3 + 3.1.0-SNAPSHOT redeployment-leaking-test-app diff --git a/tests/mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml b/tests/mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml index 75f96eb370..9bffddda9e 100644 --- a/tests/mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml +++ b/tests/mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.tests.memleaks.redeployment project - 3.0.3 + 3.1.0-SNAPSHOT redeployment-no-jersey-app diff --git a/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml b/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml index 240d62fb99..cca3472a4f 100644 --- a/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml +++ b/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.tests.memleaks.redeployment project - 3.0.3 + 3.1.0-SNAPSHOT redeployment-threadlocals-app diff --git a/tests/mem-leaks/test-cases/bean-param-leak/pom.xml b/tests/mem-leaks/test-cases/bean-param-leak/pom.xml index 0fe8df9ada..930935156b 100644 --- a/tests/mem-leaks/test-cases/bean-param-leak/pom.xml +++ b/tests/mem-leaks/test-cases/bean-param-leak/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks.testcases project - 3.0.3 + 3.1.0-SNAPSHOT bean-param-leak diff --git a/tests/mem-leaks/test-cases/leaking-test-app/pom.xml b/tests/mem-leaks/test-cases/leaking-test-app/pom.xml index dec3d2db41..575c042963 100644 --- a/tests/mem-leaks/test-cases/leaking-test-app/pom.xml +++ b/tests/mem-leaks/test-cases/leaking-test-app/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks.testcases project - 3.0.3 + 3.1.0-SNAPSHOT leaking-test-app diff --git a/tests/mem-leaks/test-cases/pom.xml b/tests/mem-leaks/test-cases/pom.xml index dc5ab8b987..aa72406552 100644 --- a/tests/mem-leaks/test-cases/pom.xml +++ b/tests/mem-leaks/test-cases/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.tests.memleaks.testcases diff --git a/tests/mem-leaks/test-cases/shutdown-hook-leak-client/pom.xml b/tests/mem-leaks/test-cases/shutdown-hook-leak-client/pom.xml index 9d5aed9365..9127cf9a60 100644 --- a/tests/mem-leaks/test-cases/shutdown-hook-leak-client/pom.xml +++ b/tests/mem-leaks/test-cases/shutdown-hook-leak-client/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks.testcases project - 3.0.3 + 3.1.0-SNAPSHOT shutdown-hook-leak-client diff --git a/tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml b/tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml index 2ab92856e1..59a0db2f31 100644 --- a/tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml +++ b/tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.memleaks.testcases project - 3.0.3 + 3.1.0-SNAPSHOT shutdown-hook-leak diff --git a/tests/osgi/functional/pom.xml b/tests/osgi/functional/pom.xml index d06019cac1..141c0905ce 100644 --- a/tests/osgi/functional/pom.xml +++ b/tests/osgi/functional/pom.xml @@ -24,7 +24,7 @@ org.glassfish.jersey.tests.osgi project - 3.0.3 + 3.1.0-SNAPSHOT jersey-tests-osgi-functional diff --git a/tests/osgi/pom.xml b/tests/osgi/pom.xml index 67c37c6f6c..42b4d71ecd 100644 --- a/tests/osgi/pom.xml +++ b/tests/osgi/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.tests.osgi diff --git a/tests/performance/benchmarks/pom.xml b/tests/performance/benchmarks/pom.xml index 2058823062..cc7a454cdb 100644 --- a/tests/performance/benchmarks/pom.xml +++ b/tests/performance/benchmarks/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance project - 3.0.3 + 3.1.0-SNAPSHOT performance-test-benchmarks diff --git a/tests/performance/pom.xml b/tests/performance/pom.xml index 7e9f0391e1..c11bc84bde 100644 --- a/tests/performance/pom.xml +++ b/tests/performance/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.tests.performance diff --git a/tests/performance/runners/jersey-grizzly-runner/pom.xml b/tests/performance/runners/jersey-grizzly-runner/pom.xml index 9e46b82248..87dbaed07c 100644 --- a/tests/performance/runners/jersey-grizzly-runner/pom.xml +++ b/tests/performance/runners/jersey-grizzly-runner/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.runners project - 3.0.3 + 3.1.0-SNAPSHOT diff --git a/tests/performance/runners/pom.xml b/tests/performance/runners/pom.xml index 58709926af..7f06b93484 100644 --- a/tests/performance/runners/pom.xml +++ b/tests/performance/runners/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.tests.performance.runners diff --git a/tests/performance/test-cases/assemblies/pom.xml b/tests/performance/test-cases/assemblies/pom.xml index 14460f8520..7a4ba86817 100644 --- a/tests/performance/test-cases/assemblies/pom.xml +++ b/tests/performance/test-cases/assemblies/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT assemblies diff --git a/tests/performance/test-cases/filter-dynamic/pom.xml b/tests/performance/test-cases/filter-dynamic/pom.xml index d4fc50af35..f8bf30ec3f 100644 --- a/tests/performance/test-cases/filter-dynamic/pom.xml +++ b/tests/performance/test-cases/filter-dynamic/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT filter-dynamic diff --git a/tests/performance/test-cases/filter-global/pom.xml b/tests/performance/test-cases/filter-global/pom.xml index 44df51599c..ce5d3421d8 100644 --- a/tests/performance/test-cases/filter-global/pom.xml +++ b/tests/performance/test-cases/filter-global/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT filter-global diff --git a/tests/performance/test-cases/filter-name/pom.xml b/tests/performance/test-cases/filter-name/pom.xml index 64bec45c2f..8d5c15717f 100644 --- a/tests/performance/test-cases/filter-name/pom.xml +++ b/tests/performance/test-cases/filter-name/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT filter-name diff --git a/tests/performance/test-cases/interceptor-dynamic/pom.xml b/tests/performance/test-cases/interceptor-dynamic/pom.xml index 4c31485742..a3faedafc8 100644 --- a/tests/performance/test-cases/interceptor-dynamic/pom.xml +++ b/tests/performance/test-cases/interceptor-dynamic/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT interceptor-dynamic diff --git a/tests/performance/test-cases/interceptor-global/pom.xml b/tests/performance/test-cases/interceptor-global/pom.xml index e5836141d0..d9eadfadc5 100644 --- a/tests/performance/test-cases/interceptor-global/pom.xml +++ b/tests/performance/test-cases/interceptor-global/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT interceptor-global diff --git a/tests/performance/test-cases/interceptor-name/pom.xml b/tests/performance/test-cases/interceptor-name/pom.xml index 23a120b64c..7d8d1e21ef 100644 --- a/tests/performance/test-cases/interceptor-name/pom.xml +++ b/tests/performance/test-cases/interceptor-name/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT interceptor-name diff --git a/tests/performance/test-cases/mbw-custom-provider/pom.xml b/tests/performance/test-cases/mbw-custom-provider/pom.xml index 00999458e0..c7087ecf3f 100644 --- a/tests/performance/test-cases/mbw-custom-provider/pom.xml +++ b/tests/performance/test-cases/mbw-custom-provider/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT custom-provider diff --git a/tests/performance/test-cases/mbw-json-jackson/pom.xml b/tests/performance/test-cases/mbw-json-jackson/pom.xml index 136cfa9b6e..8751ea6ecc 100644 --- a/tests/performance/test-cases/mbw-json-jackson/pom.xml +++ b/tests/performance/test-cases/mbw-json-jackson/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT json-jackson diff --git a/tests/performance/test-cases/mbw-json-moxy/pom.xml b/tests/performance/test-cases/mbw-json-moxy/pom.xml index 6a51496215..3abe4b243a 100644 --- a/tests/performance/test-cases/mbw-json-moxy/pom.xml +++ b/tests/performance/test-cases/mbw-json-moxy/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT json-moxy diff --git a/tests/performance/test-cases/mbw-kryo/pom.xml b/tests/performance/test-cases/mbw-kryo/pom.xml index 123dabce1c..9795aacbf2 100644 --- a/tests/performance/test-cases/mbw-kryo/pom.xml +++ b/tests/performance/test-cases/mbw-kryo/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT mbw-kryo diff --git a/tests/performance/test-cases/mbw-text-plain/pom.xml b/tests/performance/test-cases/mbw-text-plain/pom.xml index ad27f896ae..cb2ca2c0dd 100644 --- a/tests/performance/test-cases/mbw-text-plain/pom.xml +++ b/tests/performance/test-cases/mbw-text-plain/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT text-plain diff --git a/tests/performance/test-cases/mbw-xml-jaxb/pom.xml b/tests/performance/test-cases/mbw-xml-jaxb/pom.xml index 3830c20b5b..9620115fb7 100644 --- a/tests/performance/test-cases/mbw-xml-jaxb/pom.xml +++ b/tests/performance/test-cases/mbw-xml-jaxb/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT xml-jaxb diff --git a/tests/performance/test-cases/mbw-xml-moxy/pom.xml b/tests/performance/test-cases/mbw-xml-moxy/pom.xml index 7528f23087..ac448b8bac 100644 --- a/tests/performance/test-cases/mbw-xml-moxy/pom.xml +++ b/tests/performance/test-cases/mbw-xml-moxy/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT xml-moxy diff --git a/tests/performance/test-cases/param-srl/pom.xml b/tests/performance/test-cases/param-srl/pom.xml index a23bfdef81..01c5e9158b 100644 --- a/tests/performance/test-cases/param-srl/pom.xml +++ b/tests/performance/test-cases/param-srl/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT param-srl diff --git a/tests/performance/test-cases/pom.xml b/tests/performance/test-cases/pom.xml index 8dc309e0cb..366cb54b44 100644 --- a/tests/performance/test-cases/pom.xml +++ b/tests/performance/test-cases/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.tests.performance.testcases diff --git a/tests/performance/test-cases/proxy-injection/pom.xml b/tests/performance/test-cases/proxy-injection/pom.xml index 1aabea1667..4897bfd08f 100644 --- a/tests/performance/test-cases/proxy-injection/pom.xml +++ b/tests/performance/test-cases/proxy-injection/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests.performance.testcases project - 3.0.3 + 3.1.0-SNAPSHOT proxy-injection diff --git a/tests/performance/tools/pom.xml b/tests/performance/tools/pom.xml index d7e0ab15ff..fa4883d878 100644 --- a/tests/performance/tools/pom.xml +++ b/tests/performance/tools/pom.xml @@ -22,7 +22,7 @@ org.glassfish.jersey.tests.performance project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.tests.performance.tools performance-test-tools diff --git a/tests/pom.xml b/tests/pom.xml index e8bfb6754e..ca0cccf3fd 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey project - 3.0.3 + 3.1.0-SNAPSHOT org.glassfish.jersey.tests diff --git a/tests/stress/pom.xml b/tests/stress/pom.xml index 53a8f51268..f1493b9153 100644 --- a/tests/stress/pom.xml +++ b/tests/stress/pom.xml @@ -23,7 +23,7 @@ org.glassfish.jersey.tests project - 3.0.3 + 3.1.0-SNAPSHOT stress From 84684050b491dba8ba6f2f2f7cbb48e06f19889d Mon Sep 17 00:00:00 2001 From: Maxim Nesen Date: Fri, 4 Feb 2022 15:26:27 +0100 Subject: [PATCH 04/20] Aftermerge adjustments Signed-off-by: Maxim Nesen --- connectors/grizzly-connector/pom.xml | 2 +- .../glassfish/jersey/netty/connector/NettyConnector.java | 2 +- .../org/glassfish/jersey/AbstractFeatureConfigurator.java | 2 +- .../jersey/internal/DynamicFeatureConfigurator.java | 2 +- .../glassfish/jersey/internal/FeatureConfigurator.java | 2 +- core-server/pom.xml | 5 ----- .../java/org/glassfish/jersey/server/ServerRuntime.java | 2 +- .../internal/CdiInterceptorWrapperExtension.java | 2 +- ext/entity-filtering/pom.xml | 8 +------- ext/microprofile/mp-config/pom.xml | 2 +- ext/wadl-doclet/pom.xml | 6 +----- .../jersey/inject/weld/internal/bean/BeanHelper.java | 2 +- .../inject/weld/internal/managed/CdiInjectionManager.java | 2 +- .../inject/weld/internal/scope/RequestScopeBean.java | 2 +- incubator/declarative-linking/pom.xml | 7 +------ .../jersey/inject/cdi/se/CdiSeInjectionManager.java | 2 +- test-framework/core/pom.xml | 7 +------ tests/osgi/functional/pom.xml | 7 +------ 18 files changed, 17 insertions(+), 47 deletions(-) diff --git a/connectors/grizzly-connector/pom.xml b/connectors/grizzly-connector/pom.xml index 73e5348649..a9327a5488 100644 --- a/connectors/grizzly-connector/pom.xml +++ b/connectors/grizzly-connector/pom.xml @@ -1,7 +1,7 @@ @@ -163,6 +162,7 @@ jersey-2878 jersey-2892 jersey-3796 + jersey-4949 property-check security-digest servlet-2.5-autodiscovery-1 From a83c7cd008fc22dd8b18ecce5f30636e3a578813 Mon Sep 17 00:00:00 2001 From: jansupol Date: Sun, 19 Sep 2021 10:00:56 +0200 Subject: [PATCH 06/20] Support for @ApplicationPath in SE Signed-off-by: jansupol --- .../httpserver/GrizzlyHttpServerFactory.java | 4 +- .../jersey/jdkhttp/JdkHttpServerFactory.java | 12 ++- .../netty/httpserver/JerseyServerHandler.java | 20 ++++- .../httpserver/JerseyServerInitializer.java | 14 ++- .../jersey/server/ResourceConfig.java | 29 +++++++ .../examples/cdi/resources/MyApplication.java | 4 +- .../java8/DefaultMethodResourceTest.java | 6 +- .../examples/java8/LambdaResourceTest.java | 4 +- .../ManagedClientSimpleTest.java | 4 +- .../jaxrs/JaxrsItemStoreResourceTest.java | 6 +- .../jersey/JerseyItemStoreResourceTest.java | 7 +- .../e2e/container/ApplicationPathTest.java | 87 +++++++++++++++++++ .../ResourceConfigApplicationPathTest.java | 36 ++++++++ .../tests/cdi/resources/MyApplication.java | 4 +- .../tests/cdi/resources/MainApplication.java | 4 +- .../cdi/resources/SecondaryApplication.java | 11 +-- .../tests/cdi/resources/MainApplication.java | 4 +- 17 files changed, 210 insertions(+), 46 deletions(-) create mode 100644 tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/container/ApplicationPathTest.java create mode 100644 tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/container/ResourceConfigApplicationPathTest.java diff --git a/containers/grizzly2-http/src/main/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpServerFactory.java b/containers/grizzly2-http/src/main/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpServerFactory.java index 3a3da702c0..c142b566b8 100644 --- a/containers/grizzly2-http/src/main/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpServerFactory.java +++ b/containers/grizzly2-http/src/main/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpServerFactory.java @@ -252,7 +252,9 @@ public static HttpServer createHttpServer(final URI uri, // Map the path to the processor. final ServerConfiguration config = server.getServerConfiguration(); if (handler != null) { - final String path = uri.getPath().replaceAll("/{2,}", "/"); + final String appPath = handler.getApplicationHandler().getConfiguration().getApplicationPath(); + final String uriPath = appPath == null ? uri.getPath() : uri.getPath() + "/" + appPath; + final String path = uriPath.replaceAll("/{2,}", "/"); final String contextPath = path.endsWith("/") ? path.substring(0, path.length() - 1) : path; config.addHttpHandler(handler, HttpHandlerRegistration.bulder().contextPath(contextPath).build()); diff --git a/containers/jdk-http/src/main/java/org/glassfish/jersey/jdkhttp/JdkHttpServerFactory.java b/containers/jdk-http/src/main/java/org/glassfish/jersey/jdkhttp/JdkHttpServerFactory.java index ff498fe861..872aabdf24 100644 --- a/containers/jdk-http/src/main/java/org/glassfish/jersey/jdkhttp/JdkHttpServerFactory.java +++ b/containers/jdk-http/src/main/java/org/glassfish/jersey/jdkhttp/JdkHttpServerFactory.java @@ -210,15 +210,19 @@ private static HttpServer createHttpServer(final URI uri, throw new IllegalArgumentException(LocalizationMessages.ERROR_CONTAINER_URI_SCHEME_UNKNOWN(uri)); } - final String path = uri.getPath(); - if (path == null) { + final String _path = uri.getPath(); + if (_path == null) { throw new IllegalArgumentException(LocalizationMessages.ERROR_CONTAINER_URI_PATH_NULL(uri)); - } else if (path.isEmpty()) { + } else if (_path.isEmpty()) { throw new IllegalArgumentException(LocalizationMessages.ERROR_CONTAINER_URI_PATH_EMPTY(uri)); - } else if (path.charAt(0) != '/') { + } else if (_path.charAt(0) != '/') { throw new IllegalArgumentException(LocalizationMessages.ERROR_CONTAINER_URI_PATH_START(uri)); } + final String appPath = handler.getApplicationHandler().getConfiguration().getApplicationPath(); + final String uriPath = appPath == null ? _path : _path + "/" + appPath; + final String path = uriPath.replaceAll("/{2,}", "/"); + final int port = (uri.getPort() == -1) ? (isHttp ? Container.DEFAULT_HTTP_PORT : Container.DEFAULT_HTTPS_PORT) : uri.getPort(); diff --git a/containers/netty-http/src/main/java/org/glassfish/jersey/netty/httpserver/JerseyServerHandler.java b/containers/netty-http/src/main/java/org/glassfish/jersey/netty/httpserver/JerseyServerHandler.java index 3207c93a0c..dbe8dc784c 100644 --- a/containers/netty-http/src/main/java/org/glassfish/jersey/netty/httpserver/JerseyServerHandler.java +++ b/containers/netty-http/src/main/java/org/glassfish/jersey/netty/httpserver/JerseyServerHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2021 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 @@ -51,6 +51,7 @@ class JerseyServerHandler extends ChannelInboundHandlerAdapter { private final URI baseUri; + private final String applicationPath; private final NettyInputStream nettyInputStream = new NettyInputStream(); private final NettyHttpContainer container; private final ResourceConfig resourceConfig; @@ -65,9 +66,20 @@ class JerseyServerHandler extends ChannelInboundHandlerAdapter { * @param container Netty container implementation. */ public JerseyServerHandler(URI baseUri, NettyHttpContainer container, ResourceConfig resourceConfig) { + this(baseUri, null, container, resourceConfig); + } + + /** + * Constructor. + * + * @param baseUri base {@link URI} of the container (includes context path, if any). + * @param container Netty container implementation. + */ + public JerseyServerHandler(URI baseUri, String applicationPath, NettyHttpContainer container, ResourceConfig resourceConfig) { this.baseUri = baseUri; this.container = container; this.resourceConfig = resourceConfig; + this.applicationPath = applicationPath; } @Override @@ -145,7 +157,11 @@ public void run() { private ContainerRequest createContainerRequest(ChannelHandlerContext ctx, HttpRequest req) { String s = req.uri().startsWith("/") ? req.uri().substring(1) : req.uri(); - URI requestUri = URI.create(baseUri + ContainerUtils.encodeUnsafeCharacters(s)); + final String baseUriStr = baseUri.toString(); + final String base = applicationPath == null || applicationPath.isEmpty() + ? baseUriStr + : baseUriStr.substring(0, baseUriStr.length() - applicationPath.length() - 1); + final URI requestUri = URI.create(base + ContainerUtils.encodeUnsafeCharacters(s)); ContainerRequest requestContext = new ContainerRequest( baseUri, requestUri, req.method().name(), getSecurityContext(ctx), diff --git a/containers/netty-http/src/main/java/org/glassfish/jersey/netty/httpserver/JerseyServerInitializer.java b/containers/netty-http/src/main/java/org/glassfish/jersey/netty/httpserver/JerseyServerInitializer.java index d492449c56..b6d73fd584 100644 --- a/containers/netty-http/src/main/java/org/glassfish/jersey/netty/httpserver/JerseyServerInitializer.java +++ b/containers/netty-http/src/main/java/org/glassfish/jersey/netty/httpserver/JerseyServerInitializer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2021 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 @@ -44,6 +44,7 @@ class JerseyServerInitializer extends ChannelInitializer { private final URI baseUri; + private final String applicationPath; private final SslContext sslCtx; private final NettyHttpContainer container; private final boolean http2; @@ -72,7 +73,14 @@ public JerseyServerInitializer(URI baseUri, SslContext sslCtx, NettyHttpContaine */ public JerseyServerInitializer(URI baseUri, SslContext sslCtx, NettyHttpContainer container, ResourceConfig resourceConfig, boolean http2) { - this.baseUri = baseUri; + applicationPath = container.getApplicationHandler().getConfiguration().getApplicationPath(); + final String uriPath = applicationPath == null + ? baseUri.toString() + : baseUri.toString() + "/" + applicationPath + "/"; + final int doubleSlash = uriPath.indexOf("/") + 2; + final String path = uriPath.substring(0, doubleSlash) + uriPath.substring(doubleSlash).replaceAll("/{2,}", "/"); + + this.baseUri = URI.create(path); this.sslCtx = sslCtx; this.container = container; this.resourceConfig = resourceConfig; @@ -96,7 +104,7 @@ public void initChannel(SocketChannel ch) { } p.addLast(new HttpServerCodec()); p.addLast(new ChunkedWriteHandler()); - p.addLast(new JerseyServerHandler(baseUri, container, resourceConfig)); + p.addLast(new JerseyServerHandler(baseUri, applicationPath, container, resourceConfig)); } } diff --git a/core-server/src/main/java/org/glassfish/jersey/server/ResourceConfig.java b/core-server/src/main/java/org/glassfish/jersey/server/ResourceConfig.java index 92240f4eac..291b76fb5d 100644 --- a/core-server/src/main/java/org/glassfish/jersey/server/ResourceConfig.java +++ b/core-server/src/main/java/org/glassfish/jersey/server/ResourceConfig.java @@ -25,11 +25,13 @@ import java.util.HashSet; import java.util.IdentityHashMap; import java.util.Map; +import java.util.Optional; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; import java.util.stream.Collectors; +import jakarta.ws.rs.ApplicationPath; import jakarta.ws.rs.Path; import jakarta.ws.rs.RuntimeType; import jakarta.ws.rs.core.Application; @@ -57,6 +59,7 @@ import org.glassfish.jersey.server.internal.scanning.FilesScanner; import org.glassfish.jersey.server.internal.scanning.PackageNamesScanner; import org.glassfish.jersey.server.model.Resource; +import org.glassfish.jersey.uri.UriComponent; /** @@ -997,6 +1000,32 @@ public final Application getApplication() { return _getApplication(); } + /** + * Returns encoded value of {@link ApplicationPath} annotation of the Application corresponding + * with this ResourceConfig or {@code null} when the annotation is not present. + * + * @return Returns encoded value of {@link ApplicationPath} annotation of the Application + * corresponding with this ResourceConfig. + */ + public final String getApplicationPath() { + final Application application; + if (ResourceConfig.class.isInstance(_getApplication())) { + final Application unwrap = unwrapCustomRootApplication((ResourceConfig) _getApplication()); + application = unwrap != null ? unwrap : _getApplication(); + } else { + application = _getApplication(); + } + final ApplicationPath appPath = application.getClass().getAnnotation(ApplicationPath.class); + final String value; + if (appPath != null && !appPath.value().isEmpty() && !appPath.value().trim().equals("/")) { + final String val = appPath.value().trim(); + value = UriComponent.encode(val.startsWith("/") ? val.substring(1) : val, UriComponent.Type.PATH); + } else { + value = null; + } + return value; + } + /** * Allows overriding the {@link #getApplication()} method functionality in {@link WrappingResourceConfig}. * diff --git a/examples/cdi-webapp/src/main/java/org/glassfish/jersey/examples/cdi/resources/MyApplication.java b/examples/cdi-webapp/src/main/java/org/glassfish/jersey/examples/cdi/resources/MyApplication.java index a8c089e586..d5921a5949 100644 --- a/examples/cdi-webapp/src/main/java/org/glassfish/jersey/examples/cdi/resources/MyApplication.java +++ b/examples/cdi-webapp/src/main/java/org/glassfish/jersey/examples/cdi/resources/MyApplication.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -13,7 +13,6 @@ import java.util.HashSet; import java.util.Set; -import jakarta.ws.rs.ApplicationPath; import jakarta.ws.rs.core.Application; /** @@ -21,7 +20,6 @@ * * @author Jonathan Benoit */ -@ApplicationPath("/*") public class MyApplication extends Application { @Override public Set> getClasses() { diff --git a/examples/java8-webapp/src/test/java/org/glassfish/jersey/examples/java8/DefaultMethodResourceTest.java b/examples/java8-webapp/src/test/java/org/glassfish/jersey/examples/java8/DefaultMethodResourceTest.java index 66d545f81e..fb0b1fef0f 100644 --- a/examples/java8-webapp/src/test/java/org/glassfish/jersey/examples/java8/DefaultMethodResourceTest.java +++ b/examples/java8-webapp/src/test/java/org/glassfish/jersey/examples/java8/DefaultMethodResourceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -35,7 +35,7 @@ protected Application configure() { */ @Test public void testDefaultMethods() { - final WebTarget defaultMethodTarget = target("default-method"); + final WebTarget defaultMethodTarget = target("j8").path("default-method"); // test default method with no @Path annotation String response = defaultMethodTarget.request().get(String.class); @@ -51,7 +51,7 @@ public void testDefaultMethods() { */ @Test public void testImplementingClass() throws Exception { - final String response = target("default-method").path("class").request().get(String.class); + final String response = target("j8").path("default-method").path("class").request().get(String.class); assertEquals("class", response); } } diff --git a/examples/java8-webapp/src/test/java/org/glassfish/jersey/examples/java8/LambdaResourceTest.java b/examples/java8-webapp/src/test/java/org/glassfish/jersey/examples/java8/LambdaResourceTest.java index fddf375efe..5c04e06d1c 100644 --- a/examples/java8-webapp/src/test/java/org/glassfish/jersey/examples/java8/LambdaResourceTest.java +++ b/examples/java8-webapp/src/test/java/org/glassfish/jersey/examples/java8/LambdaResourceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -36,7 +36,7 @@ protected Application configure() { */ @Test public void testLambdas() { - final WebTarget target = target("lambdas/{p}"); + final WebTarget target = target("j8").path("lambdas/{p}"); // test default method with no @Path annotation String response = target.resolveTemplate("p", "test").request().get(String.class); diff --git a/examples/managed-client-simple-webapp/src/test/java/org/glassfish/jersey/examples/managedclientsimple/ManagedClientSimpleTest.java b/examples/managed-client-simple-webapp/src/test/java/org/glassfish/jersey/examples/managedclientsimple/ManagedClientSimpleTest.java index 7239f9be4c..99dad4b122 100644 --- a/examples/managed-client-simple-webapp/src/test/java/org/glassfish/jersey/examples/managedclientsimple/ManagedClientSimpleTest.java +++ b/examples/managed-client-simple-webapp/src/test/java/org/glassfish/jersey/examples/managedclientsimple/ManagedClientSimpleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -45,7 +45,7 @@ protected URI getBaseUri() { @Test public void testManagedClientSimple() throws Exception { - final WebTarget resource = target().path("client"); + final WebTarget resource = target("app").path("client"); Response response; response = resource.path("animals").request(MediaType.TEXT_PLAIN).get(); diff --git a/examples/sse-item-store-jaxrs-webapp/src/test/java/org/glassfish/jersey/examples/sseitemstore/jaxrs/JaxrsItemStoreResourceTest.java b/examples/sse-item-store-jaxrs-webapp/src/test/java/org/glassfish/jersey/examples/sseitemstore/jaxrs/JaxrsItemStoreResourceTest.java index 6ee42d6385..cdabad0c40 100644 --- a/examples/sse-item-store-jaxrs-webapp/src/test/java/org/glassfish/jersey/examples/sseitemstore/jaxrs/JaxrsItemStoreResourceTest.java +++ b/examples/sse-item-store-jaxrs-webapp/src/test/java/org/glassfish/jersey/examples/sseitemstore/jaxrs/JaxrsItemStoreResourceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -125,7 +125,7 @@ protected URI getBaseUri() { @Test public void testItemsStore() throws Exception { final List items = Collections.unmodifiableList(Arrays.asList("foo", "bar", "baz")); - final WebTarget itemsTarget = target("items"); + final WebTarget itemsTarget = target("resources").path("items"); final CountDownLatch latch = new CountDownLatch(items.size() * MAX_LISTENERS * 2); // countdown on all events final List> indexQueues = new ArrayList<>(MAX_LISTENERS); final SseEventSource[] sources = new SseEventSource[MAX_LISTENERS]; @@ -193,7 +193,7 @@ public void testItemsStore() throws Exception { */ @Test public void testEventSourceReconnect() throws Exception { - final WebTarget itemsTarget = target("items"); + final WebTarget itemsTarget = target("resources").path("items"); final CountDownLatch latch = new CountDownLatch(MAX_ITEMS * MAX_LISTENERS * 2); // countdown only on new item events final List> receivedQueues = new ArrayList<>(MAX_LISTENERS); final SseEventSource[] sources = new SseEventSource[MAX_LISTENERS]; diff --git a/examples/sse-item-store-jersey-webapp/src/test/java/org/glassfish/jersey/examples/sseitemstore/jersey/JerseyItemStoreResourceTest.java b/examples/sse-item-store-jersey-webapp/src/test/java/org/glassfish/jersey/examples/sseitemstore/jersey/JerseyItemStoreResourceTest.java index a03597cc90..f59b43818f 100644 --- a/examples/sse-item-store-jersey-webapp/src/test/java/org/glassfish/jersey/examples/sseitemstore/jersey/JerseyItemStoreResourceTest.java +++ b/examples/sse-item-store-jersey-webapp/src/test/java/org/glassfish/jersey/examples/sseitemstore/jersey/JerseyItemStoreResourceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -101,7 +101,7 @@ public void testItemsStore() throws Exception { "foo", "bar", "baz")); - final WebTarget itemsTarget = target("items"); + final WebTarget itemsTarget = target("resources").path("items"); final CountDownLatch latch = new CountDownLatch(items.size() * MAX_LISTENERS * 2); // countdown on all events final List> indexQueues = new ArrayList<>(MAX_LISTENERS); final EventSource[] sources = new EventSource[MAX_LISTENERS]; @@ -174,9 +174,8 @@ public void testItemsStore() throws Exception { * @throws Exception in case of a test failure. */ @Test - @Ignore //TODO - remove after jacartification public void testEventSourceReconnect() throws Exception { - final WebTarget itemsTarget = target("items"); + final WebTarget itemsTarget = target("resources").path("items"); final CountDownLatch latch = new CountDownLatch(MAX_ITEMS * MAX_LISTENERS * 2); // countdown only on new item events final List> receivedQueues = new ArrayList<>(MAX_LISTENERS); final EventSource[] sources = new EventSource[MAX_LISTENERS]; diff --git a/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/container/ApplicationPathTest.java b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/container/ApplicationPathTest.java new file mode 100644 index 0000000000..62395516ee --- /dev/null +++ b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/container/ApplicationPathTest.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2021 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.e2e.container; + +import jakarta.ws.rs.ApplicationPath; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.Response; +import org.glassfish.jersey.test.grizzly.GrizzlyTestContainerFactory; +import org.glassfish.jersey.test.jdkhttp.JdkHttpServerTestContainerFactory; +import org.glassfish.jersey.test.netty.NettyTestContainerFactory; +import org.glassfish.jersey.test.spi.TestContainerFactory; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +@RunWith(Parameterized.class) +public class ApplicationPathTest extends JerseyContainerTest { + + + private static final List FACTORIES = listContainerFactories( + new GrizzlyTestContainerFactory(), + new JdkHttpServerTestContainerFactory(), + new NettyTestContainerFactory() + ); + + @Parameterized.Parameters(name = "{0}") + public static Collection parameters() throws Exception { + return FACTORIES.stream().map(input -> new TestContainerFactory[]{input}).collect(Collectors.toList()); + } + + @ApplicationPath("applicationpath") + public static class ApplicationPathTestApplication extends Application { + @Override + public Set> getClasses() { + return Collections.singleton(ApplicationPathResourceTest.class); + } + } + + @Path("/resource") + public static class ApplicationPathResourceTest { + @GET + public String hello() { + return "HelloWorld!"; + } + } + + @Override + protected Application configure() { + return new ApplicationPathTestApplication(); + } + + @Test + public void testApplicationPath() { + try (Response response = target("applicationpath").path("resource").request().get()) { + Assert.assertEquals(200, response.getStatus()); + Assert.assertEquals(new ApplicationPathResourceTest().hello(), response.readEntity(String.class)); + } + + try (Response response = target("").path("resource").request().get()) { + Assert.assertEquals(404, response.getStatus()); + } + } + +} diff --git a/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/container/ResourceConfigApplicationPathTest.java b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/container/ResourceConfigApplicationPathTest.java new file mode 100644 index 0000000000..9ad95a7b33 --- /dev/null +++ b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/container/ResourceConfigApplicationPathTest.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2021 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.e2e.container; + +import jakarta.ws.rs.ApplicationPath; +import jakarta.ws.rs.core.Application; +import org.glassfish.jersey.server.ResourceConfig; + +public class ResourceConfigApplicationPathTest extends ApplicationPathTest { + @Override + protected Application configure() { + + return new ResourceConfigApplicationPathTestResourceConfig() + .register(super.configure().getClasses().iterator().next()); + } + + @ApplicationPath("/applicationpath") + public static class ResourceConfigApplicationPathTestResourceConfig extends ResourceConfig { + + } + +} diff --git a/tests/integration/cdi-integration/cdi-log-check/src/main/java/org/glassfish/jersey/tests/cdi/resources/MyApplication.java b/tests/integration/cdi-integration/cdi-log-check/src/main/java/org/glassfish/jersey/tests/cdi/resources/MyApplication.java index 7cd3b13b07..eef274d94b 100644 --- a/tests/integration/cdi-integration/cdi-log-check/src/main/java/org/glassfish/jersey/tests/cdi/resources/MyApplication.java +++ b/tests/integration/cdi-integration/cdi-log-check/src/main/java/org/glassfish/jersey/tests/cdi/resources/MyApplication.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2021 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 @@ -18,14 +18,12 @@ import org.glassfish.jersey.server.ServerProperties; -import jakarta.ws.rs.ApplicationPath; import jakarta.ws.rs.core.Application; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; -@ApplicationPath("/*") public class MyApplication extends Application { @Override diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/MainApplication.java b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/MainApplication.java index 00005af0db..deff0799e1 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/MainApplication.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/MainApplication.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019 Payara Foundation and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -30,7 +30,6 @@ import jakarta.inject.Inject; -import jakarta.ws.rs.ApplicationPath; import jakarta.ws.rs.core.Application; /** @@ -39,7 +38,6 @@ * @author Jonathan Benoit * @author Patrik Dudits */ -@ApplicationPath("main") @ApplicationScoped public class MainApplication extends Application { diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/SecondaryApplication.java b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/SecondaryApplication.java index fd4b0d561b..c5161eec22 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/SecondaryApplication.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/SecondaryApplication.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2021 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 @@ -18,15 +18,7 @@ import java.util.HashSet; import java.util.Set; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.logging.Logger; - -import jakarta.annotation.PostConstruct; -import jakarta.annotation.PreDestroy; import jakarta.enterprise.context.ApplicationScoped; -import jakarta.enterprise.inject.spi.BeanManager; -import jakarta.inject.Inject; -import jakarta.ws.rs.ApplicationPath; import jakarta.ws.rs.core.Application; /** @@ -37,7 +29,6 @@ * * @author Jakub Podlesak */ -@ApplicationPath("secondary") @ApplicationScoped public class SecondaryApplication extends Application { diff --git a/tests/integration/jersey-3992/src/main/java/org/glassfish/jersey/tests/cdi/resources/MainApplication.java b/tests/integration/jersey-3992/src/main/java/org/glassfish/jersey/tests/cdi/resources/MainApplication.java index 4bfed39515..0a8563cb26 100644 --- a/tests/integration/jersey-3992/src/main/java/org/glassfish/jersey/tests/cdi/resources/MainApplication.java +++ b/tests/integration/jersey-3992/src/main/java/org/glassfish/jersey/tests/cdi/resources/MainApplication.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -30,7 +30,6 @@ import jakarta.inject.Inject; -import jakarta.ws.rs.ApplicationPath; import jakarta.ws.rs.core.Application; /** @@ -38,7 +37,6 @@ * * @author Jonathan Benoit */ -@ApplicationPath("main") @ApplicationScoped public class MainApplication extends Application { From 5eb046235491fbdefdea2d4aa6ba195ad2b26379 Mon Sep 17 00:00:00 2001 From: jansupol <15908245+jansupol@users.noreply.github.com> Date: Thu, 7 Oct 2021 15:58:25 +0200 Subject: [PATCH 07/20] Change of default behaviour of UNWRAP_COMPLETION_STAGE_IN_WRITER_ENABLE (#4885) Signed-off-by: jansupol --- .../jersey/server/ServerProperties.java | 2 +- .../server/model/ResourceMethodInvoker.java | 2 +- docs/src/main/docbook/appendix-properties.xml | 13 ++++++- docs/src/main/docbook/jersey.ent | 1 + docs/src/main/docbook/migration.xml | 36 ++++++++++++++++--- 5 files changed, 47 insertions(+), 7 deletions(-) diff --git a/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java b/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java index 6ff719dff3..02cf9b2d8a 100644 --- a/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java +++ b/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java @@ -730,7 +730,7 @@ public final class ServerProperties { * The {@code CompletionStage} value will be unwrapped and the message body writer will be invoked with the unwrapped type. * *

- * The default value is {@code false}. + * The default value is {@code true}. *

*

* The name of the configuration property is {@value}. diff --git a/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodInvoker.java b/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodInvoker.java index 4b5b882e85..94599f2450 100644 --- a/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodInvoker.java +++ b/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodInvoker.java @@ -486,7 +486,7 @@ private Response invoke(final RequestProcessingContext context, final Object res private Type unwrapInvocableResponseType(ContainerRequest request) { if (isCompletionStageResponseType - && request.resolveProperty(ServerProperties.UNWRAP_COMPLETION_STAGE_IN_WRITER_ENABLE, Boolean.FALSE)) { + && request.resolveProperty(ServerProperties.UNWRAP_COMPLETION_STAGE_IN_WRITER_ENABLE, Boolean.TRUE)) { return completionStageResponseType; } return invocableResponseType; diff --git a/docs/src/main/docbook/appendix-properties.xml b/docs/src/main/docbook/appendix-properties.xml index 17e5a241b7..0e33a385c9 100644 --- a/docs/src/main/docbook/appendix-properties.xml +++ b/docs/src/main/docbook/appendix-properties.xml @@ -1,7 +1,7 @@ jakarta.xml.bind @@ -142,27 +142,49 @@ - org.jvnet.jaxb2.maven2 - maven-jaxb2-plugin - 0.14.0 + org.codehaus.mojo + jaxb2-maven-plugin + 2.5.0 - generate-sources + xjc - generate + xjc - org.glassfish.jersey.examples.extendedwadl - src/main/xsd - - - + + src/main/xsd + + org.glassfish.jersey.examples.extendedwadl true false true + + + org.glassfish.jaxb + jaxb-xjc + ${jaxb.ri.version} + + + jakarta.activation + jakarta.activation-api + ${jakarta.activation.version} + + + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta.jaxb.api.version} + + + com.sun.xml.bind + jaxb-impl + ${jaxb.ri.version} + + + false - -output ${project.build.outputDirectory}/resourcedoc.xml + + -output ${project.build.outputDirectory}/resourcedoc.xml + + none diff --git a/examples/oauth-client-twitter/pom.xml b/examples/oauth-client-twitter/pom.xml index ea853a051a..eb1f91516b 100644 --- a/examples/oauth-client-twitter/pom.xml +++ b/examples/oauth-client-twitter/pom.xml @@ -15,7 +15,7 @@ project org.glassfish.jersey.examples - 3.0.0-SNAPSHOT + 3.1.0-SNAPSHOT 4.0.0 diff --git a/examples/osgi-helloworld-webapp/war-bundle/pom.xml b/examples/osgi-helloworld-webapp/war-bundle/pom.xml index bd56fa3bfd..5eee2cb8cb 100644 --- a/examples/osgi-helloworld-webapp/war-bundle/pom.xml +++ b/examples/osgi-helloworld-webapp/war-bundle/pom.xml @@ -55,9 +55,9 @@ provided - javax.servlet - servlet-api - 2.5 + jakarta.servlet + jakarta.servlet-api + ${servlet5.version} provided diff --git a/examples/osgi-helloworld-webapp/war-bundle/src/main/java/org/glassfish/jersey/examples/osgi/helloworld/WebAppContextListener.java b/examples/osgi-helloworld-webapp/war-bundle/src/main/java/org/glassfish/jersey/examples/osgi/helloworld/WebAppContextListener.java index 03a0fb8845..0b19575448 100644 --- a/examples/osgi-helloworld-webapp/war-bundle/src/main/java/org/glassfish/jersey/examples/osgi/helloworld/WebAppContextListener.java +++ b/examples/osgi-helloworld-webapp/war-bundle/src/main/java/org/glassfish/jersey/examples/osgi/helloworld/WebAppContextListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at diff --git a/examples/osgi-http-service/bundle/pom.xml b/examples/osgi-http-service/bundle/pom.xml index da126a1e4c..912c4e57ab 100644 --- a/examples/osgi-http-service/bundle/pom.xml +++ b/examples/osgi-http-service/bundle/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples osgi-http-service - 3.0.0-SNAPSHOT + 3.1.0-SNAPSHOT org.glassfish.jersey.examples.osgi-http-service @@ -33,6 +33,11 @@ jakarta.ws.rs jakarta.ws.rs-api + + jakarta.servlet + jakarta.servlet-api + ${servlet5.version} + org.glassfish.jersey.containers jersey-container-servlet-core @@ -44,7 +49,7 @@ org.apache.felix org.apache.felix.http.bundle - 2.2.0 + 3.0.0 org.apache.felix @@ -67,7 +72,7 @@ org.glassfish.jersey.examples.osgihttpservice - javax.servlet.*;version="[2.4,5.0)",* + jakarta.servlet.*;version="[5.0,6.0)",* org.glassfish.jersey.examples.osgihttpservice.Activator jersey-osgi-http-service-bundle ${project.version} diff --git a/examples/osgi-http-service/functional-test/pom.xml b/examples/osgi-http-service/functional-test/pom.xml index 42d25ccf3c..7cd10af570 100644 --- a/examples/osgi-http-service/functional-test/pom.xml +++ b/examples/osgi-http-service/functional-test/pom.xml @@ -18,7 +18,7 @@ org.glassfish.jersey.examples osgi-http-service - 3.0.0-SNAPSHOT + 3.1.0-SNAPSHOT org.glassfish.jersey.examples.osgi-http-service diff --git a/examples/osgi-http-service/pom.xml b/examples/osgi-http-service/pom.xml index bd78d4f57e..96c8cf3f53 100644 --- a/examples/osgi-http-service/pom.xml +++ b/examples/osgi-http-service/pom.xml @@ -28,8 +28,8 @@ OSGi HttpService example - - + bundle + functional-test diff --git a/examples/pom.xml b/examples/pom.xml index 6fa1b983fd..9dc7ab1598 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -54,8 +54,8 @@ assemblies - - + bookmark + bookmark-em bookstore-webapp cdi-webapp clipboard @@ -64,7 +64,7 @@ entity-filtering entity-filtering-selectable entity-filtering-security - + extended-wadl-webapp exception-mapping freemarker-webapp @@ -101,11 +101,11 @@ multipart-webapp open-tracing - - - + osgi-helloworld-webapp + + oauth-client-twitter - + reload rx-client-webapp server-async server-async-managed diff --git a/pom.xml b/pom.xml index b28d246ab6..26aa611c56 100644 --- a/pom.xml +++ b/pom.xml @@ -2158,7 +2158,7 @@ 5.0.0 4.0.0 2.0.0 - 2.0.0 + 2.0.1 4.0.0 4.0.0 jakarta.annotation.*;version="[2.0,3)" @@ -2167,8 +2167,8 @@ 2.0.0 3.0.0 3.0.0 - 3.0.0 - 3.0.0 + 3.0.1 + 3.0.2 3.0 3.0.0 11.0.0 From 87beb018054115f5aabebc6a3b30b2d3471d1f2d Mon Sep 17 00:00:00 2001 From: jansupol Date: Thu, 7 Oct 2021 21:53:26 +0200 Subject: [PATCH 09/20] Enable MP RestClient Signed-off-by: jansupol --- ext/microprofile/mp-rest-client/pom.xml | 4 +- .../restclient/RestClientProducer.java | 34 ++++- .../restclient/VersionSupport.java | 109 ---------------- .../internal/localization.properties | 4 - ext/microprofile/pom.xml | 4 +- tests/integration/microprofile/pom.xml | 3 +- .../microprofile/rest-client/pom.xml | 16 ++- .../InboundHeadersProviderTest.java | 6 +- .../microprofile/rest-client/tck-suite.xml | 26 ++-- .../rest-client14-compatibility/pom.xml | 115 ----------------- .../compatibility/Compatibility14Test.java | 119 ------------------ .../src/test/resources/META-INF/beans.xml | 25 ---- .../META-INF/microprofile-config.properties | 19 --- 13 files changed, 63 insertions(+), 421 deletions(-) delete mode 100644 ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/VersionSupport.java delete mode 100644 tests/integration/microprofile/rest-client14-compatibility/pom.xml delete mode 100644 tests/integration/microprofile/rest-client14-compatibility/src/test/java/org/glassfish/jersey/tests/restclient/compatibility/Compatibility14Test.java delete mode 100644 tests/integration/microprofile/rest-client14-compatibility/src/test/resources/META-INF/beans.xml delete mode 100644 tests/integration/microprofile/rest-client14-compatibility/src/test/resources/META-INF/microprofile-config.properties diff --git a/ext/microprofile/mp-rest-client/pom.xml b/ext/microprofile/mp-rest-client/pom.xml index 02c29396f3..bf65b5ab26 100644 --- a/ext/microprofile/mp-rest-client/pom.xml +++ b/ext/microprofile/mp-rest-client/pom.xml @@ -22,7 +22,7 @@ project org.glassfish.jersey.ext.microprofile - 3.0.0-SNAPSHOT + 3.1.0-SNAPSHOT 4.0.0 @@ -32,7 +32,7 @@ org.eclipse.microprofile.rest.client microprofile-rest-client-api - 2.0 + 3.0-RC3 org.eclipse.microprofile.config diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientProducer.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientProducer.java index 8a5fe0de92..48bc397b18 100644 --- a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientProducer.java +++ b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientProducer.java @@ -58,6 +58,7 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; import org.eclipse.microprofile.rest.client.inject.RestClient; import org.glassfish.jersey.internal.util.ReflectionHelper; +import org.glassfish.jersey.microprofile.restclient.internal.LocalizationMessages; /** * Handles proper rest client injection. @@ -138,11 +139,11 @@ public Object create(CreationalContext creationalContext) { getConfigOption(Long.class, CONFIG_READ_TIMEOUT) .ifPresent(aLong -> restClientBuilder.readTimeout(aLong, TimeUnit.MILLISECONDS)); getConfigOption(Boolean.class, CONFIG_FOLLOW_REDIRECTS) - .ifPresent(follow -> VersionSupport.followRedirects(restClientBuilder, follow)); + .ifPresent(follow -> _followRedirects(restClientBuilder, follow)); getConfigOption(String.class, CONFIG_QUERY_PARAM_STYLE) - .ifPresent(value -> VersionSupport.queryParamStyle(restClientBuilder, value)); + .ifPresent(value -> _queryParamStyle(restClientBuilder, value)); getConfigOption(String.class, CONFIG_PROXY_ADDRESS) - .ifPresent(proxy -> VersionSupport.proxyAddress(restClientBuilder, proxy)); + .ifPresent(proxy -> _proxyAddress(restClientBuilder, proxy)); // Providers from configuration addConfiguredProviders(restClientBuilder); @@ -417,4 +418,31 @@ private KeyStoreConfig(KeyStore keyStore, String password) { this.password = password; } } + + private RestClientBuilder _followRedirects(RestClientBuilder restClientBuilder, boolean follow) { + return restClientBuilder.followRedirects(follow); + } + + private RestClientBuilder _proxyAddress(RestClientBuilder restClientBuilder, String proxy) { + int index = proxy.lastIndexOf(':'); + //If : was not found at all or it is the last character of the proxy string + if (index < 0 || proxy.length() - 1 == index) { + throw new IllegalArgumentException(LocalizationMessages.ERR_INVALID_PROXY_URI(proxy)); + } + String proxyHost = proxy.substring(0, index); + int proxyPort; + String proxyPortStr = proxy.substring(index + 1); + try { + proxyPort = Integer.parseInt(proxyPortStr); + } catch (NumberFormatException nfe) { + throw new IllegalArgumentException(LocalizationMessages.ERR_INVALID_PROXY_PORT(proxyPortStr), nfe); + } + return restClientBuilder.proxyAddress(proxyHost, proxyPort); + } + + private RestClientBuilder _queryParamStyle(RestClientBuilder restClientBuilder, String style) { + org.eclipse.microprofile.rest.client.ext.QueryParamStyle queryParamStyle = + org.eclipse.microprofile.rest.client.ext.QueryParamStyle.valueOf(style); + return restClientBuilder.queryParamStyle(queryParamStyle); + } } diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/VersionSupport.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/VersionSupport.java deleted file mode 100644 index c3d8da0388..0000000000 --- a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/VersionSupport.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2021 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.microprofile.restclient; - -import org.eclipse.microprofile.rest.client.RestClientBuilder; -import org.glassfish.jersey.microprofile.restclient.internal.LocalizationMessages; -import org.glassfish.jersey.internal.util.collection.LazyValue; -import org.glassfish.jersey.internal.util.collection.Value; -import org.glassfish.jersey.internal.util.collection.Values; - -import java.util.logging.Logger; - -/** - * Backward compatibility support not to throw an exception when an old API is used. - */ -abstract class VersionSupport { - - protected abstract RestClientBuilder _followRedirects(RestClientBuilder restClientBuilder, boolean follow); - protected abstract RestClientBuilder _proxyAddress(RestClientBuilder restClientBuilder, String proxy); - protected abstract RestClientBuilder _queryParamStyle(RestClientBuilder restClientBuilder, String style); - - private static final Logger logger = Logger.getLogger(VersionSupport.class.getName()); - - // determine the version only once per jvm - private static LazyValue currentVersion = Values.lazy((Value) () -> { - final Class restClientBuilderClass = RestClientBuilder.class; - try { - if (null != restClientBuilderClass.getMethod("followRedirects", boolean.class)) { - return new Version20Support(); - } - } catch (NoSuchMethodException e) { - // VERSION 1.4 - } - return new Version14Support(); - }); - - static RestClientBuilder followRedirects(RestClientBuilder restClientBuilder, boolean follow) { - return currentVersion.get()._followRedirects(restClientBuilder, follow); - } - - static RestClientBuilder proxyAddress(RestClientBuilder restClientBuilder, String proxy) { - return currentVersion.get()._proxyAddress(restClientBuilder, proxy); - } - - static RestClientBuilder queryParamStyle(RestClientBuilder restClientBuilder, String style) { - return currentVersion.get()._queryParamStyle(restClientBuilder, style); - } - - private static class Version14Support extends VersionSupport { - protected RestClientBuilder _followRedirects(RestClientBuilder restClientBuilder, boolean follow) { - logger.warning(LocalizationMessages.WARN_VERSION_14_FOLLOWREDIRECT()); - return restClientBuilder; - } - - protected RestClientBuilder _proxyAddress(RestClientBuilder restClientBuilder, String proxy) { - logger.warning(LocalizationMessages.WARN_VERSION_14_PROXY()); - return restClientBuilder; - } - - protected RestClientBuilder _queryParamStyle(RestClientBuilder restClientBuilder, String style) { - logger.warning(LocalizationMessages.WARN_VERSION_14_QUERYPARAMSTYLE()); - return restClientBuilder; - } - } - - private static class Version20Support extends VersionSupport { - protected RestClientBuilder _followRedirects(RestClientBuilder restClientBuilder, boolean follow) { - return restClientBuilder.followRedirects(follow); - } - - protected RestClientBuilder _proxyAddress(RestClientBuilder restClientBuilder, String proxy) { - int index = proxy.lastIndexOf(':'); - //If : was not found at all or it is the last character of the proxy string - if (index < 0 || proxy.length() - 1 == index) { - throw new IllegalArgumentException(LocalizationMessages.ERR_INVALID_PROXY_URI(proxy)); - } - String proxyHost = proxy.substring(0, index); - int proxyPort; - String proxyPortStr = proxy.substring(index + 1); - try { - proxyPort = Integer.parseInt(proxyPortStr); - } catch (NumberFormatException nfe) { - throw new IllegalArgumentException(LocalizationMessages.ERR_INVALID_PROXY_PORT(proxyPortStr), nfe); - } - return restClientBuilder.proxyAddress(proxyHost, proxyPort); - } - - protected RestClientBuilder _queryParamStyle(RestClientBuilder restClientBuilder, String style) { - // do not import for compatibility with 1.4 - org.eclipse.microprofile.rest.client.ext.QueryParamStyle queryParamStyle = - org.eclipse.microprofile.rest.client.ext.QueryParamStyle.valueOf(style); - return restClientBuilder.queryParamStyle(queryParamStyle); - } - } -} diff --git a/ext/microprofile/mp-rest-client/src/main/resources/org/glassfish/jersey/microprofile/restclient/internal/localization.properties b/ext/microprofile/mp-rest-client/src/main/resources/org/glassfish/jersey/microprofile/restclient/internal/localization.properties index 71f05e0220..3afc639ad8 100644 --- a/ext/microprofile/mp-rest-client/src/main/resources/org/glassfish/jersey/microprofile/restclient/internal/localization.properties +++ b/ext/microprofile/mp-rest-client/src/main/resources/org/glassfish/jersey/microprofile/restclient/internal/localization.properties @@ -16,7 +16,3 @@ err.invalid.proxy.uri=Invalid proxy URI: {0}. err.invalid.proxy.port=Invalid proxy port: {0}. -warn.version14.followredirect=MP Rest Client Version 1.4 does not support RestClientBuilder#followRedirect and it is ignored. -warn.version14.proxy=MP Rest Client Version 1.4 does not support RestClientBuilder#proxy and it is ignored. -warn.version14.queryparamstyle=MP Rest Client Version 1.4 does not support RestClientBuilder#queryParamStyle and it is ignored. - diff --git a/ext/microprofile/pom.xml b/ext/microprofile/pom.xml index 6bc3d24fe5..9d278bff24 100644 --- a/ext/microprofile/pom.xml +++ b/ext/microprofile/pom.xml @@ -32,8 +32,8 @@ pom - - mp-config + mp-rest-client + mp-config diff --git a/tests/integration/microprofile/pom.xml b/tests/integration/microprofile/pom.xml index e41fdaecfb..c9aec44dea 100644 --- a/tests/integration/microprofile/pom.xml +++ b/tests/integration/microprofile/pom.xml @@ -32,8 +32,7 @@ microprofile-integration-project config - - + rest-client diff --git a/tests/integration/microprofile/rest-client/pom.xml b/tests/integration/microprofile/rest-client/pom.xml index 6d3b5e80ec..87c29a8c69 100644 --- a/tests/integration/microprofile/rest-client/pom.xml +++ b/tests/integration/microprofile/rest-client/pom.xml @@ -23,7 +23,7 @@ microprofile-integration-project org.glassfish.jersey.tests.integration.microprofile - 3.0-SNAPSHOT + 3.1.0-SNAPSHOT 4.0.0 @@ -41,6 +41,10 @@ jakarta.enterprise jakarta.enterprise.cdi-api + + jakarta.ejb + jakarta.ejb-api + org.jboss.weld.se weld-se-core @@ -61,7 +65,7 @@ org.eclipse.microprofile.rest.client microprofile-rest-client-tck - 2.0 + 3.0-RC3 test @@ -77,25 +81,25 @@ com.github.tomakehurst wiremock - 2.21.0 + 2.27.2 test org.jboss.arquillian.testng arquillian-testng-container - 1.4.1.Final + 1.7.0.Alpha10 test org.jboss.arquillian.container arquillian-container-test-spi - 1.4.1.Final + 1.7.0.Alpha10 test org.jboss.arquillian.container arquillian-weld-embedded - 2.1.0.Final + 3.0.0.Final test diff --git a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/InboundHeadersProviderTest.java b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/InboundHeadersProviderTest.java index fe043bae21..5828d01001 100644 --- a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/InboundHeadersProviderTest.java +++ b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/InboundHeadersProviderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021 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 @@ -24,8 +24,8 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutorService; -import javax.json.Json; -import javax.json.JsonObject; +import jakarta.json.Json; +import jakarta.json.JsonObject; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; import jakarta.ws.rs.container.AsyncResponse; diff --git a/tests/integration/microprofile/rest-client/tck-suite.xml b/tests/integration/microprofile/rest-client/tck-suite.xml index a317e79ede..66f52cad31 100644 --- a/tests/integration/microprofile/rest-client/tck-suite.xml +++ b/tests/integration/microprofile/rest-client/tck-suite.xml @@ -20,18 +20,20 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/tests/integration/microprofile/rest-client14-compatibility/pom.xml b/tests/integration/microprofile/rest-client14-compatibility/pom.xml deleted file mode 100644 index 567c6f4252..0000000000 --- a/tests/integration/microprofile/rest-client14-compatibility/pom.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - microprofile-integration-project - org.glassfish.jersey.tests.integration.microprofile - 3.1.0-SNAPSHOT - - 4.0.0 - - jersey-rest-client14-compatibility - - - - org.glassfish.jersey.ext.microprofile - jersey-mp-rest-client - ${project.version} - test - - - jakarta.enterprise - jakarta.enterprise.cdi-api - - - javax.enterprise - cdi-api - - - org.eclipse.microprofile.rest.client - microprofile-rest-client-api - - - - - - jakarta.enterprise - jakarta.enterprise.cdi-api - test - - - org.eclipse.microprofile.rest.client - microprofile-rest-client-api - - 1.4.1 - test - - - org.glassfish.jersey.ext.cdi - jersey-weld2-se - test - - - org.jboss.weld.se - weld-se-core - test - - - org.glassfish.jersey.ext.cdi - jersey-cdi1x - test - - - io.smallrye.config - smallrye-config - 1.8.4 - test - - - javax.enterprise - cdi-api - - - - - junit - junit - test - - - org.glassfish.jersey.test-framework - jersey-test-framework-core - test - - - org.glassfish.jersey.test-framework.providers - jersey-test-framework-provider-bundle - pom - test - - - org.glassfish.jersey.ext.cdi - jersey-weld2-se - test - - - diff --git a/tests/integration/microprofile/rest-client14-compatibility/src/test/java/org/glassfish/jersey/tests/restclient/compatibility/Compatibility14Test.java b/tests/integration/microprofile/rest-client14-compatibility/src/test/java/org/glassfish/jersey/tests/restclient/compatibility/Compatibility14Test.java deleted file mode 100644 index 16476e8a50..0000000000 --- a/tests/integration/microprofile/rest-client14-compatibility/src/test/java/org/glassfish/jersey/tests/restclient/compatibility/Compatibility14Test.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2021 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.restclient.compatibility; - -import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import org.eclipse.microprofile.rest.client.inject.RestClient; -import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory; -import org.glassfish.jersey.server.ResourceConfig; -import org.glassfish.jersey.server.ServerProperties; -import org.glassfish.jersey.test.JerseyTest; -import org.glassfish.jersey.test.TestProperties; -import org.jboss.weld.environment.se.Weld; -import org.junit.Assert; -import org.junit.Assume; -import org.junit.Before; -import org.junit.Test; - -import jakarta.enterprise.context.RequestScoped; -import jakarta.inject.Inject; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.Response; -import java.util.logging.Level; -import java.util.logging.LogRecord; - -public class Compatibility14Test extends JerseyTest { - private Weld weld; - - @Before - public void setup() { - Assume.assumeTrue(Hk2InjectionManagerFactory.isImmediateStrategy()); - } - - @Override - public void setUp() throws Exception { - if (Hk2InjectionManagerFactory.isImmediateStrategy()) { - weld = new Weld(); - weld.initialize(); - super.setUp(); - } - } - - @Override - public void tearDown() throws Exception { - if (Hk2InjectionManagerFactory.isImmediateStrategy()) { - weld.shutdown(); - super.tearDown(); - } - } - - @RegisterRestClient - public static interface CompatibilityClient { - @GET - public String get(); - } - - @Path("/resource") - @RequestScoped - public static class CompatibilityResource { - - @Inject - @RestClient - CompatibilityClient client; - - @GET - public String get() { - return client.get(); - } - } - - @Path("/inner") - public static class InnerResource implements CompatibilityClient { - - public String get() { - return "INNER"; - } - } - - @Override - protected Application configure() { - set(TestProperties.RECORD_LOG_LEVEL, Level.WARNING.intValue()); - return new ResourceConfig(InnerResource.class, CompatibilityResource.class) - .property(ServerProperties.WADL_FEATURE_DISABLE, true); - } - - @Test - public void testCompatibility() { - final String loggerName = "org.glassfish.jersey.microprofile.restclient.VersionSupport"; - - try (Response r = target("/resource").request().get()) { - String entity = r.readEntity(String.class); - Assert.assertEquals(new InnerResource().get(), entity); - } - - int warningCounts = 0; - for (final LogRecord logRecord : getLoggedRecords()) { - if (loggerName.equals(logRecord.getLoggerName()) && logRecord.getLevel() == Level.WARNING) { - warningCounts++; - } - } - - Assert.assertEquals(3, warningCounts); - } -} diff --git a/tests/integration/microprofile/rest-client14-compatibility/src/test/resources/META-INF/beans.xml b/tests/integration/microprofile/rest-client14-compatibility/src/test/resources/META-INF/beans.xml deleted file mode 100644 index 70897bddc7..0000000000 --- a/tests/integration/microprofile/rest-client14-compatibility/src/test/resources/META-INF/beans.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - diff --git a/tests/integration/microprofile/rest-client14-compatibility/src/test/resources/META-INF/microprofile-config.properties b/tests/integration/microprofile/rest-client14-compatibility/src/test/resources/META-INF/microprofile-config.properties deleted file mode 100644 index 616d54535b..0000000000 --- a/tests/integration/microprofile/rest-client14-compatibility/src/test/resources/META-INF/microprofile-config.properties +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright (c) 2021 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 - -org.glassfish.jersey.tests.restclient.compatibility.Compatibility14Test$CompatibilityClient/mp-rest/uri=http://localhost:9998/inner -org.glassfish.jersey.tests.restclient.compatibility.Compatibility14Test$CompatibilityClient/mp-rest/followRedirects=true -org.glassfish.jersey.tests.restclient.compatibility.Compatibility14Test$CompatibilityClient/mp-rest/queryParamStyle=COMMA_SEPARATED -org.glassfish.jersey.tests.restclient.compatibility.Compatibility14Test$CompatibilityClient/mp-rest/proxyAddress=http://localhost:1010/nowehere \ No newline at end of file From 5b154284e12291ccf4cd63ee48499ffc13a3bd38 Mon Sep 17 00:00:00 2001 From: jansupol Date: Wed, 13 Oct 2021 13:14:53 +0200 Subject: [PATCH 10/20] Split MP REST Client integration test module to support javax.servlet in the TCK Signed-off-by: jansupol --- ext/microprofile/mp-rest-client/pom.xml | 6 + .../restclient/InterfaceUtilTest.java | 8 +- tests/integration/microprofile/pom.xml | 1 + .../microprofile/rest-client-tck/pom.xml | 249 ++++++++++++++++++ .../src/test/resources/arquillian.xml | 2 +- .../src/test/resources/server.policy | 19 ++ .../tck-suite.xml | 32 ++- .../microprofile/rest-client/pom.xml | 120 +-------- .../internal/StringMessageProvider.java | 83 ------ .../restclient/ApplicationResource.java | 4 +- .../restclient/ApplicationResourceImpl.java | 4 +- .../restclient/ConnectorTest.java | 6 +- .../restclient/ConsumesAndProducesTest.java | 10 +- .../restclient/CorrectInterface.java | 4 +- .../InboundHeadersProviderTest.java | 2 +- .../restclient/RestClientModelTest.java | 4 +- 16 files changed, 316 insertions(+), 238 deletions(-) rename {tests/integration/microprofile/rest-client => ext/microprofile/mp-rest-client}/src/test/java/org/glassfish/jersey/microprofile/restclient/InterfaceUtilTest.java (87%) create mode 100644 tests/integration/microprofile/rest-client-tck/pom.xml rename tests/integration/microprofile/{rest-client => rest-client-tck}/src/test/resources/arquillian.xml (92%) create mode 100644 tests/integration/microprofile/rest-client-tck/src/test/resources/server.policy rename tests/integration/microprofile/{rest-client => rest-client-tck}/tck-suite.xml (52%) delete mode 100644 tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/message/internal/StringMessageProvider.java rename tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/{ => test/microprofile}/restclient/ApplicationResource.java (94%) rename tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/{ => test/microprofile}/restclient/ApplicationResourceImpl.java (94%) rename tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/{ => test/microprofile}/restclient/ConnectorTest.java (92%) rename tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/{ => test/microprofile}/restclient/ConsumesAndProducesTest.java (95%) rename tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/{ => test/microprofile}/restclient/CorrectInterface.java (94%) rename tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/{ => test/microprofile}/restclient/InboundHeadersProviderTest.java (98%) rename tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/{ => test/microprofile}/restclient/RestClientModelTest.java (93%) diff --git a/ext/microprofile/mp-rest-client/pom.xml b/ext/microprofile/mp-rest-client/pom.xml index bf65b5ab26..91eaab56ca 100644 --- a/ext/microprofile/mp-rest-client/pom.xml +++ b/ext/microprofile/mp-rest-client/pom.xml @@ -33,6 +33,12 @@ org.eclipse.microprofile.rest.client microprofile-rest-client-api 3.0-RC3 + + + org.testng + testng + + org.eclipse.microprofile.config diff --git a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/microprofile/restclient/InterfaceUtilTest.java b/ext/microprofile/mp-rest-client/src/test/java/org/glassfish/jersey/microprofile/restclient/InterfaceUtilTest.java similarity index 87% rename from tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/microprofile/restclient/InterfaceUtilTest.java rename to ext/microprofile/mp-rest-client/src/test/java/org/glassfish/jersey/microprofile/restclient/InterfaceUtilTest.java index fb40a459bd..466b8708bf 100644 --- a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/microprofile/restclient/InterfaceUtilTest.java +++ b/ext/microprofile/mp-rest-client/src/test/java/org/glassfish/jersey/microprofile/restclient/InterfaceUtilTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021 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 @@ -16,11 +16,11 @@ package org.glassfish.jersey.microprofile.restclient; -import java.util.Arrays; +import org.junit.Test; -import org.testng.annotations.Test; +import java.util.Arrays; -import static org.testng.Assert.assertEquals; +import static org.junit.Assert.assertEquals; public class InterfaceUtilTest { diff --git a/tests/integration/microprofile/pom.xml b/tests/integration/microprofile/pom.xml index c9aec44dea..31198bc4e2 100644 --- a/tests/integration/microprofile/pom.xml +++ b/tests/integration/microprofile/pom.xml @@ -33,6 +33,7 @@ config rest-client + rest-client-tck diff --git a/tests/integration/microprofile/rest-client-tck/pom.xml b/tests/integration/microprofile/rest-client-tck/pom.xml new file mode 100644 index 0000000000..e6ee1d67dd --- /dev/null +++ b/tests/integration/microprofile/rest-client-tck/pom.xml @@ -0,0 +1,249 @@ + + + + + + microprofile-integration-project + org.glassfish.jersey.tests.integration.microprofile + 3.1.0-SNAPSHOT + + 4.0.0 + + jersey-rest-client-tck + + + + org.glassfish.jersey.ext.microprofile + jersey-mp-rest-client + ${project.version} + test + + + + jakarta.enterprise + jakarta.enterprise.cdi-api + + + jakarta.ejb + jakarta.ejb-api + + + org.jboss.weld.se + weld-se-core + test + + + javax.servlet + javax.servlet-api + 4.0.1 + + + io.smallrye + smallrye-config + 1.3.6 + test + + + javax.enterprise + cdi-api + + + + + org.eclipse.microprofile.rest.client + microprofile-rest-client-tck + 3.0-RC3 + test + + + org.testng + testng + test + + + com.github.tomakehurst + wiremock + 2.27.2 + test + + + org.eclipse.jetty + jetty-server + + + org.eclipse.jetty + jetty-servlet + + + org.eclipse.jetty + jetty-servlets + + + org.eclipse.jetty + jetty-webapp + + + org.eclipse.jetty + jetty-proxy + + + + + com.google.guava + guava + 20.0 + + + org.eclipse.jetty + jetty-server + ${jetty.version} + test + + + org.eclipse.jetty + jetty-servlet + ${jetty.version} + test + + + org.eclipse.jetty + jetty-servlets + ${jetty.version} + test + + + org.eclipse.jetty + jetty-webapp + ${jetty.version} + test + + + org.eclipse.jetty + jetty-proxy + ${jetty.version} + test + + + org.jboss.arquillian.testng + arquillian-testng-container + 1.7.0.Alpha10 + test + + + org.jboss.arquillian.container + arquillian-container-test-spi + 1.7.0.Alpha10 + test + + + org.jboss.arquillian.container + arquillian-weld-embedded + 3.0.0.Final + test + + + org.glassfish.jersey.test-framework + jersey-test-framework-core + test + + + org.glassfish.jersey.test-framework.providers + jersey-test-framework-provider-bundle + pom + test + + + org.glassfish.jersey.connectors + jersey-apache-connector + test + + + org.glassfish.jersey.ext.cdi + jersey-weld2-se + test + + + + + + testRunner + + + skipTests + !true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + org.apache.maven.surefire + surefire-junit47 + ${surefire.version} + + + org.apache.maven.surefire + surefire-testng + ${surefire.version} + + + + 1 + + tck-suite.xml + + + + + + uk.co.deliverymind + wiremock-maven-plugin + 2.7.0 + + + test-compile + + run + + + target/classes + --port=8765 + + + + + + + + + + + + + -Djava.security.manager -Djava.security.policy=${project.build.directory}/test-classes/server.policy + 9.4.27.v20200227 + + + + diff --git a/tests/integration/microprofile/rest-client/src/test/resources/arquillian.xml b/tests/integration/microprofile/rest-client-tck/src/test/resources/arquillian.xml similarity index 92% rename from tests/integration/microprofile/rest-client/src/test/resources/arquillian.xml rename to tests/integration/microprofile/rest-client-tck/src/test/resources/arquillian.xml index e748760e33..c9668db740 100644 --- a/tests/integration/microprofile/rest-client/src/test/resources/arquillian.xml +++ b/tests/integration/microprofile/rest-client-tck/src/test/resources/arquillian.xml @@ -1,7 +1,7 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/tests/integration/microprofile/rest-client/pom.xml b/tests/integration/microprofile/rest-client/pom.xml index 87c29a8c69..7eb262e868 100644 --- a/tests/integration/microprofile/rest-client/pom.xml +++ b/tests/integration/microprofile/rest-client/pom.xml @@ -27,7 +27,7 @@ 4.0.0 - jersey-rest-client-tck + jersey-rest-client @@ -41,10 +41,6 @@ jakarta.enterprise jakarta.enterprise.cdi-api - - jakarta.ejb - jakarta.ejb-api - org.jboss.weld.se weld-se-core @@ -62,46 +58,6 @@ - - org.eclipse.microprofile.rest.client - microprofile-rest-client-tck - 3.0-RC3 - test - - - junit - junit - test - - - org.testng - testng - test - - - com.github.tomakehurst - wiremock - 2.27.2 - test - - - org.jboss.arquillian.testng - arquillian-testng-container - 1.7.0.Alpha10 - test - - - org.jboss.arquillian.container - arquillian-container-test-spi - 1.7.0.Alpha10 - test - - - org.jboss.arquillian.container - arquillian-weld-embedded - 3.0.0.Final - test - org.glassfish.jersey.test-framework jersey-test-framework-core @@ -118,12 +74,6 @@ jersey-apache-connector test - - org.eclipse.jetty - jetty-servlet - ${jetty.version} - test - org.glassfish.jersey.ext.cdi jersey-weld2-se @@ -131,74 +81,6 @@ - - - - org.eclipse.jetty - jetty-bom - ${jetty.version} - pom - - - - - - - testRunner - - - skipTests - !true - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - org.apache.maven.surefire - surefire-junit47 - ${surefire.version} - - - org.apache.maven.surefire - surefire-testng - ${surefire.version} - - - - 1 - - tck-suite.xml - - - - - uk.co.deliverymind - wiremock-maven-plugin - 2.7.0 - - - test-compile - - run - - - target/classes - --port=8765 - - - - - - - - - - - -Djava.security.manager -Djava.security.policy=${project.build.directory}/test-classes/server.policy diff --git a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/message/internal/StringMessageProvider.java b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/message/internal/StringMessageProvider.java deleted file mode 100644 index 93b12ccf8c..0000000000 --- a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/message/internal/StringMessageProvider.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2019, 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.message.internal; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.lang.annotation.Annotation; -import java.lang.reflect.Type; - -import jakarta.inject.Singleton; -import jakarta.ws.rs.Consumes; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.MediaType; -import jakarta.ws.rs.core.MultivaluedMap; - -import org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider; - -/* - * This class was copied from Jersey Common 2.26 due to TCK workaround reasons. - */ - -/** - * - * @author Paul Sandoz - */ -@Produces -@Consumes -@Singleton -final class StringMessageProvider extends AbstractMessageReaderWriterProvider { - - @Override - public boolean isReadable(Class type, Type genericType, Annotation annotations[], MediaType mediaType) { - return type == String.class; - } - - @Override - public String readFrom( - Class type, - Type genericType, - Annotation annotations[], - MediaType mediaType, - MultivaluedMap httpHeaders, - InputStream entityStream) throws IOException { - return readFromAsString(entityStream, mediaType); - } - - @Override - public boolean isWriteable(Class type, Type genericType, Annotation annotations[], MediaType mediaType) { - return type == String.class; - } - - @Override - public long getSize(String s, Class type, Type genericType, Annotation[] annotations, MediaType mediaType) { - return s.length(); - } - - @Override - public void writeTo( - String t, - Class type, - Type genericType, - Annotation annotations[], - MediaType mediaType, - MultivaluedMap httpHeaders, - OutputStream entityStream) throws IOException { - writeToAsString(t, entityStream, mediaType); - } -} diff --git a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/ApplicationResource.java b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/ApplicationResource.java similarity index 94% rename from tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/ApplicationResource.java rename to tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/ApplicationResource.java index 8bc1ae7648..7c927f2f29 100644 --- a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/ApplicationResource.java +++ b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/ApplicationResource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2021 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 @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.restclient; +package org.glassfish.jersey.test.microprofile.restclient; import java.util.List; import java.util.Map; diff --git a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/ApplicationResourceImpl.java b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/ApplicationResourceImpl.java similarity index 94% rename from tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/ApplicationResourceImpl.java rename to tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/ApplicationResourceImpl.java index 12c31e2b96..dd10f72139 100644 --- a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/ApplicationResourceImpl.java +++ b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/ApplicationResourceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2021 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 @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.restclient; +package org.glassfish.jersey.test.microprofile.restclient; import java.util.Arrays; import java.util.HashMap; diff --git a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/ConnectorTest.java b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/ConnectorTest.java similarity index 92% rename from tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/ConnectorTest.java rename to tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/ConnectorTest.java index 6a3cb19caa..26de896d59 100644 --- a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/ConnectorTest.java +++ b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/ConnectorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2021 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 @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.restclient; +package org.glassfish.jersey.test.microprofile.restclient; import java.net.URI; import java.net.URISyntaxException; @@ -31,7 +31,7 @@ import org.glassfish.jersey.test.TestProperties; import org.junit.Test; -import static org.testng.Assert.assertEquals; +import static org.junit.Assert.assertEquals; /** * Created by David Kral. diff --git a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/ConsumesAndProducesTest.java b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/ConsumesAndProducesTest.java similarity index 95% rename from tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/ConsumesAndProducesTest.java rename to tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/ConsumesAndProducesTest.java index 16ed03c2af..5f998b57b0 100644 --- a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/ConsumesAndProducesTest.java +++ b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/ConsumesAndProducesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2021 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 @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.restclient; +package org.glassfish.jersey.test.microprofile.restclient; import java.net.URI; import java.net.URISyntaxException; @@ -35,9 +35,9 @@ import org.glassfish.jersey.test.TestProperties; import org.junit.Test; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertFalse; -import static org.testng.Assert.assertTrue; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; /** * Created by David Kral. diff --git a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/CorrectInterface.java b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/CorrectInterface.java similarity index 94% rename from tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/CorrectInterface.java rename to tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/CorrectInterface.java index 86849292a4..07cf4c1bcb 100644 --- a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/CorrectInterface.java +++ b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/CorrectInterface.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2021 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 @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.restclient; +package org.glassfish.jersey.test.microprofile.restclient; import jakarta.ws.rs.BeanParam; import jakarta.ws.rs.GET; diff --git a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/InboundHeadersProviderTest.java b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/InboundHeadersProviderTest.java similarity index 98% rename from tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/InboundHeadersProviderTest.java rename to tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/InboundHeadersProviderTest.java index 5828d01001..5d5c7f2988 100644 --- a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/InboundHeadersProviderTest.java +++ b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/InboundHeadersProviderTest.java @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.restclient; +package org.glassfish.jersey.test.microprofile.restclient; import java.net.URI; import java.util.Collections; diff --git a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/RestClientModelTest.java b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/RestClientModelTest.java similarity index 93% rename from tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/RestClientModelTest.java rename to tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/RestClientModelTest.java index 186b3c6045..ab5499319f 100644 --- a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/restclient/RestClientModelTest.java +++ b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/RestClientModelTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2021 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 @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.restclient; +package org.glassfish.jersey.test.microprofile.restclient; import java.net.URI; import java.net.URISyntaxException; From 5b5413854e8f5d60436c9d23a1e4234aedc685af Mon Sep 17 00:00:00 2001 From: jansupol Date: Thu, 21 Oct 2021 23:16:55 +0200 Subject: [PATCH 11/20] Set Content-Type to application/octet-stream when not set when matching @Consumes Signed-off-by: jansupol --- .../internal/TransferEncodingParser.java | 6 +- .../jersey/server/ServerProperties.java | 37 + .../AbstractMethodSelectingRouter.java | 666 ++++++++++++++++++ .../routing/MethodSelectingRouter.java | 623 +--------------- .../routing/MethodSelectingRouter2x.java | 79 +++ .../routing/PathMatchingRouterBuilder.java | 7 +- .../internal/routing/RuntimeModelBuilder.java | 15 +- .../ResponseMediaTypeFromProvidersTest.java | 5 +- .../model/AsyncContentAndEntityTypeTest.java | 4 +- .../model/ConsumeProduceSimpleTest.java | 36 +- docs/src/main/docbook/appendix-properties.xml | 18 + docs/src/main/docbook/jersey.ent | 1 + docs/src/main/docbook/migration.xml | 18 + .../exception/ExceptionMappingFilterTest.java | 6 +- .../exception/ExceptionMappingTest.java | 6 +- .../examples/httppatch/HttpPatchTest.java | 12 +- .../jersey/examples/jaxb/JaxbTest.java | 45 +- .../jsonp/JsonProcessingResourceTest.java | 11 +- .../server/async/AsyncResourceTest.java | 6 +- .../examples/sysprops/SysPropsTest.java | 14 +- .../jersey/kryo/PersonResourceBaseTest.java | 5 +- .../oauth1/OAuth1AuthorizationFlowImpl.java | 9 +- .../tests/e2e/client/ClientPathTest.java | 19 +- .../tests/e2e/entity/EntityTypesTest.java | 10 +- .../jersey/tests/e2e/entity/JsonMoxyTest.java | 13 +- .../tests/e2e/entity/MultipartTest.java | 4 +- .../jersey/tests/e2e/entity/XmlMoxyTest.java | 10 +- .../e2e/entity/filtering/EmptyEntityTest.java | 9 +- .../filtering/EntityFilteringOnClassTest.java | 24 +- .../EntityFilteringOnPropertiesTest.java | 24 +- .../filtering/EntityFilteringScopesTest.java | 9 +- .../filtering/json/JsonEmptyEntityTest.java | 10 +- .../json/JsonEntityFilteringOnClassTest.java | 19 +- .../JsonEntityFilteringOnPropertiesTest.java | 18 +- .../json/JsonEntityFilteringScopesTest.java | 7 +- ...tractDisableMetainfServicesLookupTest.java | 6 +- .../jersey/tests/e2e/ClientTest.java | 7 +- .../jersey2255/Jersey2255ITCase.java | 15 +- .../filter/dynamic/FilterTest.java | 6 +- .../performance/filter/global/FilterTest.java | 6 +- .../performance/filter/name/FilterTest.java | 6 +- .../interceptor/dynamic/InterceptorTest.java | 6 +- .../interceptor/global/InterceptorTest.java | 6 +- .../interceptor/name/InterceptorTest.java | 6 +- .../mbw/custom/PersonEntityTest.java | 5 +- .../performance/mbw/json/JsonEntityTest.java | 7 +- .../performance/mbw/json/JsonEntityTest.java | 7 +- .../mbw/kryo/PersonResourceTest.java | 5 +- .../performance/mbw/text/TextEntityTest.java | 6 +- .../performance/mbw/xml/XmlEntityTest.java | 7 +- .../performance/mbw/xml/XmlEntityTest.java | 7 +- 51 files changed, 1144 insertions(+), 769 deletions(-) create mode 100644 core-server/src/main/java/org/glassfish/jersey/server/internal/routing/AbstractMethodSelectingRouter.java create mode 100644 core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter2x.java diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/TransferEncodingParser.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/TransferEncodingParser.java index 64fb9c706c..d3b1d9f3b6 100644 --- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/TransferEncodingParser.java +++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/TransferEncodingParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -218,8 +218,8 @@ private boolean parseHttpChunkLength(final ByteBuffer input) throws ParseExcepti while (offset < limit) { final byte b = input.get(offset); - if (isSpaceOrTab(b) || /*trailing spaces are not allowed by the spec, but some server put it there*/ - b == HttpParserUtils.CR || b == HttpParserUtils.SEMI_COLON) { + if (isSpaceOrTab(b) /*trailing spaces are not allowed by the spec, but some server put it there*/ + || b == HttpParserUtils.CR || b == HttpParserUtils.SEMI_COLON) { headerParsingState.checkpoint = offset; } else if (b == HttpParserUtils.LF) { contentParsingState.chunkContentStart = offset + 1; diff --git a/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java b/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java index 02cf9b2d8a..98724ff4a1 100644 --- a/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java +++ b/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java @@ -741,6 +741,43 @@ public final class ServerProperties { public static final String UNWRAP_COMPLETION_STAGE_IN_WRITER_ENABLE = "jersey.config.server.unwrap.completion.stage.writer.enable"; + /** + *

+ * When an HTTP request does not contain a media type, the media type should default to {@code application/octet-stream}. + * In the past, Jersey used to match any {@code @Consumes} when the HTTP {@code Content-Type} header was not set. + * This property is to preserve the behaviour. Such behaviour is potentially dangerous, though. + * The default behaviour is to set the request media type to {@code application/octet-stream} when none set. + * This is a Jakarta REST requirement. + *

+ *

+ * This change can be can be eminent especially for HTTP resource methods which do not expect an entity, such as HTTP GET: + *

+     * {@code
+     * @Consumes(MediaType.TEXT_PLAIN)
+     * @Produces(MediaType.TEXT_PLAIN)
+     * @Path("/")
+     * public class Resource {
+     *     @GET
+     *     public String get() {
+     *         return ...
+     *     }
+     * }
+     * }
+     * 
+ * The client request needs to contain the {@code Content-Type} HTTP header, for instance: + * {@code + * webTarget.request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get() + * } + *

+ *

+ * Set this property to true, if the empty request media type is to match any {@code @Consumes}. The default is {@code false}. + * The name of the configuration property is {@value}. + *

+ * @since 3.1.0 + */ + public static final String EMPTY_REQUEST_MEDIA_TYPE_MATCHES_ANY_CONSUMES = + "jersey.config.server.empty.request.media.matches.any.consumes"; + /** * JVM argument to define the value of * {@link org.glassfish.jersey.server.internal.monitoring.core.ReservoirConstants#COLLISION_BUFFER_POWER}. diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/AbstractMethodSelectingRouter.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/AbstractMethodSelectingRouter.java new file mode 100644 index 0000000000..f75ffaf352 --- /dev/null +++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/AbstractMethodSelectingRouter.java @@ -0,0 +1,666 @@ +/* + * Copyright (c) 2012, 2021 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.internal.routing; + +import jakarta.ws.rs.HttpMethod; +import jakarta.ws.rs.NotAcceptableException; +import jakarta.ws.rs.NotAllowedException; +import jakarta.ws.rs.NotSupportedException; +import jakarta.ws.rs.container.ContainerRequestContext; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import org.glassfish.jersey.internal.guava.Primitives; +import org.glassfish.jersey.internal.routing.CombinedMediaType; +import org.glassfish.jersey.internal.routing.ContentTypeDeterminer; +import org.glassfish.jersey.internal.routing.RequestSpecificConsumesProducesAcceptor; +import org.glassfish.jersey.message.MessageBodyWorkers; +import org.glassfish.jersey.message.ReaderModel; +import org.glassfish.jersey.message.WriterModel; +import org.glassfish.jersey.message.internal.AcceptableMediaType; +import org.glassfish.jersey.message.internal.MediaTypes; +import org.glassfish.jersey.server.ContainerRequest; +import org.glassfish.jersey.server.ContainerResponse; +import org.glassfish.jersey.server.internal.LocalizationMessages; +import org.glassfish.jersey.server.internal.process.RequestProcessingContext; +import org.glassfish.jersey.server.model.Invocable; +import org.glassfish.jersey.server.model.Parameter; +import org.glassfish.jersey.server.model.ResourceMethod; + +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.IdentityHashMap; +import java.util.LinkedHashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Function; +import java.util.logging.Level; +import java.util.logging.Logger; + +abstract class AbstractMethodSelectingRouter extends ContentTypeDeterminer implements Router { + + private static final Logger LOGGER = Logger.getLogger(MethodSelectingRouter.class.getName()); + + private static final Comparator CONSUMES_PRODUCES_ACCEPTOR_COMPARATOR = + new Comparator() { + + @Override + public int compare(final ConsumesProducesAcceptor o1, final ConsumesProducesAcceptor o2) { + // Make sure that annotated (@Consumes, @Produces) goes first. + final ResourceMethod model1 = o1.methodRouting.method; + final ResourceMethod model2 = o2.methodRouting.method; + + // @Consumes on method. + int compared = compare(model1.getConsumedTypes(), model2.getConsumedTypes()); + if (compared != 0) { + return compared; + } + + compared = compare(model1.getProducedTypes(), model2.getProducedTypes()); + if (compared != 0) { + return compared; + } + + compared = MediaTypes.PARTIAL_ORDER_COMPARATOR.compare(o1.consumes.getMediaType(), + o2.consumes.getMediaType()); + if (compared != 0) { + return compared; + } + + return MediaTypes.PARTIAL_ORDER_COMPARATOR.compare(o1.produces.getMediaType(), + o2.produces.getMediaType()); + } + + private int compare(List mediaTypeList1, List mediaTypeList2) { + mediaTypeList1 = mediaTypeList1.isEmpty() ? MediaTypes.WILDCARD_TYPE_SINGLETON_LIST : mediaTypeList1; + mediaTypeList2 = mediaTypeList2.isEmpty() ? MediaTypes.WILDCARD_TYPE_SINGLETON_LIST : mediaTypeList2; + + return MediaTypes.MEDIA_TYPE_LIST_COMPARATOR.compare(mediaTypeList1, mediaTypeList2); + } + }; + + private final Map> consumesProducesAcceptors; + private final Router router; + + /** + * Create a new {@code MethodSelectingRouter} for all the methods on the same path. + * + * The router selects the method that best matches the request based on + * produce/consume information from the resource method models. + * + * @param workers message body workers. + * @param methodRoutings [method model, method methodAcceptorPair] pairs. + */ + AbstractMethodSelectingRouter(MessageBodyWorkers workers, List methodRoutings) { + super(workers); + + this.consumesProducesAcceptors = new HashMap<>(); + + final Set httpMethods = new HashSet<>(); + for (final MethodRouting methodRouting : methodRoutings) { + final String httpMethod = methodRouting.method.getHttpMethod(); + httpMethods.add(httpMethod); + + List httpMethodBoundAcceptors = consumesProducesAcceptors.get(httpMethod); + if (httpMethodBoundAcceptors == null) { + httpMethodBoundAcceptors = new LinkedList<>(); + consumesProducesAcceptors.put(httpMethod, httpMethodBoundAcceptors); + } + + addAllConsumesProducesCombinations(httpMethodBoundAcceptors, methodRouting); + } + + // Sort acceptors for added HTTP methods - primary based on @Consumes, @Produces present on method, secondary on consumes, + // produces values of the acceptor. + for (final String httpMethod : httpMethods) { + Collections.sort(consumesProducesAcceptors.get(httpMethod), CONSUMES_PRODUCES_ACCEPTOR_COMPARATOR); + } + + if (!consumesProducesAcceptors.containsKey(HttpMethod.HEAD)) { + this.router = createHeadEnrichedRouter(); + } else { + this.router = createInternalRouter(); + } + } + + Set getHttpMethods() { + return consumesProducesAcceptors.keySet(); + } + + protected abstract ConsumesProducesAcceptor createConsumesProducesAcceptor(CombinedMediaType.EffectiveMediaType consumes, + CombinedMediaType.EffectiveMediaType produces, + MethodRouting methodRouting); + + /** + * Represents a 1-1-1 relation between input and output media type and an methodAcceptorPair. + *

E.g. for a single resource method + *

+     *   @Consumes("*/*")
+     *   @Produces("text/plain","text/html")
+     *   @GET
+     *   public String myGetMethod() {
+     *     return "S";
+     *   }
+     * 
+ * the following two relations would be generated: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
consumesproducesmethod
*/*text/plainmyGetMethod
*/*text/htmlmyGetMethod
+ */ + protected abstract static class ConsumesProducesAcceptor { + + final CombinedMediaType.EffectiveMediaType consumes; + final CombinedMediaType.EffectiveMediaType produces; + final MethodRouting methodRouting; + + protected ConsumesProducesAcceptor( + CombinedMediaType.EffectiveMediaType consumes, + CombinedMediaType.EffectiveMediaType produces, + MethodRouting methodRouting) { + this.methodRouting = methodRouting; + this.consumes = consumes; + this.produces = produces; + } + + /** + * Determines whether this {@code ConsumesProducesAcceptor} router can process the {@code request}. + * + * @param requestContext The request to be tested. + * @return True if the {@code request} can be processed by this router, false otherwise. + */ + abstract boolean isConsumable(ContainerRequest requestContext); + + @Override + public String toString() { + return String.format("%s->%s:%s", consumes.getMediaType(), produces.getMediaType(), methodRouting); + } + + @Override + @SuppressWarnings("RedundantIfStatement") + public boolean equals(final Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ConsumesProducesAcceptor)) { + return false; + } + + final ConsumesProducesAcceptor that = (ConsumesProducesAcceptor) o; + + if (consumes != null ? !consumes.equals(that.consumes) : that.consumes != null) { + return false; + } + if (methodRouting != null ? !methodRouting.equals(that.methodRouting) : that.methodRouting != null) { + return false; + } + if (produces != null ? !produces.equals(that.produces) : that.produces != null) { + return false; + } + + return true; + } + + @Override + public int hashCode() { + int result = consumes != null ? consumes.hashCode() : 0; + result = 31 * result + (produces != null ? produces.hashCode() : 0); + result = 31 * result + (methodRouting != null ? methodRouting.hashCode() : 0); + return result; + } + } + + /** + * Helper class to select matching resource method to be invoked. + */ + private static class MethodSelector { + + RequestSpecificConsumesProducesAcceptor selected; + List sameFitnessAcceptors; + + MethodSelector(RequestSpecificConsumesProducesAcceptor i) { + selected = i; + sameFitnessAcceptors = null; + } + + void consider(RequestSpecificConsumesProducesAcceptor i) { + final int theLessTheBetter = i.compareTo(selected); + if (theLessTheBetter < 0) { + selected = i; + sameFitnessAcceptors = null; + } else { + if (theLessTheBetter == 0 && (selected.getMethodRouting() != i.getMethodRouting())) { + getSameFitnessList().add(i); + } + } + } + + List getSameFitnessList() { + if (sameFitnessAcceptors == null) { + sameFitnessAcceptors = new LinkedList<>(); + } + return sameFitnessAcceptors; + } + } + + private Router createInternalRouter() { + return new Router() { + + @Override + public Continuation apply(RequestProcessingContext requestContext) { + return Continuation.of(requestContext, getMethodRouter(requestContext)); + } + }; + } + + @Override + public Continuation apply(RequestProcessingContext requestContext) { + return router.apply(requestContext); + } + + private void addAllConsumesProducesCombinations(final List acceptors, + final MethodRouting methodRouting) { + final ResourceMethod resourceMethod = methodRouting.method; + + final Set effectiveInputTypes = new LinkedHashSet<>(); + boolean consumesFromWorkers = fillMediaTypes(effectiveInputTypes, resourceMethod, + resourceMethod.getConsumedTypes(), true); + + final Set effectiveOutputTypes = new LinkedHashSet<>(); + boolean producesFromWorkers = fillMediaTypes(effectiveOutputTypes, resourceMethod, + resourceMethod.getProducedTypes(), false); + + final Set acceptorSet = new HashSet<>(); + for (MediaType consumes : effectiveInputTypes) { + for (MediaType produces : effectiveOutputTypes) { + + acceptorSet.add(createConsumesProducesAcceptor( + new CombinedMediaType.EffectiveMediaType(consumes, consumesFromWorkers), + new CombinedMediaType.EffectiveMediaType(produces, producesFromWorkers), + methodRouting)); + } + } + acceptors.addAll(acceptorSet); + } + + private boolean fillMediaTypes(final Set effectiveTypes, + final ResourceMethod resourceMethod, + final List methodTypes, + final boolean inputTypes) { + + // Add method types to the resulting list iff there is more than just */* + if (methodTypes.size() > 1 || !methodTypes.contains(MediaType.WILDCARD_TYPE)) { + effectiveTypes.addAll(methodTypes); + } + + boolean mediaTypesFromWorkers = effectiveTypes.isEmpty(); + if (mediaTypesFromWorkers) { + final Invocable invocableMethod = resourceMethod.getInvocable(); + + // If not predefined from method - get it from workers. + if (inputTypes) { + fillInputTypesFromWorkers(effectiveTypes, invocableMethod); + } else { + fillOutputTypesFromWorkers(effectiveTypes, invocableMethod.getRawResponseType()); + } + mediaTypesFromWorkers = !effectiveTypes.isEmpty(); + + // If still empty - get all available. + if (!mediaTypesFromWorkers) { + if (inputTypes) { + effectiveTypes.addAll(workers.getMessageBodyReaderMediaTypesByType(Object.class)); + } else { + effectiveTypes.addAll(workers.getMessageBodyWriterMediaTypesByType(Object.class)); + } + mediaTypesFromWorkers = true; + } + + // As a last resort add */* when no message providers are in effect + // i.e. if no entity arg in resource method for a reader not to throw 415 + // and if void return type for a writer not to throw 406. + final boolean noEntityArgInResourceMethod = inputTypes && getEntityParam(invocableMethod) == null; + final boolean voidReturnType = !inputTypes && invocableMethod.getRawResponseType() == void.class; + if (noEntityArgInResourceMethod || voidReturnType) { + effectiveTypes.add(MediaType.WILDCARD_TYPE); + } + } + + return mediaTypesFromWorkers; + } + + private void fillOutputTypesFromWorkers(final Set effectiveOutputTypes, final Class returnEntityType) { + effectiveOutputTypes.addAll(workers.getMessageBodyWriterMediaTypesByType(returnEntityType)); + } + + private void fillInputTypesFromWorkers(final Set effectiveInputTypes, final Invocable invocableMethod) { + for (Parameter p : invocableMethod.getParameters()) { + if (p.getSource() == Parameter.Source.ENTITY) { + effectiveInputTypes.addAll(workers.getMessageBodyReaderMediaTypesByType(p.getRawType())); + + // there's at most one entity parameter + break; + } + } + } + + private Parameter getEntityParam(final Invocable invocable) { + for (final Parameter parameter : invocable.getParameters()) { + if (parameter.getSource() == Parameter.Source.ENTITY + && !ContainerRequestContext.class.isAssignableFrom(parameter.getRawType())) { + // there's at most one entity parameter + return parameter; + } + } + return null; + } + + private List getMethodRouter(final RequestProcessingContext context) { + final ContainerRequest request = context.request(); + final List acceptors = consumesProducesAcceptors.get(request.getMethod()); + if (acceptors == null) { + throw new NotAllowedException( + Response.status(Response.Status.METHOD_NOT_ALLOWED).allow(consumesProducesAcceptors.keySet()).build()); + } + + final List satisfyingAcceptors = new LinkedList<>(); + final Set differentInvokableMethods = Collections.newSetFromMap(new IdentityHashMap<>()); + for (ConsumesProducesAcceptor cpi : acceptors) { + if (cpi.isConsumable(request)) { + satisfyingAcceptors.add(cpi); + differentInvokableMethods.add(cpi.methodRouting.method); + } + } + if (satisfyingAcceptors.isEmpty()) { + throw new NotSupportedException(); + } + + final List acceptableMediaTypes = request.getQualifiedAcceptableMediaTypes(); + + final MediaType requestContentType = request.getMediaType(); + final MediaType effectiveContentType = requestContentType == null ? MediaType.WILDCARD_TYPE : requestContentType; + + final MethodSelector methodSelector = selectMethod(acceptableMediaTypes, satisfyingAcceptors, effectiveContentType, + differentInvokableMethods.size() == 1); + + if (methodSelector.selected != null) { + final RequestSpecificConsumesProducesAcceptor selected = methodSelector.selected; + + if (methodSelector.sameFitnessAcceptors != null) { + reportMethodSelectionAmbiguity(acceptableMediaTypes, methodSelector.selected, + methodSelector.sameFitnessAcceptors); + } + + context.push(new Function() { + @Override + public ContainerResponse apply(final ContainerResponse responseContext) { + // we only need to compute and set the effective media type if: + // - it hasn't been set already, and + // - either there is an entity, or we are responding to a HEAD request + if (responseContext.getMediaType() == null + && ((responseContext.hasEntity() || HttpMethod.HEAD.equals(request.getMethod())))) { + + MediaType effectiveResponseType = determineResponseMediaType( + responseContext.getEntityClass(), + responseContext.getEntityType(), + methodSelector.selected, + acceptableMediaTypes); + + if (MediaTypes.isWildcard(effectiveResponseType)) { + if (effectiveResponseType.isWildcardType() + || "application".equalsIgnoreCase(effectiveResponseType.getType())) { + effectiveResponseType = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } else { + throw new NotAcceptableException(); + } + } + responseContext.setMediaType(effectiveResponseType); + } + + return responseContext; + } + }); + return selected.getMethodRouting().routers; + } + + throw new NotAcceptableException(); + } + + /** + * Determine the {@link MediaType} of the {@link Response} based on writers suitable for the given entity class, + * pre-selected method and acceptable media types. + * + * @param entityClass entity class to determine the media type for. + * @param entityType entity type for writers. + * @param selectedMethod pre-selected (invoked) method. + * @param acceptableMediaTypes acceptable media types from request. + * @return media type of the response. + */ + private MediaType determineResponseMediaType( + final Class entityClass, + final Type entityType, + final RequestSpecificConsumesProducesAcceptor selectedMethod, + final List acceptableMediaTypes) { + + // Return pre-selected MediaType. + if (usePreSelectedMediaType(selectedMethod, acceptableMediaTypes)) { + return selectedMethod.getProduces().getCombinedType(); + } + + final ResourceMethod resourceMethod = selectedMethod.getMethodRouting().method; + final Invocable invocable = resourceMethod.getInvocable(); + + // Entity class can be null when considering HEAD method || empty entity. + final Class responseEntityClass = entityClass == null ? invocable.getRawRoutingResponseType() : entityClass; + final Method handlingMethod = invocable.getHandlingMethod(); + + // Media types producible by method. + final List methodProducesTypes = !resourceMethod.getProducedTypes().isEmpty() + ? resourceMethod.getProducedTypes() : Collections.singletonList(MediaType.WILDCARD_TYPE); + + return super.determineResponseMediaType(responseEntityClass, entityType, selectedMethod, acceptableMediaTypes, + methodProducesTypes, handlingMethod.getDeclaredAnnotations()); + } + + private static boolean usePreSelectedMediaType(final RequestSpecificConsumesProducesAcceptor selectedMethod, + final List acceptableMediaTypes) { + // Resource method is annotated with @Produces and this annotation contains only one MediaType. + if (!selectedMethod.producesFromProviders() + && selectedMethod.getMethodRouting().method.getProducedTypes().size() == 1) { + return true; + } + + // There is only one (non-wildcard) acceptable media type - at this point the pre-selected method has to be chosen so + // there are compatible writers (not necessarily writeable ones). + return acceptableMediaTypes.size() == 1 && !MediaTypes.isWildcard(acceptableMediaTypes.get(0)); + } + + private boolean isWriteable(final RequestSpecificConsumesProducesAcceptor candidate) { + final Invocable invocable = candidate.getMethodRouting().method.getInvocable(); + final Class responseType = Primitives.wrap(invocable.getRawRoutingResponseType()); + + if (Response.class.isAssignableFrom(responseType) + || Void.class.isAssignableFrom(responseType)) { + return true; + } + + final Type genericType = invocable.getRoutingResponseType(); + + final Type genericReturnType = genericType instanceof GenericType + ? ((GenericType) genericType).getType() : genericType; + + for (final WriterModel model : workers.getWritersModelsForType(responseType)) { + if (model.isWriteable( + responseType, + genericReturnType, + invocable.getHandlingMethod().getDeclaredAnnotations(), + candidate.getProduces().getCombinedType())) { + return true; + } + } + + return false; + } + + private boolean isReadable(final RequestSpecificConsumesProducesAcceptor candidate) { + final Invocable invocable = candidate.getMethodRouting().method.getInvocable(); + final Method handlingMethod = invocable.getHandlingMethod(); + final Parameter entityParam = getEntityParam(invocable); + + if (entityParam == null) { + return true; + } else { + final Class entityType = entityParam.getRawType(); + + for (final ReaderModel model : workers.getReaderModelsForType(entityType)) { + if (model.isReadable( + entityType, + entityParam.getType(), + handlingMethod.getDeclaredAnnotations(), + candidate.getConsumes().getCombinedType())) { + return true; + } + } + } + + return false; + } + + /** + * Select method to be invoked. Method is chosen among the given set of acceptors (if they are compatible with acceptable + * media types). + * + * @param acceptableMediaTypes media types acceptable by the client. + * @param satisfyingAcceptors pre-computed acceptors. + * @param effectiveContentType media type of incoming entity. + * @param singleInvokableMethod flag determining whether only one method to be invoked has been found among satisfying + * acceptors. + * @return method to be invoked. + */ + private MethodSelector selectMethod(final List acceptableMediaTypes, + final List satisfyingAcceptors, + final MediaType effectiveContentType, + final boolean singleInvokableMethod) { + + // Selected method we have a reader and writer for. + final MethodSelector method = new MethodSelector(null); + // If we cannot find a writer at this point use the best alternative. + final MethodSelector alternative = new MethodSelector(null); + + for (final MediaType acceptableMediaType : acceptableMediaTypes) { + for (final ConsumesProducesAcceptor satisfiable : satisfyingAcceptors) { + + final CombinedMediaType produces = + CombinedMediaType.create(acceptableMediaType, satisfiable.produces); + + if (produces != CombinedMediaType.NO_MATCH) { + final CombinedMediaType consumes = + CombinedMediaType.create(effectiveContentType, satisfiable.consumes); + final RequestSpecificConsumesProducesAcceptor candidate = + new RequestSpecificConsumesProducesAcceptor<>( + consumes, + produces, + satisfiable.produces.isDerived(), + satisfiable.methodRouting); + + if (singleInvokableMethod) { + // Only one possible method and it's compatible. + return new MethodSelector(candidate); + } else if (candidate.compareTo(method.selected) < 0) { + // Candidate is better than the previous one. + if (method.selected == null + || candidate.getMethodRouting().method != method.selected.getMethodRouting().method) { + // No candidate so far or better candidate. + if (isReadable(candidate) && isWriteable(candidate)) { + method.consider(candidate); + } else { + alternative.consider(candidate); + } + } else { + // Same resource method - better candidate, no need to compare anything else. + method.consider(candidate); + } + } + } + } + } + + return method.selected != null ? method : alternative; + } + + private void reportMethodSelectionAmbiguity(List acceptableTypes, + RequestSpecificConsumesProducesAcceptor selected, + List sameFitnessAcceptors) { + if (LOGGER.isLoggable(Level.WARNING)) { + StringBuilder msgBuilder = + new StringBuilder(LocalizationMessages.AMBIGUOUS_RESOURCE_METHOD(acceptableTypes)).append('\n'); + msgBuilder.append('\t').append(selected.getMethodRouting().method).append('\n'); + final Set reportedMethods = new HashSet<>(); + reportedMethods.add(selected.getMethodRouting().method); + for (RequestSpecificConsumesProducesAcceptor i : sameFitnessAcceptors) { + if (!reportedMethods.contains(i.getMethodRouting().method)) { + msgBuilder.append('\t').append(i.getMethodRouting().method).append('\n'); + } + reportedMethods.add(i.getMethodRouting().method); + } + LOGGER.log(Level.WARNING, msgBuilder.toString()); + } + } + + private Router createHeadEnrichedRouter() { + return new Router() { + + @Override + public Continuation apply(final RequestProcessingContext context) { + final ContainerRequest request = context.request(); + if (HttpMethod.HEAD.equals(request.getMethod())) { + request.setMethodWithoutException(HttpMethod.GET); + context.push( + new Function() { + @Override + public ContainerResponse apply(final ContainerResponse responseContext) { + responseContext.getRequestContext().setMethodWithoutException(HttpMethod.HEAD); + return responseContext; + } + } + ); + } + return Continuation.of(context, getMethodRouter(context)); + } + }; + } +} diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter.java index b9a57b1925..70f9218621 100644 --- a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter.java +++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter.java @@ -16,48 +16,11 @@ package org.glassfish.jersey.server.internal.routing; -import java.lang.reflect.Method; -import java.lang.reflect.Type; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.IdentityHashMap; -import java.util.LinkedHashSet; -import java.util.LinkedList; import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.function.Function; -import java.util.logging.Level; -import java.util.logging.Logger; - -import jakarta.ws.rs.HttpMethod; -import jakarta.ws.rs.NotAcceptableException; -import jakarta.ws.rs.NotAllowedException; -import jakarta.ws.rs.NotSupportedException; -import jakarta.ws.rs.container.ContainerRequestContext; -import jakarta.ws.rs.core.GenericType; import jakarta.ws.rs.core.MediaType; -import jakarta.ws.rs.core.Response; -import jakarta.ws.rs.core.Response.Status; - -import org.glassfish.jersey.internal.guava.Primitives; -import org.glassfish.jersey.internal.routing.ContentTypeDeterminer; import org.glassfish.jersey.internal.routing.CombinedMediaType; -import org.glassfish.jersey.internal.routing.RequestSpecificConsumesProducesAcceptor; import org.glassfish.jersey.message.MessageBodyWorkers; -import org.glassfish.jersey.message.ReaderModel; -import org.glassfish.jersey.message.WriterModel; -import org.glassfish.jersey.message.internal.AcceptableMediaType; -import org.glassfish.jersey.message.internal.MediaTypes; import org.glassfish.jersey.server.ContainerRequest; -import org.glassfish.jersey.server.ContainerResponse; -import org.glassfish.jersey.server.internal.LocalizationMessages; -import org.glassfish.jersey.server.internal.process.RequestProcessingContext; -import org.glassfish.jersey.server.model.Invocable; -import org.glassfish.jersey.server.model.Parameter; -import org.glassfish.jersey.server.model.ResourceMethod; /** * A single router responsible for selecting a single method from all the methods @@ -70,50 +33,7 @@ * @author Jakub Podlesak * @author Marek Potociar */ -final class MethodSelectingRouter extends ContentTypeDeterminer implements Router { - - private static final Logger LOGGER = Logger.getLogger(MethodSelectingRouter.class.getName()); - - private static final Comparator CONSUMES_PRODUCES_ACCEPTOR_COMPARATOR = - new Comparator() { - - @Override - public int compare(final ConsumesProducesAcceptor o1, final ConsumesProducesAcceptor o2) { - // Make sure that annotated (@Consumes, @Produces) goes first. - final ResourceMethod model1 = o1.methodRouting.method; - final ResourceMethod model2 = o2.methodRouting.method; - - // @Consumes on method. - int compared = compare(model1.getConsumedTypes(), model2.getConsumedTypes()); - if (compared != 0) { - return compared; - } - - compared = compare(model1.getProducedTypes(), model2.getProducedTypes()); - if (compared != 0) { - return compared; - } - - compared = MediaTypes.PARTIAL_ORDER_COMPARATOR.compare(o1.consumes.getMediaType(), - o2.consumes.getMediaType()); - if (compared != 0) { - return compared; - } - - return MediaTypes.PARTIAL_ORDER_COMPARATOR.compare(o1.produces.getMediaType(), - o2.produces.getMediaType()); - } - - private int compare(List mediaTypeList1, List mediaTypeList2) { - mediaTypeList1 = mediaTypeList1.isEmpty() ? MediaTypes.WILDCARD_TYPE_SINGLETON_LIST : mediaTypeList1; - mediaTypeList2 = mediaTypeList2.isEmpty() ? MediaTypes.WILDCARD_TYPE_SINGLETON_LIST : mediaTypeList2; - - return MediaTypes.MEDIA_TYPE_LIST_COMPARATOR.compare(mediaTypeList1, mediaTypeList2); - } - }; - - private final Map> consumesProducesAcceptors; - private final Router router; +final class MethodSelectingRouter extends AbstractMethodSelectingRouter implements Router { /** * Create a new {@code MethodSelectingRouter} for all the methods on the same path. @@ -125,86 +45,23 @@ private int compare(List mediaTypeList1, List mediaTypeLis * @param methodRoutings [method model, method methodAcceptorPair] pairs. */ MethodSelectingRouter(MessageBodyWorkers workers, List methodRoutings) { - super(workers); - - this.consumesProducesAcceptors = new HashMap<>(); - - final Set httpMethods = new HashSet<>(); - for (final MethodRouting methodRouting : methodRoutings) { - final String httpMethod = methodRouting.method.getHttpMethod(); - httpMethods.add(httpMethod); - - List httpMethodBoundAcceptors = consumesProducesAcceptors.get(httpMethod); - if (httpMethodBoundAcceptors == null) { - httpMethodBoundAcceptors = new LinkedList<>(); - consumesProducesAcceptors.put(httpMethod, httpMethodBoundAcceptors); - } - - addAllConsumesProducesCombinations(httpMethodBoundAcceptors, methodRouting); - } - - // Sort acceptors for added HTTP methods - primary based on @Consumes, @Produces present on method, secondary on consumes, - // produces values of the acceptor. - for (final String httpMethod : httpMethods) { - Collections.sort(consumesProducesAcceptors.get(httpMethod), CONSUMES_PRODUCES_ACCEPTOR_COMPARATOR); - } - - if (!consumesProducesAcceptors.containsKey(HttpMethod.HEAD)) { - this.router = createHeadEnrichedRouter(); - } else { - this.router = createInternalRouter(); - } + super(workers, methodRoutings); } - Set getHttpMethods() { - return consumesProducesAcceptors.keySet(); + @Override + protected AbstractMethodSelectingRouter.ConsumesProducesAcceptor createConsumesProducesAcceptor( + CombinedMediaType.EffectiveMediaType consumes, + CombinedMediaType.EffectiveMediaType produces, + MethodRouting methodRouting) { + return new ConsumesProducesAcceptor(consumes, produces, methodRouting); } - /** - * Represents a 1-1-1 relation between input and output media type and an methodAcceptorPair. - *

E.g. for a single resource method - *

-     *   @Consumes("*/*")
-     *   @Produces("text/plain","text/html")
-     *   @GET
-     *   public String myGetMethod() {
-     *     return "S";
-     *   }
-     * 
- * the following two relations would be generated: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
consumesproducesmethod
*/*text/plainmyGetMethod
*/*text/htmlmyGetMethod
- */ - private static class ConsumesProducesAcceptor { - - final CombinedMediaType.EffectiveMediaType consumes; - final CombinedMediaType.EffectiveMediaType produces; - final MethodRouting methodRouting; - + private static class ConsumesProducesAcceptor extends AbstractMethodSelectingRouter.ConsumesProducesAcceptor { private ConsumesProducesAcceptor( CombinedMediaType.EffectiveMediaType consumes, CombinedMediaType.EffectiveMediaType produces, MethodRouting methodRouting) { - this.methodRouting = methodRouting; - this.consumes = consumes; - this.produces = produces; + super(consumes, produces, methodRouting); } /** @@ -215,464 +72,8 @@ private ConsumesProducesAcceptor( */ boolean isConsumable(ContainerRequest requestContext) { MediaType contentType = requestContext.getMediaType(); - return contentType == null || consumes.getMediaType().isCompatible(contentType); - } - - @Override - public String toString() { - return String.format("%s->%s:%s", consumes.getMediaType(), produces.getMediaType(), methodRouting); - } - - @Override - @SuppressWarnings("RedundantIfStatement") - public boolean equals(final Object o) { - if (this == o) { - return true; - } - if (!(o instanceof ConsumesProducesAcceptor)) { - return false; - } - - final ConsumesProducesAcceptor that = (ConsumesProducesAcceptor) o; - - if (consumes != null ? !consumes.equals(that.consumes) : that.consumes != null) { - return false; - } - if (methodRouting != null ? !methodRouting.equals(that.methodRouting) : that.methodRouting != null) { - return false; - } - if (produces != null ? !produces.equals(that.produces) : that.produces != null) { - return false; - } - - return true; - } - - @Override - public int hashCode() { - int result = consumes != null ? consumes.hashCode() : 0; - result = 31 * result + (produces != null ? produces.hashCode() : 0); - result = 31 * result + (methodRouting != null ? methodRouting.hashCode() : 0); - return result; - } - } - - /** - * Helper class to select matching resource method to be invoked. - */ - private static class MethodSelector { - - RequestSpecificConsumesProducesAcceptor selected; - List sameFitnessAcceptors; - - MethodSelector(RequestSpecificConsumesProducesAcceptor i) { - selected = i; - sameFitnessAcceptors = null; - } - - void consider(RequestSpecificConsumesProducesAcceptor i) { - final int theLessTheBetter = i.compareTo(selected); - if (theLessTheBetter < 0) { - selected = i; - sameFitnessAcceptors = null; - } else { - if (theLessTheBetter == 0 && (selected.getMethodRouting() != i.getMethodRouting())) { - getSameFitnessList().add(i); - } - } - } - - List getSameFitnessList() { - if (sameFitnessAcceptors == null) { - sameFitnessAcceptors = new LinkedList<>(); - } - return sameFitnessAcceptors; - } - } - - private Router createInternalRouter() { - return new Router() { - - @Override - public Continuation apply(RequestProcessingContext requestContext) { - return Continuation.of(requestContext, getMethodRouter(requestContext)); - } - }; - } - - @Override - public Continuation apply(RequestProcessingContext requestContext) { - return router.apply(requestContext); - } - - private void addAllConsumesProducesCombinations(final List acceptors, - final MethodRouting methodRouting) { - final ResourceMethod resourceMethod = methodRouting.method; - - final Set effectiveInputTypes = new LinkedHashSet<>(); - boolean consumesFromWorkers = fillMediaTypes(effectiveInputTypes, resourceMethod, - resourceMethod.getConsumedTypes(), true); - - final Set effectiveOutputTypes = new LinkedHashSet<>(); - boolean producesFromWorkers = fillMediaTypes(effectiveOutputTypes, resourceMethod, - resourceMethod.getProducedTypes(), false); - - final Set acceptorSet = new HashSet<>(); - for (MediaType consumes : effectiveInputTypes) { - for (MediaType produces : effectiveOutputTypes) { - - acceptorSet.add(new ConsumesProducesAcceptor( - new CombinedMediaType.EffectiveMediaType(consumes, consumesFromWorkers), - new CombinedMediaType.EffectiveMediaType(produces, producesFromWorkers), - methodRouting)); - } - } - acceptors.addAll(acceptorSet); - } - - private boolean fillMediaTypes(final Set effectiveTypes, - final ResourceMethod resourceMethod, - final List methodTypes, - final boolean inputTypes) { - - // Add method types to the resulting list iff there is more than just */* - if (methodTypes.size() > 1 || !methodTypes.contains(MediaType.WILDCARD_TYPE)) { - effectiveTypes.addAll(methodTypes); + contentType = contentType == null ? MediaType.APPLICATION_OCTET_STREAM_TYPE : contentType; + return consumes.getMediaType().isCompatible(contentType); } - - boolean mediaTypesFromWorkers = effectiveTypes.isEmpty(); - if (mediaTypesFromWorkers) { - final Invocable invocableMethod = resourceMethod.getInvocable(); - - // If not predefined from method - get it from workers. - if (inputTypes) { - fillInputTypesFromWorkers(effectiveTypes, invocableMethod); - } else { - fillOutputTypesFromWorkers(effectiveTypes, invocableMethod.getRawResponseType()); - } - mediaTypesFromWorkers = !effectiveTypes.isEmpty(); - - // If still empty - get all available. - if (!mediaTypesFromWorkers) { - if (inputTypes) { - effectiveTypes.addAll(workers.getMessageBodyReaderMediaTypesByType(Object.class)); - } else { - effectiveTypes.addAll(workers.getMessageBodyWriterMediaTypesByType(Object.class)); - } - mediaTypesFromWorkers = true; - } - - // As a last resort add */* when no message providers are in effect - // i.e. if no entity arg in resource method for a reader not to throw 415 - // and if void return type for a writer not to throw 406. - final boolean noEntityArgInResourceMethod = inputTypes && getEntityParam(invocableMethod) == null; - final boolean voidReturnType = !inputTypes && invocableMethod.getRawResponseType() == void.class; - if (noEntityArgInResourceMethod || voidReturnType) { - effectiveTypes.add(MediaType.WILDCARD_TYPE); - } - } - - return mediaTypesFromWorkers; - } - - private void fillOutputTypesFromWorkers(final Set effectiveOutputTypes, final Class returnEntityType) { - effectiveOutputTypes.addAll(workers.getMessageBodyWriterMediaTypesByType(returnEntityType)); - } - - private void fillInputTypesFromWorkers(final Set effectiveInputTypes, final Invocable invocableMethod) { - for (Parameter p : invocableMethod.getParameters()) { - if (p.getSource() == Parameter.Source.ENTITY) { - effectiveInputTypes.addAll(workers.getMessageBodyReaderMediaTypesByType(p.getRawType())); - - // there's at most one entity parameter - break; - } - } - } - - private Parameter getEntityParam(final Invocable invocable) { - for (final Parameter parameter : invocable.getParameters()) { - if (parameter.getSource() == Parameter.Source.ENTITY - && !ContainerRequestContext.class.isAssignableFrom(parameter.getRawType())) { - // there's at most one entity parameter - return parameter; - } - } - return null; - } - - private List getMethodRouter(final RequestProcessingContext context) { - final ContainerRequest request = context.request(); - final List acceptors = consumesProducesAcceptors.get(request.getMethod()); - if (acceptors == null) { - throw new NotAllowedException( - Response.status(Status.METHOD_NOT_ALLOWED).allow(consumesProducesAcceptors.keySet()).build()); - } - - final List satisfyingAcceptors = new LinkedList<>(); - final Set differentInvokableMethods = Collections.newSetFromMap(new IdentityHashMap<>()); - for (ConsumesProducesAcceptor cpi : acceptors) { - if (cpi.isConsumable(request)) { - satisfyingAcceptors.add(cpi); - differentInvokableMethods.add(cpi.methodRouting.method); - } - } - if (satisfyingAcceptors.isEmpty()) { - throw new NotSupportedException(); - } - - final List acceptableMediaTypes = request.getQualifiedAcceptableMediaTypes(); - - final MediaType requestContentType = request.getMediaType(); - final MediaType effectiveContentType = requestContentType == null ? MediaType.WILDCARD_TYPE : requestContentType; - - final MethodSelector methodSelector = selectMethod(acceptableMediaTypes, satisfyingAcceptors, effectiveContentType, - differentInvokableMethods.size() == 1); - - if (methodSelector.selected != null) { - final RequestSpecificConsumesProducesAcceptor selected = methodSelector.selected; - - if (methodSelector.sameFitnessAcceptors != null) { - reportMethodSelectionAmbiguity(acceptableMediaTypes, methodSelector.selected, - methodSelector.sameFitnessAcceptors); - } - - context.push(new Function() { - @Override - public ContainerResponse apply(final ContainerResponse responseContext) { - // we only need to compute and set the effective media type if: - // - it hasn't been set already, and - // - either there is an entity, or we are responding to a HEAD request - if (responseContext.getMediaType() == null - && ((responseContext.hasEntity() || HttpMethod.HEAD.equals(request.getMethod())))) { - - MediaType effectiveResponseType = determineResponseMediaType( - responseContext.getEntityClass(), - responseContext.getEntityType(), - methodSelector.selected, - acceptableMediaTypes); - - if (MediaTypes.isWildcard(effectiveResponseType)) { - if (effectiveResponseType.isWildcardType() - || "application".equalsIgnoreCase(effectiveResponseType.getType())) { - effectiveResponseType = MediaType.APPLICATION_OCTET_STREAM_TYPE; - } else { - throw new NotAcceptableException(); - } - } - responseContext.setMediaType(effectiveResponseType); - } - - return responseContext; - } - }); - return selected.getMethodRouting().routers; - } - - throw new NotAcceptableException(); - } - - /** - * Determine the {@link MediaType} of the {@link Response} based on writers suitable for the given entity class, - * pre-selected method and acceptable media types. - * - * @param entityClass entity class to determine the media type for. - * @param entityType entity type for writers. - * @param selectedMethod pre-selected (invoked) method. - * @param acceptableMediaTypes acceptable media types from request. - * @return media type of the response. - */ - private MediaType determineResponseMediaType( - final Class entityClass, - final Type entityType, - final RequestSpecificConsumesProducesAcceptor selectedMethod, - final List acceptableMediaTypes) { - - // Return pre-selected MediaType. - if (usePreSelectedMediaType(selectedMethod, acceptableMediaTypes)) { - return selectedMethod.getProduces().getCombinedType(); - } - - final ResourceMethod resourceMethod = selectedMethod.getMethodRouting().method; - final Invocable invocable = resourceMethod.getInvocable(); - - // Entity class can be null when considering HEAD method || empty entity. - final Class responseEntityClass = entityClass == null ? invocable.getRawRoutingResponseType() : entityClass; - final Method handlingMethod = invocable.getHandlingMethod(); - - // Media types producible by method. - final List methodProducesTypes = !resourceMethod.getProducedTypes().isEmpty() - ? resourceMethod.getProducedTypes() : Collections.singletonList(MediaType.WILDCARD_TYPE); - - return super.determineResponseMediaType(responseEntityClass, entityType, selectedMethod, acceptableMediaTypes, - methodProducesTypes, handlingMethod.getDeclaredAnnotations()); - } - - private static boolean usePreSelectedMediaType(final RequestSpecificConsumesProducesAcceptor selectedMethod, - final List acceptableMediaTypes) { - // Resource method is annotated with @Produces and this annotation contains only one MediaType. - if (!selectedMethod.producesFromProviders() - && selectedMethod.getMethodRouting().method.getProducedTypes().size() == 1) { - return true; - } - - // There is only one (non-wildcard) acceptable media type - at this point the pre-selected method has to be chosen so - // there are compatible writers (not necessarily writeable ones). - return acceptableMediaTypes.size() == 1 && !MediaTypes.isWildcard(acceptableMediaTypes.get(0)); - } - - private boolean isWriteable(final RequestSpecificConsumesProducesAcceptor candidate) { - final Invocable invocable = candidate.getMethodRouting().method.getInvocable(); - final Class responseType = Primitives.wrap(invocable.getRawRoutingResponseType()); - - if (Response.class.isAssignableFrom(responseType) - || Void.class.isAssignableFrom(responseType)) { - return true; - } - - final Type genericType = invocable.getRoutingResponseType(); - - final Type genericReturnType = genericType instanceof GenericType - ? ((GenericType) genericType).getType() : genericType; - - for (final WriterModel model : workers.getWritersModelsForType(responseType)) { - if (model.isWriteable( - responseType, - genericReturnType, - invocable.getHandlingMethod().getDeclaredAnnotations(), - candidate.getProduces().getCombinedType())) { - return true; - } - } - - return false; - } - - private boolean isReadable(final RequestSpecificConsumesProducesAcceptor candidate) { - final Invocable invocable = candidate.getMethodRouting().method.getInvocable(); - final Method handlingMethod = invocable.getHandlingMethod(); - final Parameter entityParam = getEntityParam(invocable); - - if (entityParam == null) { - return true; - } else { - final Class entityType = entityParam.getRawType(); - - for (final ReaderModel model : workers.getReaderModelsForType(entityType)) { - if (model.isReadable( - entityType, - entityParam.getType(), - handlingMethod.getDeclaredAnnotations(), - candidate.getConsumes().getCombinedType())) { - return true; - } - } - } - - return false; - } - - /** - * Select method to be invoked. Method is chosen among the given set of acceptors (if they are compatible with acceptable - * media types). - * - * @param acceptableMediaTypes media types acceptable by the client. - * @param satisfyingAcceptors pre-computed acceptors. - * @param effectiveContentType media type of incoming entity. - * @param singleInvokableMethod flag determining whether only one method to be invoked has been found among satisfying - * acceptors. - * @return method to be invoked. - */ - private MethodSelector selectMethod(final List acceptableMediaTypes, - final List satisfyingAcceptors, - final MediaType effectiveContentType, - final boolean singleInvokableMethod) { - - // Selected method we have a reader and writer for. - final MethodSelector method = new MethodSelector(null); - // If we cannot find a writer at this point use the best alternative. - final MethodSelector alternative = new MethodSelector(null); - - for (final MediaType acceptableMediaType : acceptableMediaTypes) { - for (final ConsumesProducesAcceptor satisfiable : satisfyingAcceptors) { - - final CombinedMediaType produces = - CombinedMediaType.create(acceptableMediaType, satisfiable.produces); - - if (produces != CombinedMediaType.NO_MATCH) { - final CombinedMediaType consumes = - CombinedMediaType.create(effectiveContentType, satisfiable.consumes); - final RequestSpecificConsumesProducesAcceptor candidate = - new RequestSpecificConsumesProducesAcceptor<>( - consumes, - produces, - satisfiable.produces.isDerived(), - satisfiable.methodRouting); - - if (singleInvokableMethod) { - // Only one possible method and it's compatible. - return new MethodSelector(candidate); - } else if (candidate.compareTo(method.selected) < 0) { - // Candidate is better than the previous one. - if (method.selected == null - || candidate.getMethodRouting().method != method.selected.getMethodRouting().method) { - // No candidate so far or better candidate. - if (isReadable(candidate) && isWriteable(candidate)) { - method.consider(candidate); - } else { - alternative.consider(candidate); - } - } else { - // Same resource method - better candidate, no need to compare anything else. - method.consider(candidate); - } - } - } - } - } - - return method.selected != null ? method : alternative; - } - - private void reportMethodSelectionAmbiguity(List acceptableTypes, - RequestSpecificConsumesProducesAcceptor selected, - List sameFitnessAcceptors) { - if (LOGGER.isLoggable(Level.WARNING)) { - StringBuilder msgBuilder = - new StringBuilder(LocalizationMessages.AMBIGUOUS_RESOURCE_METHOD(acceptableTypes)).append('\n'); - msgBuilder.append('\t').append(selected.getMethodRouting().method).append('\n'); - final Set reportedMethods = new HashSet<>(); - reportedMethods.add(selected.getMethodRouting().method); - for (RequestSpecificConsumesProducesAcceptor i : sameFitnessAcceptors) { - if (!reportedMethods.contains(i.getMethodRouting().method)) { - msgBuilder.append('\t').append(i.getMethodRouting().method).append('\n'); - } - reportedMethods.add(i.getMethodRouting().method); - } - LOGGER.log(Level.WARNING, msgBuilder.toString()); - } - } - - private Router createHeadEnrichedRouter() { - return new Router() { - - @Override - public Continuation apply(final RequestProcessingContext context) { - final ContainerRequest request = context.request(); - if (HttpMethod.HEAD.equals(request.getMethod())) { - request.setMethodWithoutException(HttpMethod.GET); - context.push( - new Function() { - @Override - public ContainerResponse apply(final ContainerResponse responseContext) { - responseContext.getRequestContext().setMethodWithoutException(HttpMethod.HEAD); - return responseContext; - } - } - ); - } - return Continuation.of(context, getMethodRouter(context)); - } - }; } } diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter2x.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter2x.java new file mode 100644 index 0000000000..3fa64a0f1b --- /dev/null +++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter2x.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2012, 2021 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.internal.routing; + +import jakarta.ws.rs.core.MediaType; +import org.glassfish.jersey.internal.routing.CombinedMediaType; +import org.glassfish.jersey.message.MessageBodyWorkers; +import org.glassfish.jersey.server.ContainerRequest; +import java.util.List; + +/** + * A single router responsible for selecting a single method from all the methods + * bound to the same routed request path. + * + * The method selection algorithm selects the handling method based on the HTTP request + * method name, requested media type as well as defined resource method media type + * capabilities. + * + * @author Jakub Podlesak + * @author Marek Potociar + */ +final class MethodSelectingRouter2x extends AbstractMethodSelectingRouter implements Router { + + /** + * Create a new {@code MethodSelectingRouter} for all the methods on the same path. + * + * The router selects the method that best matches the request based on + * produce/consume information from the resource method models. + * + * @param workers message body workers. + * @param methodRoutings [method model, method methodAcceptorPair] pairs. + */ + MethodSelectingRouter2x(MessageBodyWorkers workers, List methodRoutings) { + super(workers, methodRoutings); + } + + @Override + protected AbstractMethodSelectingRouter.ConsumesProducesAcceptor createConsumesProducesAcceptor( + CombinedMediaType.EffectiveMediaType consumes, + CombinedMediaType.EffectiveMediaType produces, + MethodRouting methodRouting) { + return new ConsumesProducesAcceptor(consumes, produces, methodRouting); + } + + private static class ConsumesProducesAcceptor extends AbstractMethodSelectingRouter.ConsumesProducesAcceptor { + + private ConsumesProducesAcceptor( + CombinedMediaType.EffectiveMediaType consumes, + CombinedMediaType.EffectiveMediaType produces, + MethodRouting methodRouting) { + super(consumes, produces, methodRouting); + } + + /** + * Determines whether this {@code ConsumesProducesAcceptor} router can process the {@code request}. + * + * @param requestContext The request to be tested. + * @return True if the {@code request} can be processed by this router, false otherwise. + */ + boolean isConsumable(ContainerRequest requestContext) { + MediaType contentType = requestContext.getMediaType(); + return contentType == null || consumes.getMediaType().isCompatible(contentType); + } + } +} diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/PathMatchingRouterBuilder.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/PathMatchingRouterBuilder.java index 1eebab958f..50570b83cf 100644 --- a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/PathMatchingRouterBuilder.java +++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/PathMatchingRouterBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2021 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 @@ -65,8 +65,9 @@ protected List acceptedRoutes() { @Override public PathMatchingRouterBuilder to(final Router router) { - if (MethodSelectingRouter.class.isInstance(router)) { - acceptedRoutes.get(acceptedRoutes.size() - 1).setHttpMethods(((MethodSelectingRouter) router).getHttpMethods()); + if (AbstractMethodSelectingRouter.class.isInstance(router)) { + acceptedRoutes.get(acceptedRoutes.size() - 1) + .setHttpMethods(((AbstractMethodSelectingRouter) router).getHttpMethods()); } currentRouters.add(router); return this; diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/RuntimeModelBuilder.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/RuntimeModelBuilder.java index eb45047f7d..ee69bf787f 100644 --- a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/RuntimeModelBuilder.java +++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/RuntimeModelBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2021 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.Collections; import java.util.List; +import java.util.Properties; import java.util.function.Function; import jakarta.ws.rs.core.Configuration; @@ -27,6 +28,7 @@ import org.glassfish.jersey.internal.util.collection.Value; import org.glassfish.jersey.internal.util.collection.Values; import org.glassfish.jersey.message.MessageBodyWorkers; +import org.glassfish.jersey.server.ServerProperties; import org.glassfish.jersey.server.internal.JerseyResourceContext; import org.glassfish.jersey.server.internal.ProcessingProviders; import org.glassfish.jersey.server.internal.process.Endpoint; @@ -55,6 +57,7 @@ final class RuntimeModelBuilder { // SubResourceLocator Model Builder. private final Value locatorBuilder; + private final boolean is2xMethodSelectingRouter; /** * Create a new instance of the runtime model builder. @@ -83,6 +86,8 @@ public RuntimeModelBuilder( this.locatorBuilder = Values.lazy((Value) () -> new RuntimeLocatorModelBuilder(config, messageBodyWorkers, valueSuppliers, resourceContext, RuntimeModelBuilder.this, modelProcessors, createServiceFunction)); + this.is2xMethodSelectingRouter = ServerProperties.getValue(config.getProperties(), + ServerProperties.EMPTY_REQUEST_MEDIA_TYPE_MATCHES_ANY_CONSUMES, false); } private Router createMethodRouter(final ResourceMethod resourceMethod) { @@ -149,7 +154,9 @@ public Router buildModel(final RuntimeResourceModel resourceModel, final boolean // resource methods if (!resource.getResourceMethods().isEmpty()) { final List methodRoutings = createResourceMethodRouters(resource, subResourceMode); - final Router methodSelectingRouter = new MethodSelectingRouter(messageBodyWorkers, methodRoutings); + final Router methodSelectingRouter = is2xMethodSelectingRouter + ? new MethodSelectingRouter2x(messageBodyWorkers, methodRoutings) + : new MethodSelectingRouter(messageBodyWorkers, methodRoutings); if (subResourceMode) { currentRouterBuilder = startNextRoute(currentRouterBuilder, PathPattern.END_OF_PATH_PATTERN) .to(resourcePushingRouter) @@ -178,7 +185,9 @@ public Router buildModel(final RuntimeResourceModel resourceModel, final boolean srRoutedBuilder = startNextRoute(srRoutedBuilder, childClosedPattern) .to(uriPushingRouter) .to(childResourcePushingRouter) - .to(new MethodSelectingRouter(messageBodyWorkers, childMethodRoutings)); + .to(is2xMethodSelectingRouter + ? new MethodSelectingRouter2x(messageBodyWorkers, childMethodRoutings) + : new MethodSelectingRouter(messageBodyWorkers, childMethodRoutings)); } // sub resource locator diff --git a/core-server/src/test/java/org/glassfish/jersey/server/internal/routing/ResponseMediaTypeFromProvidersTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/routing/ResponseMediaTypeFromProvidersTest.java index 512f51bf17..36ee3efce3 100644 --- a/core-server/src/test/java/org/glassfish/jersey/server/internal/routing/ResponseMediaTypeFromProvidersTest.java +++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/routing/ResponseMediaTypeFromProvidersTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2021 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 @@ -81,7 +81,8 @@ public void testSubResource() throws Exception { final ApplicationHandler applicationHandler = new ApplicationHandler(resourceConfig); final ContainerResponse response = applicationHandler.apply( - RequestContextBuilder.from("/resource/subresource/sub", "POST").header("Accept", "text/plain").build()).get(); + RequestContextBuilder.from("/resource/subresource/sub", "POST") + .type("text/plain").header("Accept", "text/plain").build()).get(); assertThat(response.getStatus(), equalTo(200)); assertThat(response.getHeaderString("Content-Type"), equalTo("text/plain")); diff --git a/core-server/src/test/java/org/glassfish/jersey/server/model/AsyncContentAndEntityTypeTest.java b/core-server/src/test/java/org/glassfish/jersey/server/model/AsyncContentAndEntityTypeTest.java index 969a34d4c3..7d5d7ef475 100644 --- a/core-server/src/test/java/org/glassfish/jersey/server/model/AsyncContentAndEntityTypeTest.java +++ b/core-server/src/test/java/org/glassfish/jersey/server/model/AsyncContentAndEntityTypeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021 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 @@ -87,7 +87,7 @@ public ContainerResponse call() throws Exception { ContainerResponse response; // making sure the JVM optimization does not swap the order of the calls. synchronized (this) { - app.apply(RequestContextBuilder.from("/", "POST").entity("Foo").build()); + app.apply(RequestContextBuilder.from("/", "POST").type(foo).entity("Foo").build()); response = responseFuture.get(); } diff --git a/core-server/src/test/java/org/glassfish/jersey/server/model/ConsumeProduceSimpleTest.java b/core-server/src/test/java/org/glassfish/jersey/server/model/ConsumeProduceSimpleTest.java index 5e60f3a8e6..3aff3e87cc 100644 --- a/core-server/src/test/java/org/glassfish/jersey/server/model/ConsumeProduceSimpleTest.java +++ b/core-server/src/test/java/org/glassfish/jersey/server/model/ConsumeProduceSimpleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2021 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 @@ -31,6 +31,7 @@ import org.glassfish.jersey.server.RequestContextBuilder; import org.glassfish.jersey.server.ResourceConfig; +import org.glassfish.jersey.server.ServerProperties; import org.junit.Test; import static org.junit.Assert.assertEquals; @@ -46,6 +47,12 @@ private ApplicationHandler createApplication(Class... classes) { return new ApplicationHandler(new ResourceConfig(classes)); } + private ApplicationHandler create2xApplication(Class... classes) { + return new ApplicationHandler( + new ResourceConfig(classes).property(ServerProperties.EMPTY_REQUEST_MEDIA_TYPE_MATCHES_ANY_CONSUMES, true) + ); + } + @Path("/{arg1}/{arg2}") @Consumes("text/html") public static class ConsumeSimpleBean { @@ -103,6 +110,7 @@ public String doGetHtml() { } @GET + @Consumes("text/xhtml") @Produces("text/xhtml") public String doGetXhtml() { assertEquals("text/xhtml", httpHeaders.getRequestHeader("Accept").get(0)); @@ -142,6 +150,12 @@ public void testConsumeSimpleBean() throws Exception { public void testProduceSimpleBean() throws Exception { ApplicationHandler app = createApplication(ProduceSimpleBean.class); + assertEquals("HTML", app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/html").build()).get().getEntity()); + assertEquals("XHTML", + app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/xhtml").build()).get().getEntity()); + + app = create2xApplication(ProduceSimpleBean.class); + assertEquals("HTML", app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/html").build()).get().getEntity()); assertEquals("XHTML", app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/xhtml").build()).get().getEntity()); @@ -157,6 +171,26 @@ public void testConsumeProduceSimpleBean() throws Exception { assertEquals("XHTML", app.apply(RequestContextBuilder.from("/a/b", "POST").entity("").type("text/xhtml").accept("text/xhtml").build()) .get().getEntity()); + + assertEquals(415, + app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/html").build()) + .get().getStatus() + ); + assertEquals("HTML", + app.apply(RequestContextBuilder.from("/a/b", "GET").type("text/html").accept("text/html").build()) + .get().getEntity() + ); + + assertEquals(415, + app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/xhtml").build()) + .get().getStatus() + ); + assertEquals("XHTML", + app.apply(RequestContextBuilder.from("/a/b", "GET").type("text/xhtml").accept("text/xhtml").build()) + .get().getEntity() + ); + + app = create2xApplication(ConsumeProduceSimpleBean.class); assertEquals("HTML", app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/html").build()).get().getEntity()); assertEquals("XHTML", app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/xhtml").build()).get().getEntity()); diff --git a/docs/src/main/docbook/appendix-properties.xml b/docs/src/main/docbook/appendix-properties.xml index 0e33a385c9..501ff27d74 100644 --- a/docs/src/main/docbook/appendix-properties.xml +++ b/docs/src/main/docbook/appendix-properties.xml @@ -272,6 +272,24 @@ + + &jersey.server.ServerProperties.EMPTY_REQUEST_MEDIA_TYPE_MATCHES_ANY_CONSUMES; + jersey.config.server.empty.request.media.matches.any.consumes + + + When an HTTP request does not contain a media type, the media type should default to + application/octet-stream. In the past, Jersey used to match any + @Consumes when the HTTP Content-Type header was not set. + This property is to preserve the behaviour. Such behaviour is potentially dangerous, though. + The default behaviour is to set the request media type to + application/octet-stream when none set. This is a Jakarta REST requirement. + + + Set this property to true, if the empty request media type is to match any + @Consumes. The default value is false. + + + &jersey.server.ServerProperties.FEATURE_AUTO_DISCOVERY_DISABLE; jersey.config.server.disableAutoDiscovery diff --git a/docs/src/main/docbook/jersey.ent b/docs/src/main/docbook/jersey.ent index 1c8ebd73e6..7c7e824e07 100644 --- a/docs/src/main/docbook/jersey.ent +++ b/docs/src/main/docbook/jersey.ent @@ -538,6 +538,7 @@ ServerProperties.LOCATION_HEADER_RELATIVE_URI_RESOLUTION_DISABLED" > ServerProperties.LOCATION_HEADER_RELATIVE_URI_RESOLUTION_RFC7231" > ServerProperties.UNWRAP_COMPLETION_STAGE_IN_WRITER_ENABLE" > +ServerProperties.EMPTY_REQUEST_MEDIA_TYPE_MATCHES_ANY_CONSUMES" > Uri"> UriConnegFilter"> WadlFeature"> diff --git a/docs/src/main/docbook/migration.xml b/docs/src/main/docbook/migration.xml index e8c27958a6..542edc1a65 100644 --- a/docs/src/main/docbook/migration.xml +++ b/docs/src/main/docbook/migration.xml @@ -95,6 +95,24 @@ Jakarta EE 10. Jakarta EE 10 defines the minimum JDK 11 requirement and hence Jersey no longer supports JDK 8. + + + + Since Jersey 3.1.0 when incoming the HTTP request does not contain content type, the + application/octet-stream is considered, as required by the Jakarta REST + Specification and HTTP/1.1 RFC 2616. As a consequence, a resource method with non-wildcard + @Consumes annotation is not matched with the request without the + Content-Type HTTP header. This is typically the case of HTTP requests without an entity, + such as HTTP GET requests, where the Content-Type header is not set. + + + When using the @Consumes annotation, the Content-Type HTTP header must be set. + The previous behaviour when the missing Content-Type HTTP header matched any resource method + with @Consumes annotation, the + &jersey.server.ServerProperties.EMPTY_REQUEST_MEDIA_TYPE_MATCHES_ANY_CONSUMES; property can be set. + + + &jersey.server.ServerProperties.UNWRAP_COMPLETION_STAGE_IN_WRITER_ENABLE; is by default true. diff --git a/examples/exception-mapping/src/test/java/org/glassfish/jersey/examples/exception/ExceptionMappingFilterTest.java b/examples/exception-mapping/src/test/java/org/glassfish/jersey/examples/exception/ExceptionMappingFilterTest.java index 918c31ccd6..e8c242fae5 100644 --- a/examples/exception-mapping/src/test/java/org/glassfish/jersey/examples/exception/ExceptionMappingFilterTest.java +++ b/examples/exception-mapping/src/test/java/org/glassfish/jersey/examples/exception/ExceptionMappingFilterTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -12,6 +12,8 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.UriBuilder; @@ -66,7 +68,7 @@ public void testWebApplicationExceptionInRequestFilter() { @Test public void testWebApplicationExceptionInResponseFilter() { WebTarget t = client().target(UriBuilder.fromUri(getBaseUri()).path(App.ROOT_PATH).path("response_exception").build()); - Response r = t.request("text/plain").get(); + Response r = t.request("text/plain").header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(); assertEquals(200, r.getStatus()); final String entity = r.readEntity(String.class); System.out.println("entity = " + entity); diff --git a/examples/exception-mapping/src/test/java/org/glassfish/jersey/examples/exception/ExceptionMappingTest.java b/examples/exception-mapping/src/test/java/org/glassfish/jersey/examples/exception/ExceptionMappingTest.java index b28ba06a24..e0c130431d 100644 --- a/examples/exception-mapping/src/test/java/org/glassfish/jersey/examples/exception/ExceptionMappingTest.java +++ b/examples/exception-mapping/src/test/java/org/glassfish/jersey/examples/exception/ExceptionMappingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -12,6 +12,8 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.UriBuilder; @@ -53,7 +55,7 @@ protected ResourceConfig configure() { @Test public void testPingAndFilter() { WebTarget t = client().target(UriBuilder.fromUri(getBaseUri()).path(App.ROOT_PATH).build()); - Response r = t.request("text/plain").get(); + Response r = t.request(MediaType.TEXT_PLAIN).header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(); assertEquals(200, r.getStatus()); assertTrue(r.readEntity(String.class).contains(MyResponseFilter.class.getSimpleName())); } diff --git a/examples/http-patch/src/test/java/org/glassfish/jersey/examples/httppatch/HttpPatchTest.java b/examples/http-patch/src/test/java/org/glassfish/jersey/examples/httppatch/HttpPatchTest.java index 3a5f040d54..a3395ce5ee 100644 --- a/examples/http-patch/src/test/java/org/glassfish/jersey/examples/httppatch/HttpPatchTest.java +++ b/examples/http-patch/src/test/java/org/glassfish/jersey/examples/httppatch/HttpPatchTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -12,6 +12,7 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.json.Json; @@ -62,7 +63,8 @@ public void testPatch() { // initial precondition check final State expected = new State(); - assertEquals(expected, target.request("application/json").get(State.class)); + assertEquals(expected, target.request(MediaType.APPLICATION_JSON) + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(State.class)); // apply first patch expected.setMessage("patchedMessage"); @@ -94,7 +96,8 @@ public void testPatch() { assertEquals(expected, target.request() .method("PATCH", Entity.entity(patch_1, MediaType.APPLICATION_JSON_PATCH_JSON), State.class)); - assertEquals(expected, target.request("application/json").get(State.class)); + assertEquals(expected, target.request(MediaType.APPLICATION_JSON) + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(State.class)); // apply second patch expected.getList().add("three"); @@ -109,6 +112,7 @@ public void testPatch() { assertEquals(expected, target.request() .method("PATCH", Entity.entity(patch_2, MediaType.APPLICATION_JSON_PATCH_JSON), State.class)); - assertEquals(expected, target.request("application/json").get(State.class)); + assertEquals(expected, target.request("application/json") + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(State.class)); } } diff --git a/examples/jaxb/src/test/java/org/glassfish/jersey/examples/jaxb/JaxbTest.java b/examples/jaxb/src/test/java/org/glassfish/jersey/examples/jaxb/JaxbTest.java index fef6dc529a..6c22e21612 100644 --- a/examples/jaxb/src/test/java/org/glassfish/jersey/examples/jaxb/JaxbTest.java +++ b/examples/jaxb/src/test/java/org/glassfish/jersey/examples/jaxb/JaxbTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -16,6 +16,8 @@ import jakarta.ws.rs.core.GenericType; import static jakarta.ws.rs.client.Entity.xml; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.xml.bind.JAXBElement; import javax.xml.namespace.QName; @@ -23,7 +25,6 @@ import org.glassfish.jersey.test.JerseyTest; import org.glassfish.jersey.test.TestProperties; -import org.junit.Ignore; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -56,7 +57,8 @@ public void testApplicationWadl() { @Test public void testRootElement() { - JaxbXmlRootElement e1 = target().path("jaxb/XmlRootElement").request().get(JaxbXmlRootElement.class); + JaxbXmlRootElement e1 = target().path("jaxb/XmlRootElement").request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(JaxbXmlRootElement.class); JaxbXmlRootElement e2 = target().path("jaxb/XmlRootElement").request("application/xml") .post(xml(e1), JaxbXmlRootElement.class); @@ -66,9 +68,11 @@ public void testRootElement() { @Test public void testRootElementWithHeader() { - String e1 = target().path("jaxb/XmlRootElement").request().get(String.class); + String e1 = target().path("jaxb/XmlRootElement").request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(String.class); - String e2 = target().path("jaxb/XmlRootElementWithHeader").request().get(String.class); + String e2 = target().path("jaxb/XmlRootElementWithHeader").request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(String.class); assertTrue(e2.contains("") && e2.contains(e1.substring(e1.indexOf("?>") + 2).trim())); } @@ -76,9 +80,10 @@ public void testRootElementWithHeader() { public void testJAXBElement() { GenericType> genericType = new GenericType>() {}; - JAXBElement e1 = target().path("jaxb/JAXBElement").request().get(genericType); + JAXBElement e1 = target().path("jaxb/JAXBElement").request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(genericType); - JAXBElement e2 = target().path("jaxb/JAXBElement").request("application/xml") + JAXBElement e2 = target().path("jaxb/JAXBElement").request(MediaType.APPLICATION_XML) .post(xml(e1), genericType); assertEquals(e1.getValue(), e2.getValue()); @@ -86,13 +91,14 @@ public void testJAXBElement() { @Test public void testXmlType() { - JaxbXmlType t1 = target().path("jaxb/JAXBElement").request().get(JaxbXmlType.class); + JaxbXmlType t1 = target().path("jaxb/JAXBElement").request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(JaxbXmlType.class); JAXBElement e = new JAXBElement( new QName("jaxbXmlRootElement"), JaxbXmlType.class, t1); - JaxbXmlType t2 = target().path("jaxb/XmlType").request("application/xml") + JaxbXmlType t2 = target().path("jaxb/XmlType").request(MediaType.APPLICATION_XML) .post(xml(e), JaxbXmlType.class); assertEquals(t1, t2); @@ -104,8 +110,9 @@ public void testRootElementCollection() { GenericType> genericType = new GenericType>() {}; - Collection ce1 = target().path("jaxb/collection/XmlRootElement").request().get(genericType); - Collection ce2 = target().path("jaxb/collection/XmlRootElement").request("application/xml") + Collection ce1 = target().path("jaxb/collection/XmlRootElement").request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(genericType); + Collection ce2 = target().path("jaxb/collection/XmlRootElement").request(MediaType.APPLICATION_XML) .post(xml(new GenericEntity>(ce1) {}), genericType); assertEquals(ce1, ce2); @@ -120,13 +127,13 @@ public void testXmlTypeCollection() { }; Collection ce1 = target().path("jaxb/collection/XmlRootElement").request() - .get(genericRootElement); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(genericRootElement); - Collection ct1 = target().path("jaxb/collection/XmlType").request("application/xml") + Collection ct1 = target().path("jaxb/collection/XmlType").request(MediaType.APPLICATION_XML) .post(xml(new GenericEntity>(ce1) {}), genericXmlType); Collection ct2 = target().path("jaxb/collection/XmlRootElement").request() - .get(genericXmlType); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(genericXmlType); assertEquals(ct1, ct2); } @@ -134,8 +141,8 @@ public void testXmlTypeCollection() { @Test public void testRootElementArray() { JaxbXmlRootElement[] ae1 = target().path("jaxb/array/XmlRootElement").request() - .get(JaxbXmlRootElement[].class); - JaxbXmlRootElement[] ae2 = target().path("jaxb/array/XmlRootElement").request("application/xml") + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(JaxbXmlRootElement[].class); + JaxbXmlRootElement[] ae2 = target().path("jaxb/array/XmlRootElement").request(MediaType.APPLICATION_XML) .post(xml(ae1), JaxbXmlRootElement[].class); assertEquals(ae1.length, ae2.length); @@ -147,13 +154,13 @@ public void testRootElementArray() { @Test public void testXmlTypeArray() { JaxbXmlRootElement[] ae1 = target().path("jaxb/array/XmlRootElement").request() - .get(JaxbXmlRootElement[].class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(JaxbXmlRootElement[].class); - JaxbXmlType[] at1 = target().path("jaxb/array/XmlType").request("application/xml") + JaxbXmlType[] at1 = target().path("jaxb/array/XmlType").request(MediaType.APPLICATION_XML) .post(xml(ae1), JaxbXmlType[].class); JaxbXmlType[] at2 = target().path("jaxb/array/XmlRootElement").request() - .get(JaxbXmlType[].class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(JaxbXmlType[].class); assertEquals(at1.length, at2.length); for (int i = 0; i < at1.length; i++) { diff --git a/examples/json-processing-webapp/src/test/java/org/glassfish/jersey/examples/jsonp/JsonProcessingResourceTest.java b/examples/json-processing-webapp/src/test/java/org/glassfish/jersey/examples/jsonp/JsonProcessingResourceTest.java index 70d9ff294c..885ca4486b 100644 --- a/examples/json-processing-webapp/src/test/java/org/glassfish/jersey/examples/jsonp/JsonProcessingResourceTest.java +++ b/examples/json-processing-webapp/src/test/java/org/glassfish/jersey/examples/jsonp/JsonProcessingResourceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -20,6 +20,7 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.client.WebTarget; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.UriBuilder; @@ -87,15 +88,17 @@ public void testStoreGetRemoveDocument() throws Exception { final String id = ids.get(0).toString(); final WebTarget documentTarget = target("document").path(id); final JsonObject storedDocument = documentTarget.request(MediaType.APPLICATION_JSON) - .get(JsonObject.class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(JsonObject.class); assertEquals(document, storedDocument); // Remove. - final JsonObject removedDocument = documentTarget.request(MediaType.APPLICATION_JSON).delete(JsonObject.class); + final JsonObject removedDocument = documentTarget.request(MediaType.APPLICATION_JSON) + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).delete(JsonObject.class); assertEquals(document, removedDocument); // Get. - final Response errorResponse = documentTarget.request(MediaType.APPLICATION_JSON).get(); + final Response errorResponse = documentTarget.request(MediaType.APPLICATION_JSON) + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(); assertEquals(204, errorResponse.getStatus()); } diff --git a/examples/server-async/src/test/java/org/glassfish/jersey/examples/server/async/AsyncResourceTest.java b/examples/server-async/src/test/java/org/glassfish/jersey/examples/server/async/AsyncResourceTest.java index 9b09dc3552..1abe7bba2f 100644 --- a/examples/server-async/src/test/java/org/glassfish/jersey/examples/server/async/AsyncResourceTest.java +++ b/examples/server-async/src/test/java/org/glassfish/jersey/examples/server/async/AsyncResourceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -28,6 +28,8 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import org.glassfish.jersey.internal.guava.ThreadFactoryBuilder; import org.glassfish.jersey.process.JerseyProcessingUncaughtExceptionHandler; import org.glassfish.jersey.server.ResourceConfig; @@ -146,7 +148,7 @@ private void get() { attemptCounter++; try { final String response = resourceTarget.queryParam("id", requestId).request() - .get(String.class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); getResponses.put(requestId, response); break; } catch (Throwable t) { diff --git a/examples/system-properties-example/src/test/java/org/glassfish/jersey/examples/sysprops/SysPropsTest.java b/examples/system-properties-example/src/test/java/org/glassfish/jersey/examples/sysprops/SysPropsTest.java index 21887fc80a..7c724d2f5e 100644 --- a/examples/system-properties-example/src/test/java/org/glassfish/jersey/examples/sysprops/SysPropsTest.java +++ b/examples/system-properties-example/src/test/java/org/glassfish/jersey/examples/sysprops/SysPropsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -10,8 +10,14 @@ package org.glassfish.jersey.examples.sysprops; +import java.util.Collections; import java.util.Set; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedHashMap; +import jakarta.ws.rs.core.MultivaluedMap; import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.proxy.WebResourceFactory; import org.glassfish.jersey.server.ResourceConfig; @@ -40,7 +46,11 @@ protected void configureClient(ClientConfig config) { @Test public void testGetPropertyNames() { - PropertyNamesResource propertyNamesResource = WebResourceFactory.newResource(PropertyNamesResource.class, target()); + MultivaluedMap headers = new MultivaluedHashMap<>(); + headers.add(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN); + + PropertyNamesResource propertyNamesResource = WebResourceFactory + .newResource(PropertyNamesResource.class, target(), false, headers, Collections.emptyList(), new Form()); Set propertyNames = propertyNamesResource.getPropertyNames(); assertEquals(System.getProperties().stringPropertyNames(), propertyNames); } diff --git a/incubator/kryo/src/test/java/org/glassfish/jersey/kryo/PersonResourceBaseTest.java b/incubator/kryo/src/test/java/org/glassfish/jersey/kryo/PersonResourceBaseTest.java index a9ada66fa6..529d00f91a 100644 --- a/incubator/kryo/src/test/java/org/glassfish/jersey/kryo/PersonResourceBaseTest.java +++ b/incubator/kryo/src/test/java/org/glassfish/jersey/kryo/PersonResourceBaseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021 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 @@ -16,6 +16,7 @@ package org.glassfish.jersey.kryo; +import jakarta.ws.rs.core.HttpHeaders; import org.glassfish.jersey.test.JerseyTest; import org.junit.Test; @@ -28,7 +29,7 @@ public abstract class PersonResourceBaseTest extends JerseyTest { @Test public void testGet() { - final Person getResponse = target().request().get(Person.class); + final Person getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, "application/x-kryo").get(Person.class); assertEquals("Wolfgang", getResponse.name); assertEquals(21, getResponse.age); assertEquals("Salzburg", getResponse.address); diff --git a/security/oauth1-client/src/main/java/org/glassfish/jersey/client/oauth1/OAuth1AuthorizationFlowImpl.java b/security/oauth1-client/src/main/java/org/glassfish/jersey/client/oauth1/OAuth1AuthorizationFlowImpl.java index e3520d3571..abfd4b0a75 100644 --- a/security/oauth1-client/src/main/java/org/glassfish/jersey/client/oauth1/OAuth1AuthorizationFlowImpl.java +++ b/security/oauth1-client/src/main/java/org/glassfish/jersey/client/oauth1/OAuth1AuthorizationFlowImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2021 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 @@ -25,6 +25,8 @@ import jakarta.ws.rs.core.Configuration; import jakarta.ws.rs.core.Feature; import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.UriBuilder; @@ -170,7 +172,7 @@ private Invocation.Builder addProperties(final Invocation.Builder invocationBuil public String start() { final Response response = addProperties(client.target(requestTokenUri).request()) - .post(null); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_TYPE).post(null); if (response.getStatus() != 200) { throw new RuntimeException(LocalizationMessages.ERROR_REQUEST_REQUEST_TOKEN(response.getStatus())); } @@ -188,7 +190,8 @@ public AccessToken finish() { public AccessToken finish(final String verifier) { parameters.setVerifier(verifier); - final Response response = addProperties(client.target(accessTokenUri).request()).post(null); + final Response response = addProperties(client.target(accessTokenUri).request()) + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_TYPE).post(null); // accessToken request failed if (response.getStatus() >= 400) { throw new RuntimeException(LocalizationMessages.ERROR_REQUEST_ACCESS_TOKEN(response.getStatus())); diff --git a/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/ClientPathTest.java b/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/ClientPathTest.java index ab2efc8df6..6ea796c52a 100644 --- a/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/ClientPathTest.java +++ b/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/ClientPathTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021 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 @@ -23,6 +23,7 @@ import jakarta.ws.rs.Produces; import jakarta.ws.rs.client.Client; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; @@ -53,7 +54,9 @@ public void pathParamInTargetTest() { Response response = client().target("http://localhost:" + getPort() + "/test/{beginBy}") .resolveTemplate("beginBy", "abc") - .request(MediaType.TEXT_PLAIN_TYPE).get(); + .request(MediaType.TEXT_PLAIN_TYPE) + .header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_TYPE) + .get(); assertEquals(200, response.getStatus()); assertEquals("test-get,abc", response.readEntity(String.class)); } @@ -63,7 +66,9 @@ public void pathParamInTargetTest() { */ @Test public void pathConcatenationTest1() { - Response response = client().target("http://localhost:" + getPort()).path("path").request(MediaType.TEXT_PLAIN_TYPE) + Response response = client().target("http://localhost:" + getPort()).path("path") + .request(MediaType.TEXT_PLAIN_TYPE) + .header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_TYPE) .get(); assertEquals(200, response.getStatus()); assertEquals("test-path", response.readEntity(String.class)); @@ -75,7 +80,7 @@ public void pathConcatenationTest1() { @Test public void pathConcatenationTest2() { Response response = client().target("http://localhost:" + getPort()).path("/path").request(MediaType.TEXT_PLAIN_TYPE) - .get(); + .header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_TYPE).get(); assertEquals(200, response.getStatus()); assertEquals("test-path", response.readEntity(String.class)); } @@ -86,7 +91,7 @@ public void pathConcatenationTest2() { @Test public void pathConcatenationTest3() { Response response = client().target("http://localhost:" + getPort()).path("/path/").path("/another/") - .request(MediaType.TEXT_PLAIN_TYPE).get(); + .request(MediaType.TEXT_PLAIN_TYPE).header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_TYPE).get(); assertEquals(200, response.getStatus()); assertEquals("test-another-path", response.readEntity(String.class)); } @@ -97,7 +102,7 @@ public void pathConcatenationTest3() { @Test public void pathConcatenationTest4() { Response response = client().target("http://localhost:" + getPort()).path("/path").path("another/") - .request(MediaType.TEXT_PLAIN_TYPE).get(); + .request(MediaType.TEXT_PLAIN_TYPE).header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_TYPE).get(); assertEquals(200, response.getStatus()); assertEquals("test-another-path", response.readEntity(String.class)); } @@ -108,7 +113,7 @@ public void pathConcatenationTest4() { @Test public void pathConcatenationTest6() { Response response = client().target("http://localhost:" + getPort() + "/").path("/path/another") - .request(MediaType.TEXT_PLAIN_TYPE).get(); + .request(MediaType.TEXT_PLAIN_TYPE).header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_TYPE).get(); assertEquals(200, response.getStatus()); assertEquals("test-another-path", response.readEntity(String.class)); } diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/EntityTypesTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/EntityTypesTest.java index 8863e46c05..4915aa3244 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/EntityTypesTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/EntityTypesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2021 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 @@ -886,7 +886,7 @@ public JaxbBean[] postType(final JaxbBeanType[] l) { public void testJAXBArrayRepresentation() { final WebTarget target = target("JAXBArrayResource"); - final JaxbBean[] a = target.request().get(JaxbBean[].class); + final JaxbBean[] a = target.request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(JaxbBean[].class); JaxbBean[] b = target.request().post(Entity.entity(a, "application/xml"), JaxbBean[].class); assertEquals(a.length, b.length); for (int i = 0; i < a.length; i++) { @@ -910,7 +910,7 @@ public static class JAXBListResourceMediaType extends JAXBListResource { public void testJAXBListRepresentationMediaType() { final WebTarget target = target("JAXBListResourceMediaType"); - Collection a = target.request().get( + Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, "application/foo+xml").get( new GenericType>() { }); Collection b = target.request() @@ -1049,7 +1049,7 @@ public static class JAXBListResourceJSON extends JAXBListResource { public void testJAXBListRepresentationJSON() throws Exception { final WebTarget target = target("JAXBListResourceJSON"); - Collection a = target.request().get( + Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get( new GenericType>() { }); Collection b = target.request().post(Entity.entity(new GenericEntity>(a) { @@ -1121,7 +1121,7 @@ public static class JAXBListResourceJSONMediaType extends JAXBListResource { public void testJAXBListRepresentationJSONMediaType() throws Exception { final WebTarget target = target("JAXBListResourceJSONMediaType"); - final Collection a = target.request().get( + final Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, "application/foo+json").get( new GenericType>() { }); Collection b = target.request().post(Entity.entity(new GenericEntity>(a) { diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/JsonMoxyTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/JsonMoxyTest.java index 8bb9aff7b7..75c998afda 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/JsonMoxyTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/JsonMoxyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021 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 @@ -38,6 +38,7 @@ import jakarta.ws.rs.core.Application; import jakarta.ws.rs.core.GenericEntity; import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.ext.ContextResolver; @@ -339,7 +340,7 @@ public static class JAXBListResourceJSON extends JAXBListResource { public void testJAXBListRepresentationJSONCollection() throws Exception { final WebTarget target = target("JAXBListResourceJSON"); - final Collection a = target.request().get( + final Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get( new GenericType>() { }); Collection b = target.request().post(Entity.entity(new GenericEntity>(a) { @@ -358,7 +359,7 @@ public void testJAXBListRepresentationJSONCollection() throws Exception { public void testJAXBListRepresentationJSONLinkedList() throws Exception { final WebTarget target = target("JAXBListResourceJSON"); - Collection a = target.request().get( + Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get( new GenericType>() { }); final Collection b; @@ -374,7 +375,7 @@ public void testJAXBListRepresentationJSONLinkedList() throws Exception { public void testJAXBListRepresentationJSONSet() throws Exception { final WebTarget target = target("JAXBListResourceJSON"); - Collection a = target.request().get( + Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get( new GenericType>() { }); final Collection b; @@ -400,7 +401,7 @@ public int compare(final JaxbBean t, final JaxbBean t1) { public void testJAXBListRepresentationJSONStack() throws Exception { final WebTarget target = target("JAXBListResourceJSON"); - final Collection a = target.request().get( + final Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get( new GenericType>() { }); final Collection b; @@ -438,7 +439,7 @@ public static class JAXBListResourceJSONMediaType extends JAXBListResource { public void testJAXBListRepresentationJSONMediaType() throws Exception { final WebTarget target = target("JAXBListResourceJSONMediaType"); - final Collection a = target.request().get( + final Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, "application/foo+json").get( new GenericType>() { }); Collection b = target.request().post(Entity.entity(new GenericEntity>(a) { diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/MultipartTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/MultipartTest.java index 8652af4dad..1c00186b4c 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/MultipartTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/MultipartTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021 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 @@ -31,6 +31,7 @@ import jakarta.ws.rs.WebApplicationException; import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.Response; @@ -234,6 +235,7 @@ public void testEmptyEntity() throws Exception { public void testEmptyEntityWithoutContentType() throws Exception { final Response response = target("filename") .request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.MULTIPART_FORM_DATA_TYPE) .post(null); assertThat(response.getStatus(), is(400)); diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/XmlMoxyTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/XmlMoxyTest.java index 0f75bc2df7..f5cac7bca5 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/XmlMoxyTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/XmlMoxyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021 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 @@ -38,6 +38,7 @@ import jakarta.ws.rs.core.Application; import jakarta.ws.rs.core.GenericEntity; import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.ext.ContextResolver; @@ -396,7 +397,7 @@ public JaxbBean[] postType(final JaxbBeanType[] l) { public void testJAXBArrayRepresentation() { final WebTarget target = target("JAXBArrayResource"); - final JaxbBean[] a = target.request().get(JaxbBean[].class); + final JaxbBean[] a = target.request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(JaxbBean[].class); JaxbBean[] b = target.request().post(Entity.entity(a, "application/xml"), JaxbBean[].class); assertEquals(a.length, b.length); for (int i = 0; i < a.length; i++) { @@ -420,7 +421,7 @@ public static class JAXBListResourceMediaType extends JAXBListResource { public void testJAXBListRepresentationMediaType() { final WebTarget target = target("JAXBListResourceMediaType"); - Collection a = target.request().get( + Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, "application/foo+xml").get( new GenericType>() { }); Collection b = target.request() @@ -536,7 +537,8 @@ public ComplexJaxbBean get() { @Test public void testAdditionalClasses() throws Exception { - final ComplexJaxbBean nonJaxbBean = target("AdditionalClassesResource").request().get(ComplexJaxbBean.class); + final ComplexJaxbBean nonJaxbBean = target("AdditionalClassesResource").request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(ComplexJaxbBean.class); final Object simpleBean = nonJaxbBean.getSimpleBean(); assertThat(simpleBean, notNullValue()); diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EmptyEntityTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EmptyEntityTest.java index b1d26682eb..ae298f24c2 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EmptyEntityTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EmptyEntityTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -22,6 +22,7 @@ import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; import org.glassfish.jersey.message.filtering.EntityFilteringFeature; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.test.TestProperties; @@ -70,14 +71,16 @@ protected Application configure() { @Test public void testNonEmptyEntity() throws Exception { - final String fields = target("nonEmptyEntity").request().get(String.class); + final String fields = target("nonEmptyEntity").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, "value"); } @Test public void testEmptyEntity() throws Exception { - final String fields = target("emptyEntity").request().get(String.class); + final String fields = target("emptyEntity").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, ""); } diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnClassTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnClassTest.java index 7929203476..fa1e839e44 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnClassTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2021 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 @@ -24,6 +24,7 @@ import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.message.filtering.EntityFilteringFeature; @@ -115,7 +116,8 @@ public ManyFilteringsOnClassEntity getManyFilteringsEntityManyViews() { @Test public void testOneEntityFilteringOnClass() throws Exception { - final String fields = target("OneFilteringEntity").request().get(String.class); + final String fields = target("OneFilteringEntity").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, "field,accessor,property,subEntities.field2,subEntities.property2,subEntities.property1," + "subEntities.field1,defaultEntities.field,defaultEntities.property"); @@ -123,14 +125,16 @@ public void testOneEntityFilteringOnClass() throws Exception { @Test public void testOneEntityFilteringOnClassDefaultViewResponse() throws Exception { - final String fields = target("OneFilteringEntityDefaultViewResponse").request().get(String.class); + final String fields = target("OneFilteringEntityDefaultViewResponse").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, ""); } @Test public void testOneEntityFilteringOnClassDefaultView() throws Exception { - final String fields = target("OneFilteringEntityDefaultView").request().get(String.class); + final String fields = target("OneFilteringEntityDefaultView").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, ""); } @@ -143,7 +147,8 @@ public void testMultipleViewsOnClass() throws Exception { @Test public void testManyFilteringsEntityPrimaryView() throws Exception { - final String fields = target("ManyFilteringsEntityPrimaryView").request().get(String.class); + final String fields = target("ManyFilteringsEntityPrimaryView").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, "field,accessor,property,manyEntities.property1,manyEntities.field1,oneEntities.field2," + "oneEntities.property2,oneEntities.property1,oneEntities.field1,defaultEntities.field,defaultEntities" @@ -152,7 +157,8 @@ public void testManyFilteringsEntityPrimaryView() throws Exception { @Test public void testManyFilteringsEntitySecondaryView() throws Exception { - final String fields = target("ManyFilteringsEntitySecondaryView").request().get(String.class); + final String fields = target("ManyFilteringsEntitySecondaryView").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, "field,accessor,property,manyEntities.field2,manyEntities.property2,manyEntities.field1," + "oneEntities.property2,oneEntities.field1,defaultEntities.field,defaultEntities.property"); @@ -160,14 +166,16 @@ public void testManyFilteringsEntitySecondaryView() throws Exception { @Test public void testManyFilteringsEntityDefaultView() throws Exception { - final String fields = target("ManyFilteringsEntityDefaultView").request().get(String.class); + final String fields = target("ManyFilteringsEntityDefaultView").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, ""); } @Test public void testManyFilteringsEntityManyViews() throws Exception { - final String fields = target("ManyFilteringsEntityManyViews").request().get(String.class); + final String fields = target("ManyFilteringsEntityManyViews").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, "field,accessor,property,manyEntities.field2,manyEntities.property2,manyEntities.property1," + "manyEntities.field1,oneEntities.field2,oneEntities.property2,oneEntities.property1,oneEntities.field1," diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnPropertiesTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnPropertiesTest.java index 272e5c8212..d532803247 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnPropertiesTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnPropertiesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2021 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 @@ -24,6 +24,7 @@ import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.message.filtering.EntityFilteringFeature; @@ -116,7 +117,8 @@ public ManyFilteringsOnPropertiesEntity getManyFilteringsEntityManyViews() { @Test public void testOneEntityFilteringOnProperties() throws Exception { - final String fields = target("OneFilteringEntity").request().get(String.class); + final String fields = target("OneFilteringEntity").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, "field,accessor,property,subEntities.field2,subEntities.property2,subEntities.property1," + "subEntities.field1,defaultEntities.field,defaultEntities.property"); @@ -124,21 +126,24 @@ public void testOneEntityFilteringOnProperties() throws Exception { @Test public void testOneEntityFilteringOnPropertiesDefaultViewResponse() throws Exception { - final String fields = target("OneFilteringEntityDefaultViewResponse").request().get(String.class); + final String fields = target("OneFilteringEntityDefaultViewResponse").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, "field"); } @Test public void testOneEntityFilteringOnPropertiesDefaultView() throws Exception { - final String fields = target("OneFilteringEntityDefaultView").request().get(String.class); + final String fields = target("OneFilteringEntityDefaultView").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, "field"); } @Test public void testManyFilteringsEntityPrimaryView() throws Exception { - final String fields = target("ManyFilteringsEntityPrimaryView").request().get(String.class); + final String fields = target("ManyFilteringsEntityPrimaryView").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, "field,accessor,property,oneEntities.field2,oneEntities.property2,oneEntities.property1," + "oneEntities.field1,defaultEntities.field,defaultEntities.property"); @@ -146,7 +151,8 @@ public void testManyFilteringsEntityPrimaryView() throws Exception { @Test public void testManyFilteringsEntitySecondaryView() throws Exception { - final String fields = target("ManyFilteringsEntitySecondaryView").request().get(String.class); + final String fields = target("ManyFilteringsEntitySecondaryView").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, "field,accessor,property,manyEntities.field2,manyEntities.property2,manyEntities.field1," + "oneEntities.property2,oneEntities.field1"); @@ -154,14 +160,16 @@ public void testManyFilteringsEntitySecondaryView() throws Exception { @Test public void testManyFilteringsEntityDefaultView() throws Exception { - final String fields = target("ManyFilteringsEntityDefaultView").request().get(String.class); + final String fields = target("ManyFilteringsEntityDefaultView").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, "field,accessor"); } @Test public void testManyFilteringsEntityManyViews() throws Exception { - final String fields = target("ManyFilteringsEntityManyViews").request().get(String.class); + final String fields = target("ManyFilteringsEntityManyViews").request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, "field,accessor,property,manyEntities.field2,manyEntities.property2,manyEntities.property1," + "manyEntities.field1,oneEntities.field2,oneEntities.property2,oneEntities.property1,oneEntities.field1," diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringScopesTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringScopesTest.java index 11edba2885..870450bc49 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringScopesTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringScopesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2021 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 @@ -22,15 +22,13 @@ import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; import org.glassfish.jersey.message.filtering.EntityFilteringFeature; import org.glassfish.jersey.server.ResourceConfig; -import org.glassfish.jersey.test.JerseyTest; import org.glassfish.jersey.test.TestProperties; import org.glassfish.jersey.tests.e2e.entity.filtering.domain.ComplexEntity; import org.junit.Test; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.MatcherAssert.assertThat; /** * @author Michal Gajdos @@ -67,7 +65,8 @@ public ComplexEntity get() { */ @Test public void testEntityFilteringScopes() throws Exception { - final String fields = target().request().get(String.class); + final String fields = target().request() + .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); assertSameFields(fields, "accessor,property,field.field,field.accessor,field.property.accessor,field.property.property"); } diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEmptyEntityTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEmptyEntityTest.java index a37ded6c15..b4f014073f 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEmptyEntityTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEmptyEntityTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -23,6 +23,8 @@ import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Feature; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.ext.ContextResolver; import org.glassfish.jersey.jackson.JacksonFeature; @@ -95,7 +97,8 @@ public ObjectMapper getContext(final Class type) { @Test public void testNonEmptyEntity() throws Exception { - final NonEmptyEntity entity = target("nonEmptyEntity").request().get(NonEmptyEntity.class); + final NonEmptyEntity entity = target("nonEmptyEntity").request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(NonEmptyEntity.class); assertThat(entity.getValue(), is("foo")); assertThat(entity.getEmptyEntity(), nullValue()); @@ -103,6 +106,7 @@ public void testNonEmptyEntity() throws Exception { @Test public void testEmptyEntity() throws Exception { - assertThat(target("emptyEntity").request().get(String.class), is("{}")); + assertThat(target("emptyEntity").request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(String.class), is("{}")); } } diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnClassTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnClassTest.java index 68c5d01c17..4c5312f23e 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnClassTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnClassTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -25,6 +25,8 @@ import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Feature; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.jackson.JacksonFeature; @@ -133,7 +135,8 @@ public ManyFilteringsOnClassEntity getManyFilteringsEntityManyViews() { @Test public void testOneEntityFilteringOnClass() throws Exception { - final OneFilteringOnClassEntity entity = target("OneFilteringEntity").request().get(OneFilteringOnClassEntity.class); + final OneFilteringOnClassEntity entity = target("OneFilteringEntity").request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(OneFilteringOnClassEntity.class); // OneFilteringOnClassEntity assertThat(entity.field, is(10)); @@ -166,7 +169,7 @@ public void testOneEntityFilteringOnClass() throws Exception { @Test public void testOneEntityFilteringOnClassDefaultViewResponse() throws Exception { final OneFilteringOnClassEntity entity = target("OneFilteringEntityDefaultViewResponse").request() - .get(OneFilteringOnClassEntity.class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(OneFilteringOnClassEntity.class); // OneFilteringOnClassEntity assertThat(entity.field, is(0)); @@ -187,7 +190,7 @@ public void testOneEntityFilteringOnClassDefaultViewResponse() throws Exception @Test public void testOneEntityFilteringOnClassDefaultView() throws Exception { final OneFilteringOnClassEntity entity = target("OneFilteringEntityDefaultView").request() - .get(OneFilteringOnClassEntity.class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(OneFilteringOnClassEntity.class); // OneFilteringOnClassEntity assertThat(entity.field, is(0)); @@ -214,7 +217,7 @@ public void testMultipleViewsOnClass() throws Exception { @Test public void testManyFilteringsEntityPrimaryView() throws Exception { final ManyFilteringsOnClassEntity entity = target("ManyFilteringsEntityPrimaryView").request() - .get(ManyFilteringsOnClassEntity.class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnClassEntity.class); // ManyFilteringsOnClassEntity assertThat(entity.field, is(50)); @@ -256,7 +259,7 @@ public void testManyFilteringsEntityPrimaryView() throws Exception { @Test public void testManyFilteringsEntitySecondaryView() throws Exception { final ManyFilteringsOnClassEntity entity = target("ManyFilteringsEntitySecondaryView").request() - .get(ManyFilteringsOnClassEntity.class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnClassEntity.class); // ManyFilteringsOnClassEntity assertThat(entity.field, is(50)); @@ -298,7 +301,7 @@ public void testManyFilteringsEntitySecondaryView() throws Exception { @Test public void testManyFilteringsEntityDefaultView() throws Exception { final ManyFilteringsOnClassEntity entity = target("ManyFilteringsEntityDefaultView").request() - .get(ManyFilteringsOnClassEntity.class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnClassEntity.class); // ManyFilteringsOnClassEntity assertThat(entity.field, is(0)); @@ -322,7 +325,7 @@ public void testManyFilteringsEntityDefaultView() throws Exception { @Test public void testManyFilteringsEntityManyViews() throws Exception { final ManyFilteringsOnClassEntity entity = target("ManyFilteringsEntityManyViews").request() - .get(ManyFilteringsOnClassEntity.class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnClassEntity.class); // ManyFilteringsOnClassEntity assertThat(entity.field, is(50)); diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnPropertiesTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnPropertiesTest.java index 1d065a3bda..b4bf5537c1 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnPropertiesTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnPropertiesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -25,6 +25,8 @@ import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Feature; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.jackson.JacksonFeature; @@ -134,7 +136,7 @@ public ManyFilteringsOnPropertiesEntity getManyFilteringsEntityManyViews() { @Test public void testOneEntityFilteringOnProperties() throws Exception { final OneFilteringOnPropertiesEntity entity = target("OneFilteringEntity").request() - .get(OneFilteringOnPropertiesEntity.class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(OneFilteringOnPropertiesEntity.class); // OneFilteringOnPropertiesEntity assertThat(entity.field, is(80)); @@ -167,7 +169,7 @@ public void testOneEntityFilteringOnProperties() throws Exception { @Test public void testOneEntityFilteringOnPropertiesDefaultViewResponse() throws Exception { final OneFilteringOnPropertiesEntity entity = target("OneFilteringEntityDefaultViewResponse").request() - .get(OneFilteringOnPropertiesEntity.class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(OneFilteringOnPropertiesEntity.class); // OneFilteringOnPropertiesEntity assertThat(entity.field, is(80)); @@ -188,7 +190,7 @@ public void testOneEntityFilteringOnPropertiesDefaultViewResponse() throws Excep @Test public void testOneEntityFilteringOnPropertiesDefaultView() throws Exception { final OneFilteringOnPropertiesEntity entity = target("OneFilteringEntityDefaultView").request() - .get(OneFilteringOnPropertiesEntity.class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(OneFilteringOnPropertiesEntity.class); // OneFilteringOnPropertiesEntity assertThat(entity.field, is(80)); @@ -215,7 +217,7 @@ public void testMultipleViewsOnProperties() throws Exception { @Test public void testManyFilteringsEntityPrimaryView() throws Exception { final ManyFilteringsOnPropertiesEntity entity = target("ManyFilteringsEntityPrimaryView").request() - .get(ManyFilteringsOnPropertiesEntity.class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnPropertiesEntity.class); // ManyFilteringsOnPropertiesEntity assertThat(entity.field, is(90)); @@ -251,7 +253,7 @@ public void testManyFilteringsEntityPrimaryView() throws Exception { @Test public void testManyFilteringsEntitySecondaryView() throws Exception { final ManyFilteringsOnPropertiesEntity entity = target("ManyFilteringsEntitySecondaryView").request() - .get(ManyFilteringsOnPropertiesEntity.class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnPropertiesEntity.class); // ManyFilteringsOnPropertiesEntity assertThat(entity.field, is(90)); @@ -289,7 +291,7 @@ public void testManyFilteringsEntitySecondaryView() throws Exception { @Test public void testManyFilteringsEntityDefaultView() throws Exception { final ManyFilteringsOnPropertiesEntity entity = target("ManyFilteringsEntityDefaultView").request() - .get(ManyFilteringsOnPropertiesEntity.class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnPropertiesEntity.class); // ManyFilteringsOnPropertiesEntity assertThat(entity.field, is(90)); @@ -313,7 +315,7 @@ public void testManyFilteringsEntityDefaultView() throws Exception { @Test public void testManyFilteringsEntityManyViews() throws Exception { final ManyFilteringsOnPropertiesEntity entity = target("ManyFilteringsEntityManyViews").request() - .get(ManyFilteringsOnPropertiesEntity.class); + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnPropertiesEntity.class); // ManyFilteringsOnPropertiesEntity assertThat(entity.field, is(90)); diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringScopesTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringScopesTest.java index 0a35a964ef..459c223fe3 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringScopesTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringScopesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -24,6 +24,8 @@ import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Feature; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import org.glassfish.jersey.jackson.JacksonFeature; import org.glassfish.jersey.message.filtering.EntityFilteringFeature; import org.glassfish.jersey.moxy.json.MoxyJsonFeature; @@ -78,7 +80,8 @@ public ComplexEntity get() { */ @Test public void testEntityFilteringScopes() throws Exception { - final ComplexEntity entity = target().request().get(ComplexEntity.class); + final ComplexEntity entity = target().request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ComplexEntity.class); // ComplexEntity assertThat(entity.accessorTransient, is("propertyproperty")); diff --git a/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/AbstractDisableMetainfServicesLookupTest.java b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/AbstractDisableMetainfServicesLookupTest.java index a2a1c8ff93..aea8397729 100644 --- a/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/AbstractDisableMetainfServicesLookupTest.java +++ b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/AbstractDisableMetainfServicesLookupTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2021 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 @@ -33,6 +33,7 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; import jakarta.ws.rs.core.Configuration; +import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.Response; @@ -62,7 +63,8 @@ public abstract class AbstractDisableMetainfServicesLookupTest extends JerseyTes protected void testGet(int expectedGetResponseCode, int expectedPostResponseCode) throws Exception { final String name = "Jersey"; { - Response response = target("/").path(name).request().get(); + Response response = target("/").path(name).request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(); Assert.assertEquals(expectedGetResponseCode, response.getStatus()); if (response.getStatusInfo().getFamily() == Response.Status.Family.SUCCESSFUL) { diff --git a/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/ClientTest.java b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/ClientTest.java index 1babd8046b..87b9f9b3b8 100644 --- a/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/ClientTest.java +++ b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/ClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021 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 @@ -90,10 +90,11 @@ protected ResourceConfig configure() { @Test public void testAccesingHelloworldResource() { final WebTarget resource = target().path("helloworld"); - final Response r = resource.request().get(); + final Response r = resource.request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(); assertEquals(200, r.getStatus()); - final String responseMessage = resource.request().get(String.class); + final String responseMessage = resource.request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); assertEquals(HelloWorldResource.MESSAGE, responseMessage); } diff --git a/tests/integration/jersey-2255/src/test/java/org/glassfish/jersey/tests/integration/jersey2255/Jersey2255ITCase.java b/tests/integration/jersey-2255/src/test/java/org/glassfish/jersey/tests/integration/jersey2255/Jersey2255ITCase.java index 92371b5127..533edb90d6 100644 --- a/tests/integration/jersey-2255/src/test/java/org/glassfish/jersey/tests/integration/jersey2255/Jersey2255ITCase.java +++ b/tests/integration/jersey-2255/src/test/java/org/glassfish/jersey/tests/integration/jersey2255/Jersey2255ITCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2021 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 @@ -17,6 +17,8 @@ package org.glassfish.jersey.tests.integration.jersey2255; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -57,7 +59,8 @@ protected TestContainerFactory getTestContainerFactory() throws TestContainerExc */ @Test public void testClassAGet() { - final Response response = target("A").request().get(); + final Response response = target("A").request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(); final A entity = response.readEntity(A.class); assertThat(response.getStatus(), equalTo(200)); @@ -66,7 +69,8 @@ public void testClassAGet() { @Test public void testDetailedClassAGet() { - final Response response = target("A").queryParam("detailed", true).request().get(); + final Response response = target("A").queryParam("detailed", true).request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(); final A entity = response.readEntity(A.class); assertThat(response.getStatus(), equalTo(200)); @@ -78,7 +82,8 @@ public void testDetailedClassAGet() { */ @Test public void testDetailedClassBGet() { - final Response response = target("B").queryParam("detailed", true).request().get(); + final Response response = target("B").queryParam("detailed", true).request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(); final B entity = response.readEntity(B.class); assertThat(response.getStatus(), equalTo(200)); @@ -88,7 +93,7 @@ public void testDetailedClassBGet() { @Test public void testClassBGet() { - final Response response = target("B").request().get(); + final Response response = target("B").request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(); final B entity = response.readEntity(B.class); assertThat(response.getStatus(), equalTo(200)); diff --git a/tests/performance/test-cases/filter-dynamic/src/test/java/org/glassfish/jersey/tests/performance/filter/dynamic/FilterTest.java b/tests/performance/test-cases/filter-dynamic/src/test/java/org/glassfish/jersey/tests/performance/filter/dynamic/FilterTest.java index 3d825c155d..498db977d7 100644 --- a/tests/performance/test-cases/filter-dynamic/src/test/java/org/glassfish/jersey/tests/performance/filter/dynamic/FilterTest.java +++ b/tests/performance/test-cases/filter-dynamic/src/test/java/org/glassfish/jersey/tests/performance/filter/dynamic/FilterTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -18,6 +18,8 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -39,7 +41,7 @@ protected Application configure() { @Test public void testGet() { - final String getResponse = target().request().get(String.class); + final String getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); assertEquals("textDYN_MATCH_OUT", getResponse); } diff --git a/tests/performance/test-cases/filter-global/src/test/java/org/glassfish/jersey/tests/performance/filter/global/FilterTest.java b/tests/performance/test-cases/filter-global/src/test/java/org/glassfish/jersey/tests/performance/filter/global/FilterTest.java index 7642cd2e47..89f859a708 100644 --- a/tests/performance/test-cases/filter-global/src/test/java/org/glassfish/jersey/tests/performance/filter/global/FilterTest.java +++ b/tests/performance/test-cases/filter-global/src/test/java/org/glassfish/jersey/tests/performance/filter/global/FilterTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -18,6 +18,8 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -39,7 +41,7 @@ protected Application configure() { @Test public void testGet() { - final String getResponse = target().request().get(String.class); + final String getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); assertEquals("textPRE_MATCH_OUT", getResponse); } diff --git a/tests/performance/test-cases/filter-name/src/test/java/org/glassfish/jersey/tests/performance/filter/name/FilterTest.java b/tests/performance/test-cases/filter-name/src/test/java/org/glassfish/jersey/tests/performance/filter/name/FilterTest.java index badca251d5..9e35b94911 100644 --- a/tests/performance/test-cases/filter-name/src/test/java/org/glassfish/jersey/tests/performance/filter/name/FilterTest.java +++ b/tests/performance/test-cases/filter-name/src/test/java/org/glassfish/jersey/tests/performance/filter/name/FilterTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -18,6 +18,8 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -39,7 +41,7 @@ protected Application configure() { @Test public void testGet() { - final String getResponse = target().request().get(String.class); + final String getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); assertEquals("textNAM_MATCH_OUT", getResponse); } diff --git a/tests/performance/test-cases/interceptor-dynamic/src/test/java/org/glassfish/jersey/tests/performance/interceptor/dynamic/InterceptorTest.java b/tests/performance/test-cases/interceptor-dynamic/src/test/java/org/glassfish/jersey/tests/performance/interceptor/dynamic/InterceptorTest.java index cebebb5012..a6b5b2b224 100644 --- a/tests/performance/test-cases/interceptor-dynamic/src/test/java/org/glassfish/jersey/tests/performance/interceptor/dynamic/InterceptorTest.java +++ b/tests/performance/test-cases/interceptor-dynamic/src/test/java/org/glassfish/jersey/tests/performance/interceptor/dynamic/InterceptorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -18,6 +18,8 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -39,7 +41,7 @@ protected Application configure() { @Test public void testGet() { - final String getResponse = target().request().get(String.class); + final String getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); assertEquals("WRITE text", getResponse); } diff --git a/tests/performance/test-cases/interceptor-global/src/test/java/org/glassfish/jersey/tests/performance/interceptor/global/InterceptorTest.java b/tests/performance/test-cases/interceptor-global/src/test/java/org/glassfish/jersey/tests/performance/interceptor/global/InterceptorTest.java index 2348265968..311aca4533 100644 --- a/tests/performance/test-cases/interceptor-global/src/test/java/org/glassfish/jersey/tests/performance/interceptor/global/InterceptorTest.java +++ b/tests/performance/test-cases/interceptor-global/src/test/java/org/glassfish/jersey/tests/performance/interceptor/global/InterceptorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -18,6 +18,8 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -39,7 +41,7 @@ protected Application configure() { @Test public void testGet() { - final String getResponse = target().request().get(String.class); + final String getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); assertEquals("WRITE text", getResponse); } diff --git a/tests/performance/test-cases/interceptor-name/src/test/java/org/glassfish/jersey/tests/performance/interceptor/name/InterceptorTest.java b/tests/performance/test-cases/interceptor-name/src/test/java/org/glassfish/jersey/tests/performance/interceptor/name/InterceptorTest.java index a6ff42a8c4..ce0963114c 100644 --- a/tests/performance/test-cases/interceptor-name/src/test/java/org/glassfish/jersey/tests/performance/interceptor/name/InterceptorTest.java +++ b/tests/performance/test-cases/interceptor-name/src/test/java/org/glassfish/jersey/tests/performance/interceptor/name/InterceptorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -18,6 +18,8 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -39,7 +41,7 @@ protected Application configure() { @Test public void testGet() { - final String getResponse = target().request().get(String.class); + final String getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); assertEquals("WRITE text", getResponse); } diff --git a/tests/performance/test-cases/mbw-custom-provider/src/test/java/org/glassfish/jersey/tests/performance/mbw/custom/PersonEntityTest.java b/tests/performance/test-cases/mbw-custom-provider/src/test/java/org/glassfish/jersey/tests/performance/mbw/custom/PersonEntityTest.java index cc195618e6..a1b5066222 100644 --- a/tests/performance/test-cases/mbw-custom-provider/src/test/java/org/glassfish/jersey/tests/performance/mbw/custom/PersonEntityTest.java +++ b/tests/performance/test-cases/mbw-custom-provider/src/test/java/org/glassfish/jersey/tests/performance/mbw/custom/PersonEntityTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -18,6 +18,7 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.client.ClientConfig; @@ -45,7 +46,7 @@ protected void configureClient(ClientConfig config) { @Test public void testGet() { - final Person getResponse = target().request().get(Person.class); + final Person getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, "application/person").get(Person.class); assertEquals("Mozart", getResponse.name); assertEquals(21, getResponse.age); assertEquals("Salzburg", getResponse.address); diff --git a/tests/performance/test-cases/mbw-json-jackson/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java b/tests/performance/test-cases/mbw-json-jackson/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java index 45252839ff..17173add5e 100644 --- a/tests/performance/test-cases/mbw-json-jackson/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java +++ b/tests/performance/test-cases/mbw-json-jackson/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -18,6 +18,8 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.jackson.JacksonFeature; @@ -46,7 +48,8 @@ protected void configureClient(ClientConfig config) { @Test public void testGet() { - final Person getResponse = target().request().get(Person.class); + final Person getResponse = target().request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(Person.class); assertEquals("Wolfgang", getResponse.name); assertEquals(21, getResponse.age); assertEquals("Salzburg", getResponse.address); diff --git a/tests/performance/test-cases/mbw-json-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java b/tests/performance/test-cases/mbw-json-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java index c609079b88..17e755df8a 100644 --- a/tests/performance/test-cases/mbw-json-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java +++ b/tests/performance/test-cases/mbw-json-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -18,6 +18,8 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.client.ClientConfig; @@ -46,7 +48,8 @@ protected void configureClient(ClientConfig config) { @Test public void testGet() { - final Person getResponse = target().request().get(Person.class); + final Person getResponse = target().request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(Person.class); assertEquals("Wolfgang", getResponse.name); assertEquals(21, getResponse.age); assertEquals("Salzburg", getResponse.address); diff --git a/tests/performance/test-cases/mbw-kryo/src/test/java/org/glassfish/jersey/tests/performance/mbw/kryo/PersonResourceTest.java b/tests/performance/test-cases/mbw-kryo/src/test/java/org/glassfish/jersey/tests/performance/mbw/kryo/PersonResourceTest.java index 481e103c72..adbe06f200 100644 --- a/tests/performance/test-cases/mbw-kryo/src/test/java/org/glassfish/jersey/tests/performance/mbw/kryo/PersonResourceTest.java +++ b/tests/performance/test-cases/mbw-kryo/src/test/java/org/glassfish/jersey/tests/performance/mbw/kryo/PersonResourceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -18,6 +18,7 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.client.ClientConfig; @@ -46,7 +47,7 @@ protected void configureClient(final ClientConfig config) { @Test public void testGet() { - final Person getResponse = target().request().get(Person.class); + final Person getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, "application/x-kryo").get(Person.class); assertEquals("Wolfgang", getResponse.name); assertEquals(21, getResponse.age); assertEquals("Salzburg", getResponse.address); diff --git a/tests/performance/test-cases/mbw-text-plain/src/test/java/org/glassfish/jersey/tests/performance/mbw/text/TextEntityTest.java b/tests/performance/test-cases/mbw-text-plain/src/test/java/org/glassfish/jersey/tests/performance/mbw/text/TextEntityTest.java index 7099171d32..a0e4615c72 100644 --- a/tests/performance/test-cases/mbw-text-plain/src/test/java/org/glassfish/jersey/tests/performance/mbw/text/TextEntityTest.java +++ b/tests/performance/test-cases/mbw-text-plain/src/test/java/org/glassfish/jersey/tests/performance/mbw/text/TextEntityTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -18,6 +18,8 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -39,7 +41,7 @@ protected Application configure() { @Test public void testGet() { - final String getResponse = target().request().get(String.class); + final String getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); assertEquals("text", getResponse); } diff --git a/tests/performance/test-cases/mbw-xml-jaxb/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java b/tests/performance/test-cases/mbw-xml-jaxb/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java index 17f67bca7e..ca4bb748d4 100644 --- a/tests/performance/test-cases/mbw-xml-jaxb/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java +++ b/tests/performance/test-cases/mbw-xml-jaxb/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -18,6 +18,8 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -39,7 +41,8 @@ protected Application configure() { @Test public void testGet() { - final Person getResponse = target().request().get(Person.class); + final Person getResponse = target().request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(Person.class); assertEquals("Wolfgang", getResponse.name); assertEquals(21, getResponse.age); assertEquals("Salzburg", getResponse.address); diff --git a/tests/performance/test-cases/mbw-xml-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java b/tests/performance/test-cases/mbw-xml-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java index 3e21ccd70b..18b0e3c033 100644 --- a/tests/performance/test-cases/mbw-xml-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java +++ b/tests/performance/test-cases/mbw-xml-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 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 @@ -18,6 +18,8 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.client.ClientConfig; @@ -46,7 +48,8 @@ protected void configureClient(ClientConfig config) { @Test public void testGet() { - final Person getResponse = target().request().get(Person.class); + final Person getResponse = target().request() + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(Person.class); assertEquals("Wolfgang", getResponse.name); assertEquals(21, getResponse.age); assertEquals("Salzburg", getResponse.address); From ad2d70f9cf8990b6137034bdaffab5271c30e036 Mon Sep 17 00:00:00 2001 From: jansupol <15908245+jansupol@users.noreply.github.com> Date: Mon, 22 Nov 2021 16:25:54 +0100 Subject: [PATCH 12/20] Missing Content-Type header should be application/octet-stream optionally (#4911) Signed-off-by: jansupol --- bundles/jaxrs-ri/pom.xml | 2 +- .../jersey/server/ServerProperties.java | 43 ++++++------------- .../AbstractMethodSelectingRouter.java | 2 +- ... => OctetStreamMethodSelectingRouter.java} | 15 ++++--- .../internal/routing/RuntimeModelBuilder.java | 19 ++++---- ...ava => WildcardMethodSelectingRouter.java} | 4 +- .../model/ConsumeProduceSimpleTest.java | 30 ++++++++----- docs/src/main/docbook/appendix-properties.xml | 22 ++++++---- docs/src/main/docbook/migration.xml | 16 ------- etc/jenkins/jenkins_build.sh | 3 +- .../exception/ExceptionMappingFilterTest.java | 4 +- .../examples/httppatch/HttpPatchTest.java | 10 ++--- .../jersey/examples/jaxb/JaxbTest.java | 34 +++++---------- .../jsonp/JsonProcessingResourceTest.java | 10 ++--- .../server/async/AsyncResourceTest.java | 4 +- .../examples/sysprops/SysPropsTest.java | 11 +---- .../jersey/kryo/PersonResourceBaseTest.java | 3 +- .../tests/e2e/client/ClientPathTest.java | 11 ++--- .../tests/e2e/entity/EntityTypesTest.java | 8 ++-- .../jersey/tests/e2e/entity/JsonMoxyTest.java | 11 +++-- .../jersey/tests/e2e/entity/XmlMoxyTest.java | 8 ++-- .../e2e/entity/filtering/EmptyEntityTest.java | 7 +-- .../filtering/EntityFilteringOnClassTest.java | 22 +++------- .../EntityFilteringOnPropertiesTest.java | 22 +++------- .../filtering/EntityFilteringScopesTest.java | 4 +- .../filtering/json/JsonEmptyEntityTest.java | 8 +--- .../json/JsonEntityFilteringOnClassTest.java | 17 +++----- .../JsonEntityFilteringOnPropertiesTest.java | 16 +++---- .../json/JsonEntityFilteringScopesTest.java | 5 +-- ...tractDisableMetainfServicesLookupTest.java | 4 +- .../jersey/tests/e2e/ClientTest.java | 5 +-- .../jersey2255/Jersey2255ITCase.java | 13 ++---- .../scanning/PackageNamesScannerTest.java | 4 +- .../filter/dynamic/FilterTest.java | 4 +- .../performance/filter/global/FilterTest.java | 4 +- .../performance/filter/name/FilterTest.java | 4 +- .../interceptor/dynamic/InterceptorTest.java | 4 +- .../interceptor/global/InterceptorTest.java | 4 +- .../interceptor/name/InterceptorTest.java | 4 +- .../mbw/custom/PersonEntityTest.java | 3 +- .../performance/mbw/json/JsonEntityTest.java | 5 +-- .../performance/mbw/json/JsonEntityTest.java | 5 +-- .../mbw/kryo/PersonResourceTest.java | 3 +- .../performance/mbw/text/TextEntityTest.java | 4 +- .../performance/mbw/xml/XmlEntityTest.java | 5 +-- .../performance/mbw/xml/XmlEntityTest.java | 5 +-- 46 files changed, 164 insertions(+), 287 deletions(-) rename core-server/src/main/java/org/glassfish/jersey/server/internal/routing/{MethodSelectingRouter.java => OctetStreamMethodSelectingRouter.java} (82%) rename core-server/src/main/java/org/glassfish/jersey/server/internal/routing/{MethodSelectingRouter2x.java => WildcardMethodSelectingRouter.java} (93%) diff --git a/bundles/jaxrs-ri/pom.xml b/bundles/jaxrs-ri/pom.xml index 09982bdf98..8cf76138dc 100644 --- a/bundles/jaxrs-ri/pom.xml +++ b/bundles/jaxrs-ri/pom.xml @@ -314,7 +314,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.1.0 + 3.2.4 package diff --git a/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java b/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java index 98724ff4a1..4c06c5c280 100644 --- a/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java +++ b/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java @@ -743,35 +743,20 @@ public final class ServerProperties { /** *

- * When an HTTP request does not contain a media type, the media type should default to {@code application/octet-stream}. - * In the past, Jersey used to match any {@code @Consumes} when the HTTP {@code Content-Type} header was not set. - * This property is to preserve the behaviour. Such behaviour is potentially dangerous, though. - * The default behaviour is to set the request media type to {@code application/octet-stream} when none set. - * This is a Jakarta REST requirement. - *

- *

- * This change can be can be eminent especially for HTTP resource methods which do not expect an entity, such as HTTP GET: - *

-     * {@code
-     * @Consumes(MediaType.TEXT_PLAIN)
-     * @Produces(MediaType.TEXT_PLAIN)
-     * @Path("/")
-     * public class Resource {
-     *     @GET
-     *     public String get() {
-     *         return ...
-     *     }
-     * }
-     * }
-     * 
- * The client request needs to contain the {@code Content-Type} HTTP header, for instance: - * {@code - * webTarget.request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get() - * } - *

- *

- * Set this property to true, if the empty request media type is to match any {@code @Consumes}. The default is {@code false}. - * The name of the configuration property is {@value}. + * Jakarta RESTful WebServices provides {@code @Consumes} annotation to accept only HTTP requests with compatible + * {@code Content-Type} header. However, when the header is missing a wildcard media type is used to + * match the {@code @Consumes} annotation. + *

+ *

HTTP/1.1 RFCrecommends that missing + * {@code Content-Type} header MAY default to {@code application/octet-stream}. This property makes Jersey consider the + * missing HTTP {@code Content-Type} header to be {@code application/octet-stream} rather than a wildcard + * media type. However, for a resource method without an entity argument, such as for HTTP GET, a wildcard media type + * is still considered to accept the HTTP request for the missing HTTP {@code Content-Type} header. + *

+ *

+ * Set this property to false, if the empty request media type should not to match applied {@code @Consumes} annotation + * on a resource method with an entity argument. The default is {@code true}. The name of the configuration property is + * {@value}. *

* @since 3.1.0 */ diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/AbstractMethodSelectingRouter.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/AbstractMethodSelectingRouter.java index f75ffaf352..160bb17e3d 100644 --- a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/AbstractMethodSelectingRouter.java +++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/AbstractMethodSelectingRouter.java @@ -59,7 +59,7 @@ abstract class AbstractMethodSelectingRouter extends ContentTypeDeterminer implements Router { - private static final Logger LOGGER = Logger.getLogger(MethodSelectingRouter.class.getName()); + private static final Logger LOGGER = Logger.getLogger(AbstractMethodSelectingRouter.class.getName()); private static final Comparator CONSUMES_PRODUCES_ACCEPTOR_COMPARATOR = new Comparator() { diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/OctetStreamMethodSelectingRouter.java similarity index 82% rename from core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter.java rename to core-server/src/main/java/org/glassfish/jersey/server/internal/routing/OctetStreamMethodSelectingRouter.java index 70f9218621..47b30a8f5e 100644 --- a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter.java +++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/OctetStreamMethodSelectingRouter.java @@ -21,6 +21,7 @@ import org.glassfish.jersey.internal.routing.CombinedMediaType; import org.glassfish.jersey.message.MessageBodyWorkers; import org.glassfish.jersey.server.ContainerRequest; +import org.glassfish.jersey.server.model.ResourceMethod; /** * A single router responsible for selecting a single method from all the methods @@ -29,11 +30,8 @@ * The method selection algorithm selects the handling method based on the HTTP request * method name, requested media type as well as defined resource method media type * capabilities. - * - * @author Jakub Podlesak - * @author Marek Potociar */ -final class MethodSelectingRouter extends AbstractMethodSelectingRouter implements Router { +final class OctetStreamMethodSelectingRouter extends AbstractMethodSelectingRouter implements Router { /** * Create a new {@code MethodSelectingRouter} for all the methods on the same path. @@ -44,7 +42,7 @@ final class MethodSelectingRouter extends AbstractMethodSelectingRouter implemen * @param workers message body workers. * @param methodRoutings [method model, method methodAcceptorPair] pairs. */ - MethodSelectingRouter(MessageBodyWorkers workers, List methodRoutings) { + OctetStreamMethodSelectingRouter(MessageBodyWorkers workers, List methodRoutings) { super(workers, methodRoutings); } @@ -72,8 +70,11 @@ private ConsumesProducesAcceptor( */ boolean isConsumable(ContainerRequest requestContext) { MediaType contentType = requestContext.getMediaType(); - contentType = contentType == null ? MediaType.APPLICATION_OCTET_STREAM_TYPE : contentType; - return consumes.getMediaType().isCompatible(contentType); + if (contentType == null && methodRouting.method.getType() != ResourceMethod.JaxrsType.SUB_RESOURCE_LOCATOR + && methodRouting.method.getInvocable().requiresEntity()) { + contentType = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } + return contentType == null || consumes.getMediaType().isCompatible(contentType); } } } diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/RuntimeModelBuilder.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/RuntimeModelBuilder.java index ee69bf787f..10ce9034cb 100644 --- a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/RuntimeModelBuilder.java +++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/RuntimeModelBuilder.java @@ -20,7 +20,6 @@ import java.util.Collection; import java.util.Collections; import java.util.List; -import java.util.Properties; import java.util.function.Function; import jakarta.ws.rs.core.Configuration; @@ -57,7 +56,7 @@ final class RuntimeModelBuilder { // SubResourceLocator Model Builder. private final Value locatorBuilder; - private final boolean is2xMethodSelectingRouter; + private final boolean isWildcardMethodSelectingRouter; /** * Create a new instance of the runtime model builder. @@ -86,8 +85,8 @@ public RuntimeModelBuilder( this.locatorBuilder = Values.lazy((Value) () -> new RuntimeLocatorModelBuilder(config, messageBodyWorkers, valueSuppliers, resourceContext, RuntimeModelBuilder.this, modelProcessors, createServiceFunction)); - this.is2xMethodSelectingRouter = ServerProperties.getValue(config.getProperties(), - ServerProperties.EMPTY_REQUEST_MEDIA_TYPE_MATCHES_ANY_CONSUMES, false); + this.isWildcardMethodSelectingRouter = ServerProperties.getValue(config.getProperties(), + ServerProperties.EMPTY_REQUEST_MEDIA_TYPE_MATCHES_ANY_CONSUMES, true); } private Router createMethodRouter(final ResourceMethod resourceMethod) { @@ -154,9 +153,9 @@ public Router buildModel(final RuntimeResourceModel resourceModel, final boolean // resource methods if (!resource.getResourceMethods().isEmpty()) { final List methodRoutings = createResourceMethodRouters(resource, subResourceMode); - final Router methodSelectingRouter = is2xMethodSelectingRouter - ? new MethodSelectingRouter2x(messageBodyWorkers, methodRoutings) - : new MethodSelectingRouter(messageBodyWorkers, methodRoutings); + final Router methodSelectingRouter = isWildcardMethodSelectingRouter + ? new WildcardMethodSelectingRouter(messageBodyWorkers, methodRoutings) + : new OctetStreamMethodSelectingRouter(messageBodyWorkers, methodRoutings); if (subResourceMode) { currentRouterBuilder = startNextRoute(currentRouterBuilder, PathPattern.END_OF_PATH_PATTERN) .to(resourcePushingRouter) @@ -185,9 +184,9 @@ public Router buildModel(final RuntimeResourceModel resourceModel, final boolean srRoutedBuilder = startNextRoute(srRoutedBuilder, childClosedPattern) .to(uriPushingRouter) .to(childResourcePushingRouter) - .to(is2xMethodSelectingRouter - ? new MethodSelectingRouter2x(messageBodyWorkers, childMethodRoutings) - : new MethodSelectingRouter(messageBodyWorkers, childMethodRoutings)); + .to(isWildcardMethodSelectingRouter + ? new WildcardMethodSelectingRouter(messageBodyWorkers, childMethodRoutings) + : new OctetStreamMethodSelectingRouter(messageBodyWorkers, childMethodRoutings)); } // sub resource locator diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter2x.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/WildcardMethodSelectingRouter.java similarity index 93% rename from core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter2x.java rename to core-server/src/main/java/org/glassfish/jersey/server/internal/routing/WildcardMethodSelectingRouter.java index 3fa64a0f1b..c9f2e49456 100644 --- a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter2x.java +++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/WildcardMethodSelectingRouter.java @@ -33,7 +33,7 @@ * @author Jakub Podlesak * @author Marek Potociar */ -final class MethodSelectingRouter2x extends AbstractMethodSelectingRouter implements Router { +final class WildcardMethodSelectingRouter extends AbstractMethodSelectingRouter implements Router { /** * Create a new {@code MethodSelectingRouter} for all the methods on the same path. @@ -44,7 +44,7 @@ final class MethodSelectingRouter2x extends AbstractMethodSelectingRouter implem * @param workers message body workers. * @param methodRoutings [method model, method methodAcceptorPair] pairs. */ - MethodSelectingRouter2x(MessageBodyWorkers workers, List methodRoutings) { + WildcardMethodSelectingRouter(MessageBodyWorkers workers, List methodRoutings) { super(workers, methodRoutings); } diff --git a/core-server/src/test/java/org/glassfish/jersey/server/model/ConsumeProduceSimpleTest.java b/core-server/src/test/java/org/glassfish/jersey/server/model/ConsumeProduceSimpleTest.java index 3aff3e87cc..bd4cf3c639 100644 --- a/core-server/src/test/java/org/glassfish/jersey/server/model/ConsumeProduceSimpleTest.java +++ b/core-server/src/test/java/org/glassfish/jersey/server/model/ConsumeProduceSimpleTest.java @@ -47,9 +47,9 @@ private ApplicationHandler createApplication(Class... classes) { return new ApplicationHandler(new ResourceConfig(classes)); } - private ApplicationHandler create2xApplication(Class... classes) { + private ApplicationHandler createAppOctetStreamApplication(Class... classes) { return new ApplicationHandler( - new ResourceConfig(classes).property(ServerProperties.EMPTY_REQUEST_MEDIA_TYPE_MATCHES_ANY_CONSUMES, true) + new ResourceConfig(classes).property(ServerProperties.EMPTY_REQUEST_MEDIA_TYPE_MATCHES_ANY_CONSUMES, false) ); } @@ -154,7 +154,7 @@ public void testProduceSimpleBean() throws Exception { assertEquals("XHTML", app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/xhtml").build()).get().getEntity()); - app = create2xApplication(ProduceSimpleBean.class); + app = createAppOctetStreamApplication(ProduceSimpleBean.class); assertEquals("HTML", app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/html").build()).get().getEntity()); assertEquals("XHTML", @@ -172,28 +172,38 @@ public void testConsumeProduceSimpleBean() throws Exception { app.apply(RequestContextBuilder.from("/a/b", "POST").entity("").type("text/xhtml").accept("text/xhtml").build()) .get().getEntity()); - assertEquals(415, - app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/html").build()) - .get().getStatus() + assertEquals("HTML", + app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/html").build()).get().getEntity() ); assertEquals("HTML", app.apply(RequestContextBuilder.from("/a/b", "GET").type("text/html").accept("text/html").build()) .get().getEntity() ); - assertEquals(415, - app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/xhtml").build()) - .get().getStatus() + assertEquals("XHTML", + app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/xhtml").build()).get().getEntity() ); assertEquals("XHTML", app.apply(RequestContextBuilder.from("/a/b", "GET").type("text/xhtml").accept("text/xhtml").build()) .get().getEntity() ); - app = create2xApplication(ConsumeProduceSimpleBean.class); + app = createAppOctetStreamApplication(ConsumeProduceSimpleBean.class); assertEquals("HTML", app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/html").build()).get().getEntity()); assertEquals("XHTML", app.apply(RequestContextBuilder.from("/a/b", "GET").accept("text/xhtml").build()).get().getEntity()); + + assertEquals(415, + app.apply(RequestContextBuilder.from("/a/b", "POST").entity("").accept("text/html").build()).get().getStatus()); + assertEquals(415, + app.apply(RequestContextBuilder.from("/a/b", "POST").entity("").accept("text/xhtml").build()).get().getStatus()); + + assertEquals("HTML", + app.apply(RequestContextBuilder.from("/a/b", "POST").entity("").type("text/html").accept("text/html").build()) + .get().getEntity()); + assertEquals("XHTML", + app.apply(RequestContextBuilder.from("/a/b", "POST").entity("").type("text/xhtml").accept("text/xhtml").build()) + .get().getEntity()); } @Path("/") diff --git a/docs/src/main/docbook/appendix-properties.xml b/docs/src/main/docbook/appendix-properties.xml index 501ff27d74..22cf2760a4 100644 --- a/docs/src/main/docbook/appendix-properties.xml +++ b/docs/src/main/docbook/appendix-properties.xml @@ -277,16 +277,22 @@ jersey.config.server.empty.request.media.matches.any.consumes - When an HTTP request does not contain a media type, the media type should default to - application/octet-stream. In the past, Jersey used to match any - @Consumes when the HTTP Content-Type header was not set. - This property is to preserve the behaviour. Such behaviour is potentially dangerous, though. - The default behaviour is to set the request media type to - application/octet-stream when none set. This is a Jakarta REST requirement. + Jakarta RESTful WebServices provides @Consumes annotation to accept only HTTP + requests with compatible HTTP Content-Type header. However, when the header + is missing a wildcard media type is used to match the @Consumes annotation. - Set this property to true, if the empty request media type is to match any - @Consumes. The default value is false. + HTTP/1.1 RFC recommends that missing HTTP Content-Type header MAY default to + application/octet-stream. This property makes Jersey consider the missing HTTP + Content-Type header to be application/octet-stream rather + than a wildcard media type. However, for a resource method without an entity argument, such as + for HTTP GET, a wildcard media type is still considered to accept the HTTP request for + the missing HTTP Content-Type header. + + + Set this property to false, if the empty request media type should not to match + applied @Consumes annotation on a resource method with an entity argument. The + default is true.
diff --git a/docs/src/main/docbook/migration.xml b/docs/src/main/docbook/migration.xml index 542edc1a65..3b68582561 100644 --- a/docs/src/main/docbook/migration.xml +++ b/docs/src/main/docbook/migration.xml @@ -96,22 +96,6 @@ supports JDK 8. - - - Since Jersey 3.1.0 when incoming the HTTP request does not contain content type, the - application/octet-stream is considered, as required by the Jakarta REST - Specification and HTTP/1.1 RFC 2616. As a consequence, a resource method with non-wildcard - @Consumes annotation is not matched with the request without the - Content-Type HTTP header. This is typically the case of HTTP requests without an entity, - such as HTTP GET requests, where the Content-Type header is not set. - - - When using the @Consumes annotation, the Content-Type HTTP header must be set. - The previous behaviour when the missing Content-Type HTTP header matched any resource method - with @Consumes annotation, the - &jersey.server.ServerProperties.EMPTY_REQUEST_MEDIA_TYPE_MATCHES_ANY_CONSUMES; property can be set. - - &jersey.server.ServerProperties.UNWRAP_COMPLETION_STAGE_IN_WRITER_ENABLE; is by default diff --git a/etc/jenkins/jenkins_build.sh b/etc/jenkins/jenkins_build.sh index e612cbbc3f..dbebc8689c 100644 --- a/etc/jenkins/jenkins_build.sh +++ b/etc/jenkins/jenkins_build.sh @@ -2,4 +2,5 @@ export DEBUG=true -mvn -V -U -B -e clean install glassfish-copyright:check -Dcopyright.quiet=false \ No newline at end of file +mvn -V -U -B -e clean install glassfish-copyright:check -Dcopyright.quiet=false + diff --git a/examples/exception-mapping/src/test/java/org/glassfish/jersey/examples/exception/ExceptionMappingFilterTest.java b/examples/exception-mapping/src/test/java/org/glassfish/jersey/examples/exception/ExceptionMappingFilterTest.java index e8c242fae5..0b641f125f 100644 --- a/examples/exception-mapping/src/test/java/org/glassfish/jersey/examples/exception/ExceptionMappingFilterTest.java +++ b/examples/exception-mapping/src/test/java/org/glassfish/jersey/examples/exception/ExceptionMappingFilterTest.java @@ -12,8 +12,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.client.WebTarget; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.UriBuilder; @@ -68,7 +66,7 @@ public void testWebApplicationExceptionInRequestFilter() { @Test public void testWebApplicationExceptionInResponseFilter() { WebTarget t = client().target(UriBuilder.fromUri(getBaseUri()).path(App.ROOT_PATH).path("response_exception").build()); - Response r = t.request("text/plain").header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(); + Response r = t.request("text/plain").get(); assertEquals(200, r.getStatus()); final String entity = r.readEntity(String.class); System.out.println("entity = " + entity); diff --git a/examples/http-patch/src/test/java/org/glassfish/jersey/examples/httppatch/HttpPatchTest.java b/examples/http-patch/src/test/java/org/glassfish/jersey/examples/httppatch/HttpPatchTest.java index a3395ce5ee..fa8d4d8768 100644 --- a/examples/http-patch/src/test/java/org/glassfish/jersey/examples/httppatch/HttpPatchTest.java +++ b/examples/http-patch/src/test/java/org/glassfish/jersey/examples/httppatch/HttpPatchTest.java @@ -12,7 +12,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.client.WebTarget; -import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.json.Json; @@ -63,8 +62,7 @@ public void testPatch() { // initial precondition check final State expected = new State(); - assertEquals(expected, target.request(MediaType.APPLICATION_JSON) - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(State.class)); + assertEquals(expected, target.request(MediaType.APPLICATION_JSON).get(State.class)); // apply first patch expected.setMessage("patchedMessage"); @@ -96,8 +94,7 @@ public void testPatch() { assertEquals(expected, target.request() .method("PATCH", Entity.entity(patch_1, MediaType.APPLICATION_JSON_PATCH_JSON), State.class)); - assertEquals(expected, target.request(MediaType.APPLICATION_JSON) - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(State.class)); + assertEquals(expected, target.request(MediaType.APPLICATION_JSON).get(State.class)); // apply second patch expected.getList().add("three"); @@ -112,7 +109,6 @@ public void testPatch() { assertEquals(expected, target.request() .method("PATCH", Entity.entity(patch_2, MediaType.APPLICATION_JSON_PATCH_JSON), State.class)); - assertEquals(expected, target.request("application/json") - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(State.class)); + assertEquals(expected, target.request("application/json").get(State.class)); } } diff --git a/examples/jaxb/src/test/java/org/glassfish/jersey/examples/jaxb/JaxbTest.java b/examples/jaxb/src/test/java/org/glassfish/jersey/examples/jaxb/JaxbTest.java index 6c22e21612..17109c6f92 100644 --- a/examples/jaxb/src/test/java/org/glassfish/jersey/examples/jaxb/JaxbTest.java +++ b/examples/jaxb/src/test/java/org/glassfish/jersey/examples/jaxb/JaxbTest.java @@ -16,7 +16,6 @@ import jakarta.ws.rs.core.GenericType; import static jakarta.ws.rs.client.Entity.xml; -import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.xml.bind.JAXBElement; import javax.xml.namespace.QName; @@ -57,8 +56,7 @@ public void testApplicationWadl() { @Test public void testRootElement() { - JaxbXmlRootElement e1 = target().path("jaxb/XmlRootElement").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(JaxbXmlRootElement.class); + JaxbXmlRootElement e1 = target().path("jaxb/XmlRootElement").request().get(JaxbXmlRootElement.class); JaxbXmlRootElement e2 = target().path("jaxb/XmlRootElement").request("application/xml") .post(xml(e1), JaxbXmlRootElement.class); @@ -68,11 +66,9 @@ public void testRootElement() { @Test public void testRootElementWithHeader() { - String e1 = target().path("jaxb/XmlRootElement").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(String.class); + String e1 = target().path("jaxb/XmlRootElement").request().get(String.class); - String e2 = target().path("jaxb/XmlRootElementWithHeader").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(String.class); + String e2 = target().path("jaxb/XmlRootElementWithHeader").request().get(String.class); assertTrue(e2.contains("") && e2.contains(e1.substring(e1.indexOf("?>") + 2).trim())); } @@ -80,8 +76,7 @@ public void testRootElementWithHeader() { public void testJAXBElement() { GenericType> genericType = new GenericType>() {}; - JAXBElement e1 = target().path("jaxb/JAXBElement").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(genericType); + JAXBElement e1 = target().path("jaxb/JAXBElement").request().get(genericType); JAXBElement e2 = target().path("jaxb/JAXBElement").request(MediaType.APPLICATION_XML) .post(xml(e1), genericType); @@ -91,8 +86,7 @@ public void testJAXBElement() { @Test public void testXmlType() { - JaxbXmlType t1 = target().path("jaxb/JAXBElement").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(JaxbXmlType.class); + JaxbXmlType t1 = target().path("jaxb/JAXBElement").request().get(JaxbXmlType.class); JAXBElement e = new JAXBElement( new QName("jaxbXmlRootElement"), @@ -110,8 +104,7 @@ public void testRootElementCollection() { GenericType> genericType = new GenericType>() {}; - Collection ce1 = target().path("jaxb/collection/XmlRootElement").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(genericType); + Collection ce1 = target().path("jaxb/collection/XmlRootElement").request().get(genericType); Collection ce2 = target().path("jaxb/collection/XmlRootElement").request(MediaType.APPLICATION_XML) .post(xml(new GenericEntity>(ce1) {}), genericType); @@ -126,22 +119,19 @@ public void testXmlTypeCollection() { new GenericType>() { }; - Collection ce1 = target().path("jaxb/collection/XmlRootElement").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(genericRootElement); + Collection ce1 = target().path("jaxb/collection/XmlRootElement").request().get(genericRootElement); Collection ct1 = target().path("jaxb/collection/XmlType").request(MediaType.APPLICATION_XML) .post(xml(new GenericEntity>(ce1) {}), genericXmlType); - Collection ct2 = target().path("jaxb/collection/XmlRootElement").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(genericXmlType); + Collection ct2 = target().path("jaxb/collection/XmlRootElement").request().get(genericXmlType); assertEquals(ct1, ct2); } @Test public void testRootElementArray() { - JaxbXmlRootElement[] ae1 = target().path("jaxb/array/XmlRootElement").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(JaxbXmlRootElement[].class); + JaxbXmlRootElement[] ae1 = target().path("jaxb/array/XmlRootElement").request().get(JaxbXmlRootElement[].class); JaxbXmlRootElement[] ae2 = target().path("jaxb/array/XmlRootElement").request(MediaType.APPLICATION_XML) .post(xml(ae1), JaxbXmlRootElement[].class); @@ -153,14 +143,12 @@ public void testRootElementArray() { @Test public void testXmlTypeArray() { - JaxbXmlRootElement[] ae1 = target().path("jaxb/array/XmlRootElement").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(JaxbXmlRootElement[].class); + JaxbXmlRootElement[] ae1 = target().path("jaxb/array/XmlRootElement").request().get(JaxbXmlRootElement[].class); JaxbXmlType[] at1 = target().path("jaxb/array/XmlType").request(MediaType.APPLICATION_XML) .post(xml(ae1), JaxbXmlType[].class); - JaxbXmlType[] at2 = target().path("jaxb/array/XmlRootElement").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(JaxbXmlType[].class); + JaxbXmlType[] at2 = target().path("jaxb/array/XmlRootElement").request().get(JaxbXmlType[].class); assertEquals(at1.length, at2.length); for (int i = 0; i < at1.length; i++) { diff --git a/examples/json-processing-webapp/src/test/java/org/glassfish/jersey/examples/jsonp/JsonProcessingResourceTest.java b/examples/json-processing-webapp/src/test/java/org/glassfish/jersey/examples/jsonp/JsonProcessingResourceTest.java index 885ca4486b..ef21a7bf50 100644 --- a/examples/json-processing-webapp/src/test/java/org/glassfish/jersey/examples/jsonp/JsonProcessingResourceTest.java +++ b/examples/json-processing-webapp/src/test/java/org/glassfish/jersey/examples/jsonp/JsonProcessingResourceTest.java @@ -20,7 +20,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.client.WebTarget; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.UriBuilder; @@ -87,18 +86,15 @@ public void testStoreGetRemoveDocument() throws Exception { // Get. final String id = ids.get(0).toString(); final WebTarget documentTarget = target("document").path(id); - final JsonObject storedDocument = documentTarget.request(MediaType.APPLICATION_JSON) - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(JsonObject.class); + final JsonObject storedDocument = documentTarget.request(MediaType.APPLICATION_JSON).get(JsonObject.class); assertEquals(document, storedDocument); // Remove. - final JsonObject removedDocument = documentTarget.request(MediaType.APPLICATION_JSON) - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).delete(JsonObject.class); + final JsonObject removedDocument = documentTarget.request(MediaType.APPLICATION_JSON).delete(JsonObject.class); assertEquals(document, removedDocument); // Get. - final Response errorResponse = documentTarget.request(MediaType.APPLICATION_JSON) - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(); + final Response errorResponse = documentTarget.request(MediaType.APPLICATION_JSON).get(); assertEquals(204, errorResponse.getStatus()); } diff --git a/examples/server-async/src/test/java/org/glassfish/jersey/examples/server/async/AsyncResourceTest.java b/examples/server-async/src/test/java/org/glassfish/jersey/examples/server/async/AsyncResourceTest.java index 1abe7bba2f..319cdd9db9 100644 --- a/examples/server-async/src/test/java/org/glassfish/jersey/examples/server/async/AsyncResourceTest.java +++ b/examples/server-async/src/test/java/org/glassfish/jersey/examples/server/async/AsyncResourceTest.java @@ -28,8 +28,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.client.WebTarget; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import org.glassfish.jersey.internal.guava.ThreadFactoryBuilder; import org.glassfish.jersey.process.JerseyProcessingUncaughtExceptionHandler; import org.glassfish.jersey.server.ResourceConfig; @@ -148,7 +146,7 @@ private void get() { attemptCounter++; try { final String response = resourceTarget.queryParam("id", requestId).request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); + .get(String.class); getResponses.put(requestId, response); break; } catch (Throwable t) { diff --git a/examples/system-properties-example/src/test/java/org/glassfish/jersey/examples/sysprops/SysPropsTest.java b/examples/system-properties-example/src/test/java/org/glassfish/jersey/examples/sysprops/SysPropsTest.java index 7c724d2f5e..aa72d530fe 100644 --- a/examples/system-properties-example/src/test/java/org/glassfish/jersey/examples/sysprops/SysPropsTest.java +++ b/examples/system-properties-example/src/test/java/org/glassfish/jersey/examples/sysprops/SysPropsTest.java @@ -10,14 +10,8 @@ package org.glassfish.jersey.examples.sysprops; -import java.util.Collections; import java.util.Set; -import jakarta.ws.rs.core.Form; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; -import jakarta.ws.rs.core.MultivaluedHashMap; -import jakarta.ws.rs.core.MultivaluedMap; import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.proxy.WebResourceFactory; import org.glassfish.jersey.server.ResourceConfig; @@ -46,11 +40,8 @@ protected void configureClient(ClientConfig config) { @Test public void testGetPropertyNames() { - MultivaluedMap headers = new MultivaluedHashMap<>(); - headers.add(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN); + PropertyNamesResource propertyNamesResource = WebResourceFactory.newResource(PropertyNamesResource.class, target()); - PropertyNamesResource propertyNamesResource = WebResourceFactory - .newResource(PropertyNamesResource.class, target(), false, headers, Collections.emptyList(), new Form()); Set propertyNames = propertyNamesResource.getPropertyNames(); assertEquals(System.getProperties().stringPropertyNames(), propertyNames); } diff --git a/incubator/kryo/src/test/java/org/glassfish/jersey/kryo/PersonResourceBaseTest.java b/incubator/kryo/src/test/java/org/glassfish/jersey/kryo/PersonResourceBaseTest.java index 529d00f91a..860aeb2365 100644 --- a/incubator/kryo/src/test/java/org/glassfish/jersey/kryo/PersonResourceBaseTest.java +++ b/incubator/kryo/src/test/java/org/glassfish/jersey/kryo/PersonResourceBaseTest.java @@ -16,7 +16,6 @@ package org.glassfish.jersey.kryo; -import jakarta.ws.rs.core.HttpHeaders; import org.glassfish.jersey.test.JerseyTest; import org.junit.Test; @@ -29,7 +28,7 @@ public abstract class PersonResourceBaseTest extends JerseyTest { @Test public void testGet() { - final Person getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, "application/x-kryo").get(Person.class); + final Person getResponse = target().request().get(Person.class); assertEquals("Wolfgang", getResponse.name); assertEquals(21, getResponse.age); assertEquals("Salzburg", getResponse.address); diff --git a/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/ClientPathTest.java b/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/ClientPathTest.java index 6ea796c52a..c2b9c9b567 100644 --- a/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/ClientPathTest.java +++ b/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/ClientPathTest.java @@ -23,7 +23,6 @@ import jakarta.ws.rs.Produces; import jakarta.ws.rs.client.Client; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; @@ -55,7 +54,6 @@ public void pathParamInTargetTest() { Response response = client().target("http://localhost:" + getPort() + "/test/{beginBy}") .resolveTemplate("beginBy", "abc") .request(MediaType.TEXT_PLAIN_TYPE) - .header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_TYPE) .get(); assertEquals(200, response.getStatus()); assertEquals("test-get,abc", response.readEntity(String.class)); @@ -68,7 +66,6 @@ public void pathParamInTargetTest() { public void pathConcatenationTest1() { Response response = client().target("http://localhost:" + getPort()).path("path") .request(MediaType.TEXT_PLAIN_TYPE) - .header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_TYPE) .get(); assertEquals(200, response.getStatus()); assertEquals("test-path", response.readEntity(String.class)); @@ -80,7 +77,7 @@ public void pathConcatenationTest1() { @Test public void pathConcatenationTest2() { Response response = client().target("http://localhost:" + getPort()).path("/path").request(MediaType.TEXT_PLAIN_TYPE) - .header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_TYPE).get(); + .get(); assertEquals(200, response.getStatus()); assertEquals("test-path", response.readEntity(String.class)); } @@ -91,7 +88,7 @@ public void pathConcatenationTest2() { @Test public void pathConcatenationTest3() { Response response = client().target("http://localhost:" + getPort()).path("/path/").path("/another/") - .request(MediaType.TEXT_PLAIN_TYPE).header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_TYPE).get(); + .request(MediaType.TEXT_PLAIN_TYPE).get(); assertEquals(200, response.getStatus()); assertEquals("test-another-path", response.readEntity(String.class)); } @@ -102,7 +99,7 @@ public void pathConcatenationTest3() { @Test public void pathConcatenationTest4() { Response response = client().target("http://localhost:" + getPort()).path("/path").path("another/") - .request(MediaType.TEXT_PLAIN_TYPE).header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_TYPE).get(); + .request(MediaType.TEXT_PLAIN_TYPE).get(); assertEquals(200, response.getStatus()); assertEquals("test-another-path", response.readEntity(String.class)); } @@ -113,7 +110,7 @@ public void pathConcatenationTest4() { @Test public void pathConcatenationTest6() { Response response = client().target("http://localhost:" + getPort() + "/").path("/path/another") - .request(MediaType.TEXT_PLAIN_TYPE).header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_TYPE).get(); + .request(MediaType.TEXT_PLAIN_TYPE).get(); assertEquals(200, response.getStatus()); assertEquals("test-another-path", response.readEntity(String.class)); } diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/EntityTypesTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/EntityTypesTest.java index 4915aa3244..875bbc2f0f 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/EntityTypesTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/EntityTypesTest.java @@ -886,7 +886,7 @@ public JaxbBean[] postType(final JaxbBeanType[] l) { public void testJAXBArrayRepresentation() { final WebTarget target = target("JAXBArrayResource"); - final JaxbBean[] a = target.request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(JaxbBean[].class); + final JaxbBean[] a = target.request().get(JaxbBean[].class); JaxbBean[] b = target.request().post(Entity.entity(a, "application/xml"), JaxbBean[].class); assertEquals(a.length, b.length); for (int i = 0; i < a.length; i++) { @@ -910,7 +910,7 @@ public static class JAXBListResourceMediaType extends JAXBListResource { public void testJAXBListRepresentationMediaType() { final WebTarget target = target("JAXBListResourceMediaType"); - Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, "application/foo+xml").get( + Collection a = target.request().get( new GenericType>() { }); Collection b = target.request() @@ -1049,7 +1049,7 @@ public static class JAXBListResourceJSON extends JAXBListResource { public void testJAXBListRepresentationJSON() throws Exception { final WebTarget target = target("JAXBListResourceJSON"); - Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get( + Collection a = target.request().get( new GenericType>() { }); Collection b = target.request().post(Entity.entity(new GenericEntity>(a) { @@ -1121,7 +1121,7 @@ public static class JAXBListResourceJSONMediaType extends JAXBListResource { public void testJAXBListRepresentationJSONMediaType() throws Exception { final WebTarget target = target("JAXBListResourceJSONMediaType"); - final Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, "application/foo+json").get( + final Collection a = target.request().get( new GenericType>() { }); Collection b = target.request().post(Entity.entity(new GenericEntity>(a) { diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/JsonMoxyTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/JsonMoxyTest.java index 75c998afda..491afddd99 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/JsonMoxyTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/JsonMoxyTest.java @@ -38,7 +38,6 @@ import jakarta.ws.rs.core.Application; import jakarta.ws.rs.core.GenericEntity; import jakarta.ws.rs.core.GenericType; -import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.ext.ContextResolver; @@ -340,7 +339,7 @@ public static class JAXBListResourceJSON extends JAXBListResource { public void testJAXBListRepresentationJSONCollection() throws Exception { final WebTarget target = target("JAXBListResourceJSON"); - final Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get( + final Collection a = target.request().get( new GenericType>() { }); Collection b = target.request().post(Entity.entity(new GenericEntity>(a) { @@ -359,7 +358,7 @@ public void testJAXBListRepresentationJSONCollection() throws Exception { public void testJAXBListRepresentationJSONLinkedList() throws Exception { final WebTarget target = target("JAXBListResourceJSON"); - Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get( + Collection a = target.request().get( new GenericType>() { }); final Collection b; @@ -375,7 +374,7 @@ public void testJAXBListRepresentationJSONLinkedList() throws Exception { public void testJAXBListRepresentationJSONSet() throws Exception { final WebTarget target = target("JAXBListResourceJSON"); - Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get( + Collection a = target.request().get( new GenericType>() { }); final Collection b; @@ -401,7 +400,7 @@ public int compare(final JaxbBean t, final JaxbBean t1) { public void testJAXBListRepresentationJSONStack() throws Exception { final WebTarget target = target("JAXBListResourceJSON"); - final Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get( + final Collection a = target.request().get( new GenericType>() { }); final Collection b; @@ -439,7 +438,7 @@ public static class JAXBListResourceJSONMediaType extends JAXBListResource { public void testJAXBListRepresentationJSONMediaType() throws Exception { final WebTarget target = target("JAXBListResourceJSONMediaType"); - final Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, "application/foo+json").get( + final Collection a = target.request().get( new GenericType>() { }); Collection b = target.request().post(Entity.entity(new GenericEntity>(a) { diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/XmlMoxyTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/XmlMoxyTest.java index f5cac7bca5..de5b32e707 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/XmlMoxyTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/XmlMoxyTest.java @@ -38,7 +38,6 @@ import jakarta.ws.rs.core.Application; import jakarta.ws.rs.core.GenericEntity; import jakarta.ws.rs.core.GenericType; -import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.ext.ContextResolver; @@ -397,7 +396,7 @@ public JaxbBean[] postType(final JaxbBeanType[] l) { public void testJAXBArrayRepresentation() { final WebTarget target = target("JAXBArrayResource"); - final JaxbBean[] a = target.request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(JaxbBean[].class); + final JaxbBean[] a = target.request().get(JaxbBean[].class); JaxbBean[] b = target.request().post(Entity.entity(a, "application/xml"), JaxbBean[].class); assertEquals(a.length, b.length); for (int i = 0; i < a.length; i++) { @@ -421,7 +420,7 @@ public static class JAXBListResourceMediaType extends JAXBListResource { public void testJAXBListRepresentationMediaType() { final WebTarget target = target("JAXBListResourceMediaType"); - Collection a = target.request().header(HttpHeaders.CONTENT_TYPE, "application/foo+xml").get( + Collection a = target.request().get( new GenericType>() { }); Collection b = target.request() @@ -537,8 +536,7 @@ public ComplexJaxbBean get() { @Test public void testAdditionalClasses() throws Exception { - final ComplexJaxbBean nonJaxbBean = target("AdditionalClassesResource").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(ComplexJaxbBean.class); + final ComplexJaxbBean nonJaxbBean = target("AdditionalClassesResource").request().get(ComplexJaxbBean.class); final Object simpleBean = nonJaxbBean.getSimpleBean(); assertThat(simpleBean, notNullValue()); diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EmptyEntityTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EmptyEntityTest.java index ae298f24c2..225d2df7ef 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EmptyEntityTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EmptyEntityTest.java @@ -22,7 +22,6 @@ import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; import org.glassfish.jersey.message.filtering.EntityFilteringFeature; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.test.TestProperties; @@ -71,16 +70,14 @@ protected Application configure() { @Test public void testNonEmptyEntity() throws Exception { - final String fields = target("nonEmptyEntity").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("nonEmptyEntity").request().get(String.class); assertSameFields(fields, "value"); } @Test public void testEmptyEntity() throws Exception { - final String fields = target("emptyEntity").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("emptyEntity").request().get(String.class); assertSameFields(fields, ""); } diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnClassTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnClassTest.java index fa1e839e44..09f16e4f5d 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnClassTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnClassTest.java @@ -24,7 +24,6 @@ import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.message.filtering.EntityFilteringFeature; @@ -116,8 +115,7 @@ public ManyFilteringsOnClassEntity getManyFilteringsEntityManyViews() { @Test public void testOneEntityFilteringOnClass() throws Exception { - final String fields = target("OneFilteringEntity").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("OneFilteringEntity").request().get(String.class); assertSameFields(fields, "field,accessor,property,subEntities.field2,subEntities.property2,subEntities.property1," + "subEntities.field1,defaultEntities.field,defaultEntities.property"); @@ -125,16 +123,14 @@ public void testOneEntityFilteringOnClass() throws Exception { @Test public void testOneEntityFilteringOnClassDefaultViewResponse() throws Exception { - final String fields = target("OneFilteringEntityDefaultViewResponse").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("OneFilteringEntityDefaultViewResponse").request().get(String.class); assertSameFields(fields, ""); } @Test public void testOneEntityFilteringOnClassDefaultView() throws Exception { - final String fields = target("OneFilteringEntityDefaultView").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("OneFilteringEntityDefaultView").request().get(String.class); assertSameFields(fields, ""); } @@ -147,8 +143,7 @@ public void testMultipleViewsOnClass() throws Exception { @Test public void testManyFilteringsEntityPrimaryView() throws Exception { - final String fields = target("ManyFilteringsEntityPrimaryView").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("ManyFilteringsEntityPrimaryView").request().get(String.class); assertSameFields(fields, "field,accessor,property,manyEntities.property1,manyEntities.field1,oneEntities.field2," + "oneEntities.property2,oneEntities.property1,oneEntities.field1,defaultEntities.field,defaultEntities" @@ -157,8 +152,7 @@ public void testManyFilteringsEntityPrimaryView() throws Exception { @Test public void testManyFilteringsEntitySecondaryView() throws Exception { - final String fields = target("ManyFilteringsEntitySecondaryView").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("ManyFilteringsEntitySecondaryView").request().get(String.class); assertSameFields(fields, "field,accessor,property,manyEntities.field2,manyEntities.property2,manyEntities.field1," + "oneEntities.property2,oneEntities.field1,defaultEntities.field,defaultEntities.property"); @@ -166,16 +160,14 @@ public void testManyFilteringsEntitySecondaryView() throws Exception { @Test public void testManyFilteringsEntityDefaultView() throws Exception { - final String fields = target("ManyFilteringsEntityDefaultView").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("ManyFilteringsEntityDefaultView").request().get(String.class); assertSameFields(fields, ""); } @Test public void testManyFilteringsEntityManyViews() throws Exception { - final String fields = target("ManyFilteringsEntityManyViews").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("ManyFilteringsEntityManyViews").request().get(String.class); assertSameFields(fields, "field,accessor,property,manyEntities.field2,manyEntities.property2,manyEntities.property1," + "manyEntities.field1,oneEntities.field2,oneEntities.property2,oneEntities.property1,oneEntities.field1," diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnPropertiesTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnPropertiesTest.java index d532803247..b0abf9c8d4 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnPropertiesTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringOnPropertiesTest.java @@ -24,7 +24,6 @@ import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.message.filtering.EntityFilteringFeature; @@ -117,8 +116,7 @@ public ManyFilteringsOnPropertiesEntity getManyFilteringsEntityManyViews() { @Test public void testOneEntityFilteringOnProperties() throws Exception { - final String fields = target("OneFilteringEntity").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("OneFilteringEntity").request().get(String.class); assertSameFields(fields, "field,accessor,property,subEntities.field2,subEntities.property2,subEntities.property1," + "subEntities.field1,defaultEntities.field,defaultEntities.property"); @@ -126,24 +124,21 @@ public void testOneEntityFilteringOnProperties() throws Exception { @Test public void testOneEntityFilteringOnPropertiesDefaultViewResponse() throws Exception { - final String fields = target("OneFilteringEntityDefaultViewResponse").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("OneFilteringEntityDefaultViewResponse").request().get(String.class); assertSameFields(fields, "field"); } @Test public void testOneEntityFilteringOnPropertiesDefaultView() throws Exception { - final String fields = target("OneFilteringEntityDefaultView").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("OneFilteringEntityDefaultView").request().get(String.class); assertSameFields(fields, "field"); } @Test public void testManyFilteringsEntityPrimaryView() throws Exception { - final String fields = target("ManyFilteringsEntityPrimaryView").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("ManyFilteringsEntityPrimaryView").request().get(String.class); assertSameFields(fields, "field,accessor,property,oneEntities.field2,oneEntities.property2,oneEntities.property1," + "oneEntities.field1,defaultEntities.field,defaultEntities.property"); @@ -151,8 +146,7 @@ public void testManyFilteringsEntityPrimaryView() throws Exception { @Test public void testManyFilteringsEntitySecondaryView() throws Exception { - final String fields = target("ManyFilteringsEntitySecondaryView").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("ManyFilteringsEntitySecondaryView").request().get(String.class); assertSameFields(fields, "field,accessor,property,manyEntities.field2,manyEntities.property2,manyEntities.field1," + "oneEntities.property2,oneEntities.field1"); @@ -160,16 +154,14 @@ public void testManyFilteringsEntitySecondaryView() throws Exception { @Test public void testManyFilteringsEntityDefaultView() throws Exception { - final String fields = target("ManyFilteringsEntityDefaultView").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("ManyFilteringsEntityDefaultView").request().get(String.class); assertSameFields(fields, "field,accessor"); } @Test public void testManyFilteringsEntityManyViews() throws Exception { - final String fields = target("ManyFilteringsEntityManyViews").request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target("ManyFilteringsEntityManyViews").request().get(String.class); assertSameFields(fields, "field,accessor,property,manyEntities.field2,manyEntities.property2,manyEntities.property1," + "manyEntities.field1,oneEntities.field2,oneEntities.property2,oneEntities.property1,oneEntities.field1," diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringScopesTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringScopesTest.java index 870450bc49..8478a266db 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringScopesTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/EntityFilteringScopesTest.java @@ -22,7 +22,6 @@ import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; import org.glassfish.jersey.message.filtering.EntityFilteringFeature; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.test.TestProperties; @@ -65,8 +64,7 @@ public ComplexEntity get() { */ @Test public void testEntityFilteringScopes() throws Exception { - final String fields = target().request() - .header(HttpHeaders.CONTENT_TYPE, "entity/filtering").get(String.class); + final String fields = target().request().get(String.class); assertSameFields(fields, "accessor,property,field.field,field.accessor,field.property.accessor,field.property.property"); } diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEmptyEntityTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEmptyEntityTest.java index b4f014073f..98aaa73b94 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEmptyEntityTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEmptyEntityTest.java @@ -23,8 +23,6 @@ import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Feature; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.ext.ContextResolver; import org.glassfish.jersey.jackson.JacksonFeature; @@ -97,8 +95,7 @@ public ObjectMapper getContext(final Class type) { @Test public void testNonEmptyEntity() throws Exception { - final NonEmptyEntity entity = target("nonEmptyEntity").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(NonEmptyEntity.class); + final NonEmptyEntity entity = target("nonEmptyEntity").request().get(NonEmptyEntity.class); assertThat(entity.getValue(), is("foo")); assertThat(entity.getEmptyEntity(), nullValue()); @@ -106,7 +103,6 @@ public void testNonEmptyEntity() throws Exception { @Test public void testEmptyEntity() throws Exception { - assertThat(target("emptyEntity").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(String.class), is("{}")); + assertThat(target("emptyEntity").request().get(String.class), is("{}")); } } diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnClassTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnClassTest.java index 4c5312f23e..5c18c6c5c1 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnClassTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnClassTest.java @@ -25,8 +25,6 @@ import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Feature; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.jackson.JacksonFeature; @@ -135,8 +133,7 @@ public ManyFilteringsOnClassEntity getManyFilteringsEntityManyViews() { @Test public void testOneEntityFilteringOnClass() throws Exception { - final OneFilteringOnClassEntity entity = target("OneFilteringEntity").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(OneFilteringOnClassEntity.class); + final OneFilteringOnClassEntity entity = target("OneFilteringEntity").request().get(OneFilteringOnClassEntity.class); // OneFilteringOnClassEntity assertThat(entity.field, is(10)); @@ -169,7 +166,7 @@ public void testOneEntityFilteringOnClass() throws Exception { @Test public void testOneEntityFilteringOnClassDefaultViewResponse() throws Exception { final OneFilteringOnClassEntity entity = target("OneFilteringEntityDefaultViewResponse").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(OneFilteringOnClassEntity.class); + .get(OneFilteringOnClassEntity.class); // OneFilteringOnClassEntity assertThat(entity.field, is(0)); @@ -190,7 +187,7 @@ public void testOneEntityFilteringOnClassDefaultViewResponse() throws Exception @Test public void testOneEntityFilteringOnClassDefaultView() throws Exception { final OneFilteringOnClassEntity entity = target("OneFilteringEntityDefaultView").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(OneFilteringOnClassEntity.class); + .get(OneFilteringOnClassEntity.class); // OneFilteringOnClassEntity assertThat(entity.field, is(0)); @@ -217,7 +214,7 @@ public void testMultipleViewsOnClass() throws Exception { @Test public void testManyFilteringsEntityPrimaryView() throws Exception { final ManyFilteringsOnClassEntity entity = target("ManyFilteringsEntityPrimaryView").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnClassEntity.class); + .get(ManyFilteringsOnClassEntity.class); // ManyFilteringsOnClassEntity assertThat(entity.field, is(50)); @@ -259,7 +256,7 @@ public void testManyFilteringsEntityPrimaryView() throws Exception { @Test public void testManyFilteringsEntitySecondaryView() throws Exception { final ManyFilteringsOnClassEntity entity = target("ManyFilteringsEntitySecondaryView").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnClassEntity.class); + .get(ManyFilteringsOnClassEntity.class); // ManyFilteringsOnClassEntity assertThat(entity.field, is(50)); @@ -301,7 +298,7 @@ public void testManyFilteringsEntitySecondaryView() throws Exception { @Test public void testManyFilteringsEntityDefaultView() throws Exception { final ManyFilteringsOnClassEntity entity = target("ManyFilteringsEntityDefaultView").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnClassEntity.class); + .get(ManyFilteringsOnClassEntity.class); // ManyFilteringsOnClassEntity assertThat(entity.field, is(0)); @@ -325,7 +322,7 @@ public void testManyFilteringsEntityDefaultView() throws Exception { @Test public void testManyFilteringsEntityManyViews() throws Exception { final ManyFilteringsOnClassEntity entity = target("ManyFilteringsEntityManyViews").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnClassEntity.class); + .get(ManyFilteringsOnClassEntity.class); // ManyFilteringsOnClassEntity assertThat(entity.field, is(50)); diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnPropertiesTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnPropertiesTest.java index b4bf5537c1..979483f544 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnPropertiesTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringOnPropertiesTest.java @@ -25,8 +25,6 @@ import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Feature; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.jackson.JacksonFeature; @@ -136,7 +134,7 @@ public ManyFilteringsOnPropertiesEntity getManyFilteringsEntityManyViews() { @Test public void testOneEntityFilteringOnProperties() throws Exception { final OneFilteringOnPropertiesEntity entity = target("OneFilteringEntity").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(OneFilteringOnPropertiesEntity.class); + .get(OneFilteringOnPropertiesEntity.class); // OneFilteringOnPropertiesEntity assertThat(entity.field, is(80)); @@ -169,7 +167,7 @@ public void testOneEntityFilteringOnProperties() throws Exception { @Test public void testOneEntityFilteringOnPropertiesDefaultViewResponse() throws Exception { final OneFilteringOnPropertiesEntity entity = target("OneFilteringEntityDefaultViewResponse").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(OneFilteringOnPropertiesEntity.class); + .get(OneFilteringOnPropertiesEntity.class); // OneFilteringOnPropertiesEntity assertThat(entity.field, is(80)); @@ -190,7 +188,7 @@ public void testOneEntityFilteringOnPropertiesDefaultViewResponse() throws Excep @Test public void testOneEntityFilteringOnPropertiesDefaultView() throws Exception { final OneFilteringOnPropertiesEntity entity = target("OneFilteringEntityDefaultView").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(OneFilteringOnPropertiesEntity.class); + .get(OneFilteringOnPropertiesEntity.class); // OneFilteringOnPropertiesEntity assertThat(entity.field, is(80)); @@ -217,7 +215,7 @@ public void testMultipleViewsOnProperties() throws Exception { @Test public void testManyFilteringsEntityPrimaryView() throws Exception { final ManyFilteringsOnPropertiesEntity entity = target("ManyFilteringsEntityPrimaryView").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnPropertiesEntity.class); + .get(ManyFilteringsOnPropertiesEntity.class); // ManyFilteringsOnPropertiesEntity assertThat(entity.field, is(90)); @@ -253,7 +251,7 @@ public void testManyFilteringsEntityPrimaryView() throws Exception { @Test public void testManyFilteringsEntitySecondaryView() throws Exception { final ManyFilteringsOnPropertiesEntity entity = target("ManyFilteringsEntitySecondaryView").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnPropertiesEntity.class); + .get(ManyFilteringsOnPropertiesEntity.class); // ManyFilteringsOnPropertiesEntity assertThat(entity.field, is(90)); @@ -291,7 +289,7 @@ public void testManyFilteringsEntitySecondaryView() throws Exception { @Test public void testManyFilteringsEntityDefaultView() throws Exception { final ManyFilteringsOnPropertiesEntity entity = target("ManyFilteringsEntityDefaultView").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnPropertiesEntity.class); + .get(ManyFilteringsOnPropertiesEntity.class); // ManyFilteringsOnPropertiesEntity assertThat(entity.field, is(90)); @@ -315,7 +313,7 @@ public void testManyFilteringsEntityDefaultView() throws Exception { @Test public void testManyFilteringsEntityManyViews() throws Exception { final ManyFilteringsOnPropertiesEntity entity = target("ManyFilteringsEntityManyViews").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ManyFilteringsOnPropertiesEntity.class); + .get(ManyFilteringsOnPropertiesEntity.class); // ManyFilteringsOnPropertiesEntity assertThat(entity.field, is(90)); diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringScopesTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringScopesTest.java index 459c223fe3..88e70f17ad 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringScopesTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/filtering/json/JsonEntityFilteringScopesTest.java @@ -24,8 +24,6 @@ import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Feature; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import org.glassfish.jersey.jackson.JacksonFeature; import org.glassfish.jersey.message.filtering.EntityFilteringFeature; import org.glassfish.jersey.moxy.json.MoxyJsonFeature; @@ -80,8 +78,7 @@ public ComplexEntity get() { */ @Test public void testEntityFilteringScopes() throws Exception { - final ComplexEntity entity = target().request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(ComplexEntity.class); + final ComplexEntity entity = target().request().get(ComplexEntity.class); // ComplexEntity assertThat(entity.accessorTransient, is("propertyproperty")); diff --git a/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/AbstractDisableMetainfServicesLookupTest.java b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/AbstractDisableMetainfServicesLookupTest.java index aea8397729..687fc049b4 100644 --- a/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/AbstractDisableMetainfServicesLookupTest.java +++ b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/AbstractDisableMetainfServicesLookupTest.java @@ -33,7 +33,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; import jakarta.ws.rs.core.Configuration; -import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.Response; @@ -63,8 +62,7 @@ public abstract class AbstractDisableMetainfServicesLookupTest extends JerseyTes protected void testGet(int expectedGetResponseCode, int expectedPostResponseCode) throws Exception { final String name = "Jersey"; { - Response response = target("/").path(name).request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(); + Response response = target("/").path(name).request().get(); Assert.assertEquals(expectedGetResponseCode, response.getStatus()); if (response.getStatusInfo().getFamily() == Response.Status.Family.SUCCESSFUL) { diff --git a/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/ClientTest.java b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/ClientTest.java index 87b9f9b3b8..ccb44fd363 100644 --- a/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/ClientTest.java +++ b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/ClientTest.java @@ -90,11 +90,10 @@ protected ResourceConfig configure() { @Test public void testAccesingHelloworldResource() { final WebTarget resource = target().path("helloworld"); - final Response r = resource.request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(); + final Response r = resource.request().get(); assertEquals(200, r.getStatus()); - final String responseMessage = resource.request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); + final String responseMessage = resource.request().get(String.class); assertEquals(HelloWorldResource.MESSAGE, responseMessage); } diff --git a/tests/integration/jersey-2255/src/test/java/org/glassfish/jersey/tests/integration/jersey2255/Jersey2255ITCase.java b/tests/integration/jersey-2255/src/test/java/org/glassfish/jersey/tests/integration/jersey2255/Jersey2255ITCase.java index 533edb90d6..7763394638 100644 --- a/tests/integration/jersey-2255/src/test/java/org/glassfish/jersey/tests/integration/jersey2255/Jersey2255ITCase.java +++ b/tests/integration/jersey-2255/src/test/java/org/glassfish/jersey/tests/integration/jersey2255/Jersey2255ITCase.java @@ -17,8 +17,6 @@ package org.glassfish.jersey.tests.integration.jersey2255; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -59,8 +57,7 @@ protected TestContainerFactory getTestContainerFactory() throws TestContainerExc */ @Test public void testClassAGet() { - final Response response = target("A").request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(); + final Response response = target("A").request().get(); final A entity = response.readEntity(A.class); assertThat(response.getStatus(), equalTo(200)); @@ -69,8 +66,7 @@ public void testClassAGet() { @Test public void testDetailedClassAGet() { - final Response response = target("A").queryParam("detailed", true).request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(); + final Response response = target("A").queryParam("detailed", true).request().get(); final A entity = response.readEntity(A.class); assertThat(response.getStatus(), equalTo(200)); @@ -82,8 +78,7 @@ public void testDetailedClassAGet() { */ @Test public void testDetailedClassBGet() { - final Response response = target("B").queryParam("detailed", true).request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(); + final Response response = target("B").queryParam("detailed", true).request().get(); final B entity = response.readEntity(B.class); assertThat(response.getStatus(), equalTo(200)); @@ -93,7 +88,7 @@ public void testDetailedClassBGet() { @Test public void testClassBGet() { - final Response response = target("B").request().header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(); + final Response response = target("B").request().get(); final B entity = response.readEntity(B.class); assertThat(response.getStatus(), equalTo(200)); diff --git a/tests/jmockit/src/test/java/org/glassfish/jersey/tests/jmockit/server/internal/scanning/PackageNamesScannerTest.java b/tests/jmockit/src/test/java/org/glassfish/jersey/tests/jmockit/server/internal/scanning/PackageNamesScannerTest.java index 3a883b73c4..b90d72d5de 100644 --- a/tests/jmockit/src/test/java/org/glassfish/jersey/tests/jmockit/server/internal/scanning/PackageNamesScannerTest.java +++ b/tests/jmockit/src/test/java/org/glassfish/jersey/tests/jmockit/server/internal/scanning/PackageNamesScannerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2021 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 @@ -145,7 +145,7 @@ public void testInputStreamClosedAfterClose() throws Exception { new Verifications() {{ stream.close(); - times = 3; + minTimes = 3; }}; } diff --git a/tests/performance/test-cases/filter-dynamic/src/test/java/org/glassfish/jersey/tests/performance/filter/dynamic/FilterTest.java b/tests/performance/test-cases/filter-dynamic/src/test/java/org/glassfish/jersey/tests/performance/filter/dynamic/FilterTest.java index 498db977d7..7a1fa59443 100644 --- a/tests/performance/test-cases/filter-dynamic/src/test/java/org/glassfish/jersey/tests/performance/filter/dynamic/FilterTest.java +++ b/tests/performance/test-cases/filter-dynamic/src/test/java/org/glassfish/jersey/tests/performance/filter/dynamic/FilterTest.java @@ -18,8 +18,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -41,7 +39,7 @@ protected Application configure() { @Test public void testGet() { - final String getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); + final String getResponse = target().request().get(String.class); assertEquals("textDYN_MATCH_OUT", getResponse); } diff --git a/tests/performance/test-cases/filter-global/src/test/java/org/glassfish/jersey/tests/performance/filter/global/FilterTest.java b/tests/performance/test-cases/filter-global/src/test/java/org/glassfish/jersey/tests/performance/filter/global/FilterTest.java index 89f859a708..ea43dc2c20 100644 --- a/tests/performance/test-cases/filter-global/src/test/java/org/glassfish/jersey/tests/performance/filter/global/FilterTest.java +++ b/tests/performance/test-cases/filter-global/src/test/java/org/glassfish/jersey/tests/performance/filter/global/FilterTest.java @@ -18,8 +18,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -41,7 +39,7 @@ protected Application configure() { @Test public void testGet() { - final String getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); + final String getResponse = target().request().get(String.class); assertEquals("textPRE_MATCH_OUT", getResponse); } diff --git a/tests/performance/test-cases/filter-name/src/test/java/org/glassfish/jersey/tests/performance/filter/name/FilterTest.java b/tests/performance/test-cases/filter-name/src/test/java/org/glassfish/jersey/tests/performance/filter/name/FilterTest.java index 9e35b94911..669253fc72 100644 --- a/tests/performance/test-cases/filter-name/src/test/java/org/glassfish/jersey/tests/performance/filter/name/FilterTest.java +++ b/tests/performance/test-cases/filter-name/src/test/java/org/glassfish/jersey/tests/performance/filter/name/FilterTest.java @@ -18,8 +18,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -41,7 +39,7 @@ protected Application configure() { @Test public void testGet() { - final String getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); + final String getResponse = target().request().get(String.class); assertEquals("textNAM_MATCH_OUT", getResponse); } diff --git a/tests/performance/test-cases/interceptor-dynamic/src/test/java/org/glassfish/jersey/tests/performance/interceptor/dynamic/InterceptorTest.java b/tests/performance/test-cases/interceptor-dynamic/src/test/java/org/glassfish/jersey/tests/performance/interceptor/dynamic/InterceptorTest.java index a6b5b2b224..d9bcbf9812 100644 --- a/tests/performance/test-cases/interceptor-dynamic/src/test/java/org/glassfish/jersey/tests/performance/interceptor/dynamic/InterceptorTest.java +++ b/tests/performance/test-cases/interceptor-dynamic/src/test/java/org/glassfish/jersey/tests/performance/interceptor/dynamic/InterceptorTest.java @@ -18,8 +18,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -41,7 +39,7 @@ protected Application configure() { @Test public void testGet() { - final String getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); + final String getResponse = target().request().get(String.class); assertEquals("WRITE text", getResponse); } diff --git a/tests/performance/test-cases/interceptor-global/src/test/java/org/glassfish/jersey/tests/performance/interceptor/global/InterceptorTest.java b/tests/performance/test-cases/interceptor-global/src/test/java/org/glassfish/jersey/tests/performance/interceptor/global/InterceptorTest.java index 311aca4533..439c3f7516 100644 --- a/tests/performance/test-cases/interceptor-global/src/test/java/org/glassfish/jersey/tests/performance/interceptor/global/InterceptorTest.java +++ b/tests/performance/test-cases/interceptor-global/src/test/java/org/glassfish/jersey/tests/performance/interceptor/global/InterceptorTest.java @@ -18,8 +18,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -41,7 +39,7 @@ protected Application configure() { @Test public void testGet() { - final String getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); + final String getResponse = target().request().get(String.class); assertEquals("WRITE text", getResponse); } diff --git a/tests/performance/test-cases/interceptor-name/src/test/java/org/glassfish/jersey/tests/performance/interceptor/name/InterceptorTest.java b/tests/performance/test-cases/interceptor-name/src/test/java/org/glassfish/jersey/tests/performance/interceptor/name/InterceptorTest.java index ce0963114c..8de5beab61 100644 --- a/tests/performance/test-cases/interceptor-name/src/test/java/org/glassfish/jersey/tests/performance/interceptor/name/InterceptorTest.java +++ b/tests/performance/test-cases/interceptor-name/src/test/java/org/glassfish/jersey/tests/performance/interceptor/name/InterceptorTest.java @@ -18,8 +18,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -41,7 +39,7 @@ protected Application configure() { @Test public void testGet() { - final String getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); + final String getResponse = target().request().get(String.class); assertEquals("WRITE text", getResponse); } diff --git a/tests/performance/test-cases/mbw-custom-provider/src/test/java/org/glassfish/jersey/tests/performance/mbw/custom/PersonEntityTest.java b/tests/performance/test-cases/mbw-custom-provider/src/test/java/org/glassfish/jersey/tests/performance/mbw/custom/PersonEntityTest.java index a1b5066222..f6da87095a 100644 --- a/tests/performance/test-cases/mbw-custom-provider/src/test/java/org/glassfish/jersey/tests/performance/mbw/custom/PersonEntityTest.java +++ b/tests/performance/test-cases/mbw-custom-provider/src/test/java/org/glassfish/jersey/tests/performance/mbw/custom/PersonEntityTest.java @@ -18,7 +18,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.client.ClientConfig; @@ -46,7 +45,7 @@ protected void configureClient(ClientConfig config) { @Test public void testGet() { - final Person getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, "application/person").get(Person.class); + final Person getResponse = target().request().get(Person.class); assertEquals("Mozart", getResponse.name); assertEquals(21, getResponse.age); assertEquals("Salzburg", getResponse.address); diff --git a/tests/performance/test-cases/mbw-json-jackson/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java b/tests/performance/test-cases/mbw-json-jackson/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java index 17173add5e..6ba0c4520c 100644 --- a/tests/performance/test-cases/mbw-json-jackson/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java +++ b/tests/performance/test-cases/mbw-json-jackson/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java @@ -18,8 +18,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.jackson.JacksonFeature; @@ -48,8 +46,7 @@ protected void configureClient(ClientConfig config) { @Test public void testGet() { - final Person getResponse = target().request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(Person.class); + final Person getResponse = target().request().get(Person.class); assertEquals("Wolfgang", getResponse.name); assertEquals(21, getResponse.age); assertEquals("Salzburg", getResponse.address); diff --git a/tests/performance/test-cases/mbw-json-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java b/tests/performance/test-cases/mbw-json-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java index 17e755df8a..038f8e10ff 100644 --- a/tests/performance/test-cases/mbw-json-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java +++ b/tests/performance/test-cases/mbw-json-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/json/JsonEntityTest.java @@ -18,8 +18,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.client.ClientConfig; @@ -48,8 +46,7 @@ protected void configureClient(ClientConfig config) { @Test public void testGet() { - final Person getResponse = target().request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON).get(Person.class); + final Person getResponse = target().request().get(Person.class); assertEquals("Wolfgang", getResponse.name); assertEquals(21, getResponse.age); assertEquals("Salzburg", getResponse.address); diff --git a/tests/performance/test-cases/mbw-kryo/src/test/java/org/glassfish/jersey/tests/performance/mbw/kryo/PersonResourceTest.java b/tests/performance/test-cases/mbw-kryo/src/test/java/org/glassfish/jersey/tests/performance/mbw/kryo/PersonResourceTest.java index adbe06f200..97d22be440 100644 --- a/tests/performance/test-cases/mbw-kryo/src/test/java/org/glassfish/jersey/tests/performance/mbw/kryo/PersonResourceTest.java +++ b/tests/performance/test-cases/mbw-kryo/src/test/java/org/glassfish/jersey/tests/performance/mbw/kryo/PersonResourceTest.java @@ -18,7 +18,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.client.ClientConfig; @@ -47,7 +46,7 @@ protected void configureClient(final ClientConfig config) { @Test public void testGet() { - final Person getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, "application/x-kryo").get(Person.class); + final Person getResponse = target().request().get(Person.class); assertEquals("Wolfgang", getResponse.name); assertEquals(21, getResponse.age); assertEquals("Salzburg", getResponse.address); diff --git a/tests/performance/test-cases/mbw-text-plain/src/test/java/org/glassfish/jersey/tests/performance/mbw/text/TextEntityTest.java b/tests/performance/test-cases/mbw-text-plain/src/test/java/org/glassfish/jersey/tests/performance/mbw/text/TextEntityTest.java index a0e4615c72..06bbb91bd5 100644 --- a/tests/performance/test-cases/mbw-text-plain/src/test/java/org/glassfish/jersey/tests/performance/mbw/text/TextEntityTest.java +++ b/tests/performance/test-cases/mbw-text-plain/src/test/java/org/glassfish/jersey/tests/performance/mbw/text/TextEntityTest.java @@ -18,8 +18,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -41,7 +39,7 @@ protected Application configure() { @Test public void testGet() { - final String getResponse = target().request().header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN).get(String.class); + final String getResponse = target().request().get(String.class); assertEquals("text", getResponse); } diff --git a/tests/performance/test-cases/mbw-xml-jaxb/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java b/tests/performance/test-cases/mbw-xml-jaxb/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java index ca4bb748d4..625417b53a 100644 --- a/tests/performance/test-cases/mbw-xml-jaxb/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java +++ b/tests/performance/test-cases/mbw-xml-jaxb/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java @@ -18,8 +18,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.test.JerseyTest; @@ -41,8 +39,7 @@ protected Application configure() { @Test public void testGet() { - final Person getResponse = target().request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(Person.class); + final Person getResponse = target().request().get(Person.class); assertEquals("Wolfgang", getResponse.name); assertEquals(21, getResponse.age); assertEquals("Salzburg", getResponse.address); diff --git a/tests/performance/test-cases/mbw-xml-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java b/tests/performance/test-cases/mbw-xml-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java index 18b0e3c033..355cbb34f6 100644 --- a/tests/performance/test-cases/mbw-xml-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java +++ b/tests/performance/test-cases/mbw-xml-moxy/src/test/java/org/glassfish/jersey/tests/performance/mbw/xml/XmlEntityTest.java @@ -18,8 +18,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.HttpHeaders; -import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.client.ClientConfig; @@ -48,8 +46,7 @@ protected void configureClient(ClientConfig config) { @Test public void testGet() { - final Person getResponse = target().request() - .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML).get(Person.class); + final Person getResponse = target().request().get(Person.class); assertEquals("Wolfgang", getResponse.name); assertEquals(21, getResponse.age); assertEquals("Salzburg", getResponse.address); From b9653d17f98ca41b72172af7028ba046f300f834 Mon Sep 17 00:00:00 2001 From: robersheimer Date: Fri, 3 Dec 2021 19:13:18 +0100 Subject: [PATCH 13/20] Issue #3493 - Add BeanParam support to WebResourceFactory (#4919) * Issue #3493 - Add BeanParam support to WebResourceFactory Allows the proxy client holding a resource interface to supply a bean of the corresponding type for the method fields annotated with @BeanParam, instead of having to supply the associated parameters individually. This also works if BeanParams themselves contain fields annotated with @BeanParam. --- .../client/proxy/RequestParameters.java | 219 +++++++++++++ .../client/proxy/WebResourceFactory.java | 117 ++----- .../jersey/client/proxy/MyBeanParam.java | 78 +++++ .../jersey/client/proxy/MyGetBeanParam.java | 101 ++++++ .../client/proxy/MyResourceWithBeanParam.java | 69 +++++ .../proxy/MyResourceWithBeanParamIfc.java | 71 +++++ .../jersey/client/proxy/MySubBeanParam.java | 44 +++ .../client/proxy/RequestParametersTest.java | 293 ++++++++++++++++++ .../WebResourceFactoryBeanParamTest.java | 138 +++++++++ .../client/proxy/WebResourceFactoryTest.java | 2 +- 10 files changed, 1037 insertions(+), 95 deletions(-) create mode 100644 ext/proxy-client/src/main/java/org/glassfish/jersey/client/proxy/RequestParameters.java create mode 100644 ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyBeanParam.java create mode 100644 ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyGetBeanParam.java create mode 100644 ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyResourceWithBeanParam.java create mode 100644 ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyResourceWithBeanParamIfc.java create mode 100644 ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MySubBeanParam.java create mode 100644 ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/RequestParametersTest.java create mode 100644 ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/WebResourceFactoryBeanParamTest.java diff --git a/ext/proxy-client/src/main/java/org/glassfish/jersey/client/proxy/RequestParameters.java b/ext/proxy-client/src/main/java/org/glassfish/jersey/client/proxy/RequestParameters.java new file mode 100644 index 0000000000..007fbefde8 --- /dev/null +++ b/ext/proxy-client/src/main/java/org/glassfish/jersey/client/proxy/RequestParameters.java @@ -0,0 +1,219 @@ +/* + * Copyright (c) 2012, 2021 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.client.proxy; + +import jakarta.ws.rs.BeanParam; +import jakarta.ws.rs.CookieParam; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.HeaderParam; +import jakarta.ws.rs.MatrixParam; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.Cookie; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.MultivaluedHashMap; +import jakarta.ws.rs.core.MultivaluedMap; + +import java.beans.IntrospectionException; +import java.beans.Introspector; +import java.beans.PropertyDescriptor; +import java.lang.annotation.Annotation; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +/** + * Collector to retrieve parameters for setting up the HTTP request sent in the invoke method of WebResourceFactory + * The addParameter method takes a single annotated method parameter or annotated field or property of a BeanParam + * and adds the information to the web target, headers, cookie list or form. + */ +class RequestParameters { + + private WebTarget newTarget; + private final MultivaluedHashMap headers; + private final LinkedList cookies; + private final Form form; + + private static final List> PARAM_ANNOTATION_CLASSES = Arrays.asList(PathParam.class, QueryParam.class, + HeaderParam.class, CookieParam.class, MatrixParam.class, FormParam.class, BeanParam.class); + + RequestParameters(final WebTarget newTarget, final MultivaluedMap headers, + final List cookies, final Form form) { + + this.headers = new MultivaluedHashMap<>(headers); + this.cookies = new LinkedList<>(cookies); + this.form = new Form(); + this.form.asMap().putAll(form.asMap()); + + this.newTarget = newTarget; + } + + void addParameter(final Object value, final Map, Annotation> anns) + throws IntrospectionException, InvocationTargetException, IllegalAccessException { + + Annotation ann; + if ((ann = anns.get(PathParam.class)) != null) { + newTarget = newTarget.resolveTemplate(((PathParam) ann).value(), value); + } else if ((ann = anns.get((QueryParam.class))) != null) { + if (value instanceof Collection) { + newTarget = newTarget.queryParam(((QueryParam) ann).value(), convert((Collection) value)); + } else { + newTarget = newTarget.queryParam(((QueryParam) ann).value(), value); + } + } else if ((ann = anns.get((HeaderParam.class))) != null) { + if (value instanceof Collection) { + headers.addAll(((HeaderParam) ann).value(), convert((Collection) value)); + } else { + headers.addAll(((HeaderParam) ann).value(), value); + } + + } else if ((ann = anns.get((CookieParam.class))) != null) { + final String name = ((CookieParam) ann).value(); + Cookie c; + if (value instanceof Collection) { + for (final Object v : ((Collection) value)) { + if (!(v instanceof Cookie)) { + c = new Cookie(name, v.toString()); + } else { + c = (Cookie) v; + if (!name.equals(((Cookie) v).getName())) { + // is this the right thing to do? or should I fail? or ignore the difference? + c = new Cookie(name, c.getValue(), c.getPath(), c.getDomain(), c.getVersion()); + } + } + cookies.add(c); + } + } else { + if (!(value instanceof Cookie)) { + cookies.add(new Cookie(name, value.toString())); + } else { + c = (Cookie) value; + if (!name.equals(((Cookie) value).getName())) { + // is this the right thing to do? or should I fail? or ignore the difference? + cookies.add(new Cookie(name, c.getValue(), c.getPath(), c.getDomain(), c.getVersion())); + } + } + } + } else if ((ann = anns.get((MatrixParam.class))) != null) { + if (value instanceof Collection) { + newTarget = newTarget.matrixParam(((MatrixParam) ann).value(), convert((Collection) value)); + } else { + newTarget = newTarget.matrixParam(((MatrixParam) ann).value(), value); + } + } else if ((ann = anns.get((FormParam.class))) != null) { + if (value instanceof Collection) { + for (final Object v : ((Collection) value)) { + form.param(((FormParam) ann).value(), v.toString()); + } + } else { + form.param(((FormParam) ann).value(), value.toString()); + } + } else if ((anns.get((BeanParam.class))) != null) { + if (value instanceof Collection) { + for (final Object v : ((Collection) value)) { + addBeanParameter(v); + } + } else { + addBeanParameter(value); + } + } + } + + private void addBeanParameter(final Object beanParam) + throws IllegalAccessException, IntrospectionException, InvocationTargetException { + Class beanClass = beanParam.getClass(); + List fields = new ArrayList<>(); + getAllFields(fields, beanClass); + + for (final Field field : fields) { + Object value = null; + final Map, Annotation> anns = new HashMap<>(); + + // get field annotations + for (final Annotation ann : field.getAnnotations()) { + anns.put(ann.annotationType(), ann); + } + + if (hasAnyParamAnnotation(anns)) { + value = field.get(beanParam); + } else { + // get getter annotations if there are no field annotations + for (final PropertyDescriptor pd : Introspector.getBeanInfo(beanClass).getPropertyDescriptors()) { + if (pd.getName().equals(field.getName()) && pd.getReadMethod() != null) { + for (final Annotation ann : pd.getReadMethod().getAnnotations()) { + anns.put(ann.annotationType(), ann); + } + if (hasAnyParamAnnotation(anns)) { + value = pd.getReadMethod().invoke(beanParam); + } + } + } + } + + if (value != null) { + addParameter(value, anns); + } + } + } + + private List getAllFields(List fields, Class type) { + fields.addAll(Arrays.asList(type.getDeclaredFields())); + + if (type.getSuperclass() != null) { + getAllFields(fields, type.getSuperclass()); + } + + return fields; + } + + private Object[] convert(final Collection value) { + return value.toArray(); + } + + public static boolean hasAnyParamAnnotation(final Map, Annotation> anns) { + for (final Class paramAnnotationClass : PARAM_ANNOTATION_CLASSES) { + if (anns.containsKey(paramAnnotationClass)) { + return true; + } + } + return false; + } + + WebTarget getNewTarget() { + return newTarget; + } + + MultivaluedHashMap getHeaders() { + return headers; + } + + LinkedList getCookies() { + return cookies; + } + + Form getForm() { + return form; + } + +} diff --git a/ext/proxy-client/src/main/java/org/glassfish/jersey/client/proxy/WebResourceFactory.java b/ext/proxy-client/src/main/java/org/glassfish/jersey/client/proxy/WebResourceFactory.java index 585457f6b0..b1cecb7039 100644 --- a/ext/proxy-client/src/main/java/org/glassfish/jersey/client/proxy/WebResourceFactory.java +++ b/ext/proxy-client/src/main/java/org/glassfish/jersey/client/proxy/WebResourceFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021 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 @@ -18,20 +18,19 @@ import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; -import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; -import java.lang.reflect.ParameterizedType; import java.lang.reflect.Proxy; +import java.lang.reflect.InvocationHandler; import java.lang.reflect.Type; +import java.lang.reflect.ParameterizedType; import java.security.AccessController; import java.util.Arrays; -import java.util.Collection; import java.util.Collections; import java.util.HashMap; -import java.util.LinkedList; import java.util.List; import java.util.Map; +import jakarta.ws.rs.BeanParam; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.CookieParam; import jakarta.ws.rs.DefaultValue; @@ -75,8 +74,8 @@ public final class WebResourceFactory implements InvocationHandler { private static final MultivaluedMap EMPTY_HEADERS = new MultivaluedHashMap<>(); private static final Form EMPTY_FORM = new Form(); - private static final List PARAM_ANNOTATION_CLASSES = Arrays.asList(PathParam.class, QueryParam.class, - HeaderParam.class, CookieParam.class, MatrixParam.class, FormParam.class); + private static final List> PARAM_ANNOTATION_CLASSES = Arrays.asList(PathParam.class, QueryParam.class, + HeaderParam.class, CookieParam.class, MatrixParam.class, FormParam.class, BeanParam.class); /** * Creates a new client-side representation of a resource described by @@ -92,7 +91,7 @@ public final class WebResourceFactory implements InvocationHandler { * be used for making requests to the server. */ public static C newResource(final Class resourceInterface, final WebTarget target) { - return newResource(resourceInterface, target, false, EMPTY_HEADERS, Collections.emptyList(), EMPTY_FORM); + return newResource(resourceInterface, target, false, EMPTY_HEADERS, Collections.emptyList(), EMPTY_FORM); } /** @@ -182,93 +181,35 @@ public Object invoke(final Object proxy, final Method method, final Object[] arg // process method params (build maps of (Path|Form|Cookie|Matrix|Header..)Params // and extract entity type - final MultivaluedHashMap headers = new MultivaluedHashMap(this.headers); - final LinkedList cookies = new LinkedList<>(this.cookies); - final Form form = new Form(); - form.asMap().putAll(this.form.asMap()); + RequestParameters requestParameters = new RequestParameters(newTarget, headers, cookies, form); final Annotation[][] paramAnns = method.getParameterAnnotations(); Object entity = null; Type entityType = null; for (int i = 0; i < paramAnns.length; i++) { - final Map anns = new HashMap<>(); + final Map, Annotation> anns = new HashMap<>(); for (final Annotation ann : paramAnns[i]) { anns.put(ann.annotationType(), ann); } - Annotation ann; Object value = args[i]; - if (!hasAnyParamAnnotation(anns)) { + if (!RequestParameters.hasAnyParamAnnotation(anns)) { entityType = method.getGenericParameterTypes()[i]; entity = value; } else { + Annotation ann; if (value == null && (ann = anns.get(DefaultValue.class)) != null) { value = ((DefaultValue) ann).value(); } - if (value != null) { - if ((ann = anns.get(PathParam.class)) != null) { - newTarget = newTarget.resolveTemplate(((PathParam) ann).value(), value); - } else if ((ann = anns.get((QueryParam.class))) != null) { - if (value instanceof Collection) { - newTarget = newTarget.queryParam(((QueryParam) ann).value(), convert((Collection) value)); - } else { - newTarget = newTarget.queryParam(((QueryParam) ann).value(), value); - } - } else if ((ann = anns.get((HeaderParam.class))) != null) { - if (value instanceof Collection) { - headers.addAll(((HeaderParam) ann).value(), convert((Collection) value)); - } else { - headers.addAll(((HeaderParam) ann).value(), value); - } - - } else if ((ann = anns.get((CookieParam.class))) != null) { - final String name = ((CookieParam) ann).value(); - Cookie c; - if (value instanceof Collection) { - for (final Object v : ((Collection) value)) { - if (!(v instanceof Cookie)) { - c = new Cookie(name, v.toString()); - } else { - c = (Cookie) v; - if (!name.equals(((Cookie) v).getName())) { - // is this the right thing to do? or should I fail? or ignore the difference? - c = new Cookie(name, c.getValue(), c.getPath(), c.getDomain(), c.getVersion()); - } - } - cookies.add(c); - } - } else { - if (!(value instanceof Cookie)) { - cookies.add(new Cookie(name, value.toString())); - } else { - c = (Cookie) value; - if (!name.equals(((Cookie) value).getName())) { - // is this the right thing to do? or should I fail? or ignore the difference? - cookies.add(new Cookie(name, c.getValue(), c.getPath(), c.getDomain(), c.getVersion())); - } - } - } - } else if ((ann = anns.get((MatrixParam.class))) != null) { - if (value instanceof Collection) { - newTarget = newTarget.matrixParam(((MatrixParam) ann).value(), convert((Collection) value)); - } else { - newTarget = newTarget.matrixParam(((MatrixParam) ann).value(), value); - } - } else if ((ann = anns.get((FormParam.class))) != null) { - if (value instanceof Collection) { - for (final Object v : ((Collection) value)) { - form.param(((FormParam) ann).value(), v.toString()); - } - } else { - form.param(((FormParam) ann).value(), value.toString()); - } - } + requestParameters.addParameter(value, anns); } } } + newTarget = requestParameters.getNewTarget(); if (httpMethod == null) { // the method is a subresource locator - return WebResourceFactory.newResource(responseType, newTarget, true, headers, cookies, form); + return WebResourceFactory.newResource(responseType, newTarget, true, + requestParameters.getHeaders(), requestParameters.getCookies(), requestParameters.getForm()); } // accepted media types @@ -281,7 +222,7 @@ public Object invoke(final Object proxy, final Method method, final Object[] arg // determine content type String contentType = null; if (entity != null) { - final List contentTypeEntries = headers.get(HttpHeaders.CONTENT_TYPE); + final List contentTypeEntries = requestParameters.getHeaders().get(HttpHeaders.CONTENT_TYPE); if ((contentTypeEntries != null) && (!contentTypeEntries.isEmpty())) { contentType = contentTypeEntries.get(0).toString(); } else { @@ -296,32 +237,32 @@ public Object invoke(final Object proxy, final Method method, final Object[] arg } Invocation.Builder builder = newTarget.request() - .headers(headers) // this resets all headers so do this first + .headers(requestParameters.getHeaders()) // this resets all headers so do this first .accept(accepts); // if @Produces is defined, propagate values into Accept header; empty array is NO-OP - for (final Cookie c : cookies) { + for (final Cookie c : requestParameters.getCookies()) { builder = builder.cookie(c); } final Object result; - if (entity == null && !form.asMap().isEmpty()) { - entity = form; + if (entity == null && !requestParameters.getForm().asMap().isEmpty()) { + entity = requestParameters.getForm(); contentType = MediaType.APPLICATION_FORM_URLENCODED; } else { if (contentType == null) { contentType = MediaType.APPLICATION_OCTET_STREAM; } - if (!form.asMap().isEmpty()) { + if (!requestParameters.getForm().asMap().isEmpty()) { if (entity instanceof Form) { - ((Form) entity).asMap().putAll(form.asMap()); + ((Form) entity).asMap().putAll(requestParameters.getForm().asMap()); } else { // TODO: should at least log some warning here } } } - final GenericType responseGenericType = new GenericType(method.getGenericReturnType()); + final GenericType responseGenericType = new GenericType(method.getGenericReturnType()); if (entity != null) { if (entityType instanceof ParameterizedType) { entity = new GenericEntity(entity, entityType); @@ -334,18 +275,6 @@ public Object invoke(final Object proxy, final Method method, final Object[] arg return result; } - private boolean hasAnyParamAnnotation(final Map anns) { - for (final Class paramAnnotationClass : PARAM_ANNOTATION_CLASSES) { - if (anns.containsKey(paramAnnotationClass)) { - return true; - } - } - return false; - } - - private Object[] convert(final Collection value) { - return value.toArray(); - } private static WebTarget addPathFromAnnotation(final AnnotatedElement ae, WebTarget target) { final Path p = ae.getAnnotation(Path.class); diff --git a/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyBeanParam.java b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyBeanParam.java new file mode 100644 index 0000000000..70bb227ae5 --- /dev/null +++ b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyBeanParam.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2021 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.client.proxy; + +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Cookie; + +import java.util.List; + +/** + * @author Richard Obersheimer + */ +public class MyBeanParam extends MyGetBeanParam { + + @FormParam("formParam1") + String formParam1; + + @FormParam("formParam2") + String formParam2; + + String queryParam2; + + public MyBeanParam(String headerParam, String pathParam, String queryParam, String formParam1, String formParam2, + List matrixParam, Cookie cookieParam, MySubBeanParam subBeanParam) { + this.headerParam = headerParam; + this.pathParam = pathParam; + this.queryParam = queryParam; + this.formParam1 = formParam1; + this.formParam2 = formParam2; + this.matrixParam = matrixParam; + this.cookieParam = cookieParam; + this.subBeanParam = subBeanParam; + } + + public MyBeanParam() {} + + public String getFormParam1() { + return formParam1; + } + + public void setFormParam1(String formParam1) { + this.formParam1 = formParam1; + } + + public String getFormParam2() { + return formParam2; + } + + public void setFormParam2(String formParam2) { + this.formParam2 = formParam2; + } + + @QueryParam("queryParam2") + public String getQueryParam2() { + return queryParam2; + } + + @QueryParam("queryParam2") + public void setQueryParam2(String queryParam2) { + this.queryParam2 = queryParam2; + } + +} diff --git a/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyGetBeanParam.java b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyGetBeanParam.java new file mode 100644 index 0000000000..18d4d6052c --- /dev/null +++ b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyGetBeanParam.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2021 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.client.proxy; + +import jakarta.ws.rs.BeanParam; +import jakarta.ws.rs.CookieParam; +import jakarta.ws.rs.HeaderParam; +import jakarta.ws.rs.MatrixParam; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Cookie; + +import java.util.List; + +/** + * @author Richard Obersheimer + */ +public class MyGetBeanParam { + + @HeaderParam("headerParam") + String headerParam; + + @PathParam("pathParam") + String pathParam; + + @QueryParam("queryParam") + String queryParam; + + @MatrixParam("matrixParam") + List matrixParam; + + @CookieParam("cookieParam") + Cookie cookieParam; + + @BeanParam + MySubBeanParam subBeanParam; + + public MyGetBeanParam() {} + + public String getHeaderParam() { + return headerParam; + } + + public void setHeaderParam(String headerParam) { + this.headerParam = headerParam; + } + + public String getPathParam() { + return pathParam; + } + + public void setPathParam(String pathParam) { + this.pathParam = pathParam; + } + + public String getQueryParam() { + return queryParam; + } + + public void setQueryParam(String queryParam) { + this.queryParam = queryParam; + } + + public List getMatrixParam() { + return matrixParam; + } + + public void setMatrixParam(List matrixParam) { + this.matrixParam = matrixParam; + } + + public Cookie getCookieParam() { + return cookieParam; + } + + public void setCookieParam(Cookie cookieParam) { + this.cookieParam = cookieParam; + } + + public MySubBeanParam getSubBeanParam() { + return subBeanParam; + } + + public void setSubBeanParam(MySubBeanParam subBeanParam) { + this.subBeanParam = subBeanParam; + } +} diff --git a/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyResourceWithBeanParam.java b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyResourceWithBeanParam.java new file mode 100644 index 0000000000..a1d65e7dd9 --- /dev/null +++ b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyResourceWithBeanParam.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2021 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.client.proxy; + +import jakarta.ws.rs.BeanParam; + +/** + * @author Richard Obersheimer + */ +public class MyResourceWithBeanParam implements MyResourceWithBeanParamIfc { + + @Override + public String echoQuery(MyGetBeanParam bean) { + return bean.getQueryParam(); + } + + @Override + public String echoHeader(@BeanParam MyGetBeanParam bean) { + return bean.getHeaderParam(); + } + + @Override + public String echoPath(@BeanParam MyGetBeanParam bean) { + return bean.getPathParam(); + } + + @Override + public String echoCookie(@BeanParam MyGetBeanParam bean) { + return bean.getCookieParam().getValue(); + } + + @Override + public String echoMatrix(@BeanParam MyGetBeanParam bean) { + return bean.getMatrixParam().toString(); + } + + @Override + public String echoSubBean(@BeanParam MyGetBeanParam bean) { + return bean.getSubBeanParam().getSubQueryParam().toString(); + } + + @Override + public String echo(MyBeanParam bean) { + return ("HEADER=" + bean.getHeaderParam() + ",PATH=" + bean.getPathParam() + ",FORM=" + + bean.getFormParam1() + "," + bean.getFormParam2() + ",QUERY=" + bean.getQueryParam() + + ",MATRIX=" + bean.getMatrixParam().size() + ",COOKIE=" + bean.getCookieParam().getValue() + + ",SUB=" + bean.getSubBeanParam().getSubQueryParam().size() + + ",Q2=" + bean.getQueryParam2()); + } + + @Override + public MyResourceWithBeanParamIfc getSubResource() { + return new MyResourceWithBeanParam(); + } +} diff --git a/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyResourceWithBeanParamIfc.java b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyResourceWithBeanParamIfc.java new file mode 100644 index 0000000000..f57c85d1b9 --- /dev/null +++ b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MyResourceWithBeanParamIfc.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2021 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.client.proxy; + +import jakarta.ws.rs.BeanParam; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; + +/** + * @author Richard Obersheimer + */ +@Path("mybeanresource") +public interface MyResourceWithBeanParamIfc { + + @GET + @Path("getQuery") + @Produces("text/plain") + public String echoQuery(@BeanParam MyGetBeanParam bean); + + @GET + @Path("getHeader") + @Produces("text/plain") + public String echoHeader(@BeanParam MyGetBeanParam bean); + + @GET + @Path("getPath/{pathParam}") + @Produces("text/plain") + public String echoPath(@BeanParam MyGetBeanParam bean); + + @GET + @Path("getCookie") + @Produces("text/plain") + public String echoCookie(@BeanParam MyGetBeanParam bean); + + @GET + @Path("getMatrix") + @Produces("text/plain") + public String echoMatrix(@BeanParam MyGetBeanParam bean); + + @GET + @Path("getSubBean") + @Produces("text/plain") + public String echoSubBean(@BeanParam MyGetBeanParam bean); + + @POST + @Consumes("application/x-www-form-urlencoded") + @Path("all/{pathParam}") + @Produces("text/plain") + public String echo(@BeanParam MyBeanParam bean); + + @Path("subresource") + MyResourceWithBeanParamIfc getSubResource(); + +} diff --git a/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MySubBeanParam.java b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MySubBeanParam.java new file mode 100644 index 0000000000..4cd792d364 --- /dev/null +++ b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/MySubBeanParam.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2021 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.client.proxy; + +import jakarta.ws.rs.QueryParam; + +import java.util.List; + +/** + * @author Richard Obersheimer + */ +public class MySubBeanParam { + + public List getSubQueryParam() { + return subQueryParam; + } + + public void setSubQueryParam(List subQueryParam) { + this.subQueryParam = subQueryParam; + } + + public MySubBeanParam(List subQueryParam) { + this.subQueryParam = subQueryParam; + } + + public MySubBeanParam() {} + + @QueryParam("subQueryParam") + List subQueryParam; +} diff --git a/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/RequestParametersTest.java b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/RequestParametersTest.java new file mode 100644 index 0000000000..aee925ec9c --- /dev/null +++ b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/RequestParametersTest.java @@ -0,0 +1,293 @@ +/* + * Copyright (c) 2021 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.client.proxy; + +import jakarta.ws.rs.BeanParam; +import jakarta.ws.rs.CookieParam; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.HeaderParam; +import jakarta.ws.rs.MatrixParam; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.client.ClientBuilder; +import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.Cookie; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.MultivaluedHashMap; +import jakarta.ws.rs.core.MultivaluedMap; +import org.junit.Test; + +import java.beans.IntrospectionException; +import java.lang.annotation.Annotation; +import java.lang.reflect.InvocationTargetException; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import static org.junit.Assert.assertEquals; + +/** + * @author Richard Obersheimer + */ +public class RequestParametersTest { + + private static final MultivaluedMap EMPTY_HEADERS = new MultivaluedHashMap<>(); + private static final Form EMPTY_FORM = new Form(); + private static final String baseURL = "http://example.com"; + + @QueryParam("queryParam") + String queryParam; + + @QueryParam("queryParams") + List queryParams; + + @PathParam("pathParam") + String pathParam; + + @HeaderParam("headerParam") + String headerParam; + + @MatrixParam("matrixParam") + List matrixParam; + + @CookieParam("cookieParam") + Cookie cookieParam; + + @BeanParam + MySubBeanParam subBeanParam; + + @FormParam("formParam") + String formParam; + + @FormParam("formParams") + List formParams; + + + private WebTarget getExampleTarget() { + Client client = ClientBuilder.newClient(); + return client.target(baseURL); + } + + private WebTarget getExampleTargetWithPathParam() { + Client client = ClientBuilder.newClient(); + return client.target(baseURL + "/{pathParam}"); + } + + private RequestParameters getEmptyRequestParameters(WebTarget webTarget) { + return new RequestParameters(webTarget, + EMPTY_HEADERS, Collections.emptyList(), EMPTY_FORM); + } + + @Test + public void testAddQueryParameter() throws NoSuchFieldException, IntrospectionException, + InvocationTargetException, IllegalAccessException { + + WebTarget webTarget = getExampleTarget(); + RequestParameters requestParameters = getEmptyRequestParameters(webTarget); + + Annotation ann = this.getClass().getDeclaredField("queryParam").getAnnotations()[0]; + Map, Annotation> anns = new HashMap<>(); + anns.put(QueryParam.class, ann); + + requestParameters.addParameter("testQuery", anns); + String uri = requestParameters.getNewTarget().getUriBuilder().build().toString(); + + assertEquals(baseURL + "/?queryParam=testQuery", uri); + } + + @Test + public void testAddListOfQueryParameters() throws IntrospectionException, InvocationTargetException, + IllegalAccessException, NoSuchFieldException { + + WebTarget webTarget = getExampleTarget(); + RequestParameters requestParameters = getEmptyRequestParameters(webTarget); + + Annotation ann = this.getClass().getDeclaredField("queryParams").getAnnotations()[0]; + Map, Annotation> anns = new HashMap<>(); + anns.put(QueryParam.class, ann); + List subQueryParam = Arrays.asList("subQuery1", "subQuery2"); + + requestParameters.addParameter(subQueryParam, anns); + + String uri = requestParameters.getNewTarget().getUriBuilder().build().toString(); + + assertEquals(baseURL + "/?queryParams=subQuery1&queryParams=subQuery2", uri); + } + + @Test + public void testAddPathParameter() throws NoSuchFieldException, IntrospectionException, + InvocationTargetException, IllegalAccessException { + + WebTarget webTarget = getExampleTargetWithPathParam(); + RequestParameters requestParameters = getEmptyRequestParameters(webTarget); + + Annotation ann = this.getClass().getDeclaredField("pathParam").getAnnotations()[0]; + Map, Annotation> anns = new HashMap<>(); + anns.put(PathParam.class, ann); + + requestParameters.addParameter("testPath", anns); + String uri = requestParameters.getNewTarget().getUriBuilder().build().toString(); + + assertEquals(baseURL + "/testPath", uri); + } + + @Test + public void testAddHeaderParameter() throws NoSuchFieldException, IntrospectionException, + InvocationTargetException, IllegalAccessException { + + WebTarget webTarget = getExampleTarget(); + RequestParameters requestParameters = getEmptyRequestParameters(webTarget); + + Annotation ann = this.getClass().getDeclaredField("headerParam").getAnnotations()[0]; + Map, Annotation> anns = new HashMap<>(); + anns.put(HeaderParam.class, ann); + + requestParameters.addParameter("testHeader", anns); + MultivaluedHashMap headers = requestParameters.getHeaders(); + LinkedList headerList = new LinkedList<>(); + headerList.add("testHeader"); + + assertEquals(headerList, headers.get("headerParam")); + } + + @Test + public void testAddMatrixParameter() throws NoSuchFieldException, IntrospectionException, + InvocationTargetException, IllegalAccessException { + + WebTarget webTarget = getExampleTarget(); + RequestParameters requestParameters = getEmptyRequestParameters(webTarget); + + Annotation ann = this.getClass().getDeclaredField("matrixParam").getAnnotations()[0]; + Map, Annotation> anns = new HashMap<>(); + anns.put(MatrixParam.class, ann); + + requestParameters.addParameter("testMatrix", anns); + String uri = requestParameters.getNewTarget().getUriBuilder().build().toString(); + + assertEquals(baseURL + "/;matrixParam=testMatrix", uri); + } + + @Test + public void testAddCookieParameter() throws NoSuchFieldException, IntrospectionException, + InvocationTargetException, IllegalAccessException { + + WebTarget webTarget = getExampleTarget(); + RequestParameters requestParameters = getEmptyRequestParameters(webTarget); + + Annotation ann = this.getClass().getDeclaredField("cookieParam").getAnnotations()[0]; + Map, Annotation> anns = new HashMap<>(); + anns.put(CookieParam.class, ann); + + Cookie cookie = new Cookie("cookieParamName", "testCookie"); + requestParameters.addParameter(cookie, anns); + List cookies = requestParameters.getCookies(); + + assertEquals(new Cookie("cookieParam", "testCookie"), cookies.get(0)); + } + + @Test + public void testAddFormParameter() throws NoSuchFieldException, IntrospectionException, + InvocationTargetException, IllegalAccessException { + + WebTarget webTarget = getExampleTarget(); + RequestParameters requestParameters = getEmptyRequestParameters(webTarget); + + Annotation ann = this.getClass().getDeclaredField("formParam").getAnnotations()[0]; + Map, Annotation> anns = new HashMap<>(); + anns.put(FormParam.class, ann); + + requestParameters.addParameter("testForm", anns); + Form form = requestParameters.getForm(); + LinkedList formList = new LinkedList<>(); + formList.add("testForm"); + + assertEquals(formList, form.asMap().get("formParam")); + } + + @Test + public void testListOfFormParameters() throws NoSuchFieldException, IntrospectionException, + InvocationTargetException, IllegalAccessException { + + WebTarget webTarget = getExampleTarget(); + RequestParameters requestParameters = getEmptyRequestParameters(webTarget); + + Annotation ann = this.getClass().getDeclaredField("formParams").getAnnotations()[0]; + Map, Annotation> anns = new HashMap<>(); + anns.put(FormParam.class, ann); + + List testFormList = Arrays.asList("formParam1", "formParam2"); + requestParameters.addParameter(testFormList, anns); + Form form = requestParameters.getForm(); + + assertEquals(testFormList, form.asMap().get("formParams")); + + } + + // any nonempty annotation will do + private Map, Annotation> getNonEmptyBeanParamAnnotation() throws NoSuchFieldException { + Annotation ann = this.getClass().getDeclaredField("queryParam").getAnnotations()[0]; + Map, Annotation> anns = new HashMap<>(); + anns.put(BeanParam.class, ann); + return anns; + } + + @Test + public void testAddBeanParameter() throws NoSuchFieldException, IntrospectionException, + InvocationTargetException, IllegalAccessException { + + WebTarget webTarget = getExampleTarget(); + RequestParameters requestParameters = getEmptyRequestParameters(webTarget); + + MyBeanParam beanParam = new MyBeanParam(); + beanParam.setQueryParam2("testQuery"); + + Map, Annotation> anns = getNonEmptyBeanParamAnnotation(); + + requestParameters.addParameter(beanParam, anns); + String uri = requestParameters.getNewTarget().getUriBuilder().build().toString(); + + assertEquals(baseURL + "/?queryParam2=testQuery", uri); + } + + @Test + public void testAddListOfBeanParameters() throws NoSuchFieldException, IntrospectionException, + InvocationTargetException, IllegalAccessException { + + WebTarget webTarget = getExampleTarget(); + RequestParameters requestParameters = getEmptyRequestParameters(webTarget); + + MyBeanParam beanParam1 = new MyBeanParam(); + beanParam1.setQueryParam("testQuery"); + MyBeanParam beanParam2 = new MyBeanParam(); + beanParam2.setCookieParam(new Cookie("cookie", "cookieValue")); + + Map, Annotation> anns = getNonEmptyBeanParamAnnotation(); + + List beanParams = Arrays.asList(beanParam1, beanParam2); + requestParameters.addParameter(beanParams, anns); + + String uri = requestParameters.getNewTarget().getUriBuilder().build().toString(); + List cookies = requestParameters.getCookies(); + + assertEquals(baseURL + "/?queryParam=testQuery", uri); + assertEquals(new Cookie("cookieParam", "cookieValue"), cookies.get(0)); + } +} \ No newline at end of file diff --git a/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/WebResourceFactoryBeanParamTest.java b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/WebResourceFactoryBeanParamTest.java new file mode 100644 index 0000000000..27b1fd872d --- /dev/null +++ b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/WebResourceFactoryBeanParamTest.java @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2021 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.client.proxy; + +import jakarta.ws.rs.core.Cookie; +import org.glassfish.jersey.server.ResourceConfig; +import org.glassfish.jersey.test.JerseyTest; +import org.glassfish.jersey.test.TestProperties; +import org.junit.Test; + +import java.util.Arrays; +import java.util.List; + +import static org.junit.Assert.assertEquals; + +/** + * @author Richard Obersheimer + */ +public class WebResourceFactoryBeanParamTest extends JerseyTest { + + private MyResourceWithBeanParamIfc resourceWithBeanParam; + + @Override + protected ResourceConfig configure() { + enable(TestProperties.LOG_TRAFFIC); + return new ResourceConfig(MyResourceWithBeanParam.class); + } + + @Override + public void setUp() throws Exception { + super.setUp(); + resourceWithBeanParam = WebResourceFactory.newResource(MyResourceWithBeanParamIfc.class, target()); + } + + @Test + public void testBeanParamQuery() { + MyGetBeanParam myGetBeanParam = new MyGetBeanParam(); + myGetBeanParam.setQueryParam("query"); + + String response = resourceWithBeanParam.echoQuery(myGetBeanParam); + + assertEquals("query", response); + } + + @Test + public void testBeanParamHeader() { + MyGetBeanParam myGetBeanParam = new MyGetBeanParam(); + myGetBeanParam.setHeaderParam("header"); + + String response = resourceWithBeanParam.echoHeader(myGetBeanParam); + + assertEquals("header", response); + } + + @Test + public void testBeanParamPath() { + MyGetBeanParam myGetBeanParam = new MyGetBeanParam(); + myGetBeanParam.setPathParam("path"); + + String response = resourceWithBeanParam.echoPath(myGetBeanParam); + + assertEquals("path", response); + } + + @Test + public void testBeanParamCookie() { + MyGetBeanParam myGetBeanParam = new MyGetBeanParam(); + Cookie cookie = new Cookie("cName", "cValue"); + myGetBeanParam.setCookieParam(cookie); + + String response = resourceWithBeanParam.echoCookie(myGetBeanParam); + + assertEquals("cValue", response); + } + + @Test + public void testBeanParamMatrix() { + MyGetBeanParam myGetBeanParam = new MyGetBeanParam(); + List matrixParam = Arrays.asList("1", "2", "3"); + myGetBeanParam.setMatrixParam(matrixParam); + + String response = resourceWithBeanParam.echoMatrix(myGetBeanParam); + + assertEquals(matrixParam.toString(), response); + } + + @Test + public void testBeanParamSubBean() { + MyGetBeanParam myGetBeanParam = new MyGetBeanParam(); + List subQueryParam = Arrays.asList("1", "2", "3"); + MySubBeanParam subBeanParam = new MySubBeanParam(subQueryParam); + myGetBeanParam.setSubBeanParam(subBeanParam); + + String response = resourceWithBeanParam.echoSubBean(myGetBeanParam); + + assertEquals(subQueryParam.toString(), response); + } + + @Test + public void testBeanParam() { + List matrixParam = Arrays.asList("1", "2", "3"); + Cookie cookieParam = new Cookie("cookie1", "value1"); + List subQueryParam = Arrays.asList("subQuery1", "subQuery2"); + MySubBeanParam subBeanParam = new MySubBeanParam(subQueryParam); + MyBeanParam myBeanParam = new MyBeanParam("header", "path", "query", + "form1", "form2", matrixParam, cookieParam, subBeanParam); + myBeanParam.setQueryParam2("q2"); + + String response = resourceWithBeanParam.echo(myBeanParam); + + assertEquals("HEADER=header,PATH=path,FORM=form1,form2,QUERY=query,MATRIX=3,COOKIE=value1,SUB=2" + + ",Q2=q2", response); + } + + @Test + public void testSubResource() { + MyGetBeanParam myGetBeanParam = new MyGetBeanParam(); + myGetBeanParam.setQueryParam("query"); + + String response = resourceWithBeanParam.getSubResource().echoQuery(myGetBeanParam); + + assertEquals("query", response); + } +} diff --git a/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/WebResourceFactoryTest.java b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/WebResourceFactoryTest.java index 6ca975c562..68e81c7cc2 100644 --- a/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/WebResourceFactoryTest.java +++ b/ext/proxy-client/src/test/java/org/glassfish/jersey/client/proxy/WebResourceFactoryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021 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 From eb039031696a65c4facaa1616ff699e2ada0c1eb Mon Sep 17 00:00:00 2001 From: jansupol Date: Wed, 22 Dec 2021 11:44:56 +0100 Subject: [PATCH 14/20] Update to MP Rest Client 3.0 final Signed-off-by: jansupol --- ext/microprofile/mp-rest-client/pom.xml | 7 +++++-- tests/integration/microprofile/rest-client-tck/pom.xml | 2 +- .../integration/microprofile/rest-client-tck/tck-suite.xml | 6 ------ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ext/microprofile/mp-rest-client/pom.xml b/ext/microprofile/mp-rest-client/pom.xml index 91eaab56ca..8721442d41 100644 --- a/ext/microprofile/mp-rest-client/pom.xml +++ b/ext/microprofile/mp-rest-client/pom.xml @@ -32,7 +32,7 @@ org.eclipse.microprofile.rest.client microprofile-rest-client-api - 3.0-RC3 + 3.0 org.testng @@ -116,9 +116,12 @@ - org.glassfish.jersey.restclient.*;version=${project.version} + org.glassfish.jersey.microprofile.restclient.*;version=${project.version} + jakarta.enterprise.*;version="[3.0,5)", + jakarta.decorator.*;version="[3.0,5)", + org.eclipse.microprofile.config.*;version="!", * diff --git a/tests/integration/microprofile/rest-client-tck/pom.xml b/tests/integration/microprofile/rest-client-tck/pom.xml index e6ee1d67dd..0e2dd759c8 100644 --- a/tests/integration/microprofile/rest-client-tck/pom.xml +++ b/tests/integration/microprofile/rest-client-tck/pom.xml @@ -70,7 +70,7 @@ org.eclipse.microprofile.rest.client microprofile-rest-client-tck - 3.0-RC3 + 3.0 test diff --git a/tests/integration/microprofile/rest-client-tck/tck-suite.xml b/tests/integration/microprofile/rest-client-tck/tck-suite.xml index 91e5081758..a317e79ede 100644 --- a/tests/integration/microprofile/rest-client-tck/tck-suite.xml +++ b/tests/integration/microprofile/rest-client-tck/tck-suite.xml @@ -31,12 +31,6 @@ - - - - - - From ed430021bd99e0efc07ddbe6fc68b853c0cdc213 Mon Sep 17 00:00:00 2001 From: Maxim Nesen Date: Mon, 20 Dec 2021 17:08:45 +0100 Subject: [PATCH 15/20] Updating CI/CD JDK for 3.x build Signed-off-by: Maxim Nesen --- etc/jenkins/Jenkinsfile_ci_build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/jenkins/Jenkinsfile_ci_build b/etc/jenkins/Jenkinsfile_ci_build index 7c3f9ff093..f1b405bd70 100644 --- a/etc/jenkins/Jenkinsfile_ci_build +++ b/etc/jenkins/Jenkinsfile_ci_build @@ -32,12 +32,12 @@ pipeline { ''' } } - stage('JDK 16 ') { + stage('JDK 17 ') { agent { label 'centos-7' } tools { - jdk 'openjdk-jdk16-latest' + jdk 'openjdk-jdk17-latest' maven 'apache-maven-latest' } steps { @@ -49,4 +49,4 @@ pipeline { } } } -} \ No newline at end of file +} From 4aa8007bc4d85b27acf4e6a0485ecfc905c707d7 Mon Sep 17 00:00:00 2001 From: jansupol <15908245+jansupol@users.noreply.github.com> Date: Thu, 27 Jan 2022 12:20:58 +0100 Subject: [PATCH 16/20] Let Jackson use JAXB3 (#4963) * Let Jackson use JAXB3 Keep optional dependency for JAXB2 to keep it working Signed-off-by: jansupol --- .../jackson/CombinedAnnotationBean.java | 4 +- .../jackson/MyObjectMapperProvider.java | 6 +- media/json-jackson/pom.xml | 25 ++++- .../DefaultJacksonJaxbJsonProvider.java | 12 ++- .../internal/JacksonMapperConfigurator.java | 91 +++++++++++++++++++ .../jaxrs/json/JacksonJaxbJsonProvider.java | 6 ++ .../jaxrs/json/JacksonJsonProvider.java | 5 + .../JacksonJaxb2JsonProviderTest.java | 39 ++++++++ .../internal/model/Jaxb2ServiceTest.java | 60 ++++++++++++ .../jackson/internal/model/ServiceTest.java | 2 +- pom.xml | 6 ++ .../tests/e2e/entity/MultipartTest.java | 34 +++++-- .../tests/e2e/json/JsonTestProvider.java | 12 +-- .../JsonWithPaddingEncodingFilterTest.java | 6 +- .../tests/e2e/json/JsonWithPaddingTest.java | 8 +- tests/osgi/functional/pom.xml | 18 +--- .../osgi/test/basic/JsonJacksonTest.java | 7 +- 17 files changed, 287 insertions(+), 54 deletions(-) create mode 100644 media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/JacksonMapperConfigurator.java create mode 100644 media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/JacksonJaxb2JsonProviderTest.java create mode 100644 media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/model/Jaxb2ServiceTest.java diff --git a/examples/json-jackson/src/main/java/org/glassfish/jersey/examples/jackson/CombinedAnnotationBean.java b/examples/json-jackson/src/main/java/org/glassfish/jersey/examples/jackson/CombinedAnnotationBean.java index 06a23c47be..2ac0ac634b 100644 --- a/examples/json-jackson/src/main/java/org/glassfish/jersey/examples/jackson/CombinedAnnotationBean.java +++ b/examples/json-jackson/src/main/java/org/glassfish/jersey/examples/jackson/CombinedAnnotationBean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -10,7 +10,7 @@ package org.glassfish.jersey.examples.jackson; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlRootElement; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/examples/json-jackson/src/main/java/org/glassfish/jersey/examples/jackson/MyObjectMapperProvider.java b/examples/json-jackson/src/main/java/org/glassfish/jersey/examples/jackson/MyObjectMapperProvider.java index e32135878f..81bda853a0 100644 --- a/examples/json-jackson/src/main/java/org/glassfish/jersey/examples/jackson/MyObjectMapperProvider.java +++ b/examples/json-jackson/src/main/java/org/glassfish/jersey/examples/jackson/MyObjectMapperProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -19,7 +19,7 @@ import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector; import com.fasterxml.jackson.databind.type.TypeFactory; -import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector; +import com.fasterxml.jackson.module.jakarta.xmlbind.JakartaXmlBindAnnotationIntrospector; /** * TODO javadoc. @@ -63,7 +63,7 @@ private static ObjectMapper createDefaultMapper() { private static AnnotationIntrospector createJaxbJacksonAnnotationIntrospector() { - final AnnotationIntrospector jaxbIntrospector = new JaxbAnnotationIntrospector(TypeFactory.defaultInstance()); + final AnnotationIntrospector jaxbIntrospector = new JakartaXmlBindAnnotationIntrospector(TypeFactory.defaultInstance()); final AnnotationIntrospector jacksonIntrospector = new JacksonAnnotationIntrospector(); return AnnotationIntrospector.pair(jacksonIntrospector, jaxbIntrospector); diff --git a/media/json-jackson/pom.xml b/media/json-jackson/pom.xml index cbc01771b5..9456ee6234 100644 --- a/media/json-jackson/pom.xml +++ b/media/json-jackson/pom.xml @@ -1,7 +1,7 @@ + com.fasterxml.jackson.module + jackson-module-jakarta-xmlbind-annotations + + + jakarta.xml.bind + jakarta.xml.bind-api + + + jakarta.activation + jakarta.activation-api + + + + + javax.xml.bind jaxb-api 2.3.1 + test + + + jakarta.xml.bind + jakarta.xml.bind-api junit diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/DefaultJacksonJaxbJsonProvider.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/DefaultJacksonJaxbJsonProvider.java index 2ad04c18ca..f4f0f3f71f 100644 --- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/DefaultJacksonJaxbJsonProvider.java +++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/DefaultJacksonJaxbJsonProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2022 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 @@ -31,15 +31,15 @@ public class DefaultJacksonJaxbJsonProvider extends JacksonJaxbJsonProvider { //do not register JaxbAnnotationModule because it brakes default annotations processing - private static final String EXCLUDE_MODULE_NAME = "JaxbAnnotationModule"; + private static final String[] EXCLUDE_MODULE_NAMES = {"JaxbAnnotationModule", "JakartaXmlBindAnnotationModule"}; public DefaultJacksonJaxbJsonProvider() { - super(); + super(new JacksonMapperConfigurator(null, DEFAULT_ANNOTATIONS)); findAndRegisterModules(); } public DefaultJacksonJaxbJsonProvider(final Annotations... annotationsToUse) { - super(annotationsToUse); + super(new JacksonMapperConfigurator(null, annotationsToUse)); findAndRegisterModules(); } @@ -49,7 +49,9 @@ private void findAndRegisterModules() { final ObjectMapper mapper = _mapperConfig.getConfiguredMapper(); final List modules = ObjectMapper.findModules(); - modules.removeIf(mod -> mod.getModuleName().contains(EXCLUDE_MODULE_NAME)); + for (String exludeModuleName : EXCLUDE_MODULE_NAMES) { + modules.removeIf(mod -> mod.getModuleName().contains(exludeModuleName)); + } defaultMapper.registerModules(modules); if (mapper != null) { diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/JacksonMapperConfigurator.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/JacksonMapperConfigurator.java new file mode 100644 index 0000000000..7be7b11c6c --- /dev/null +++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/JacksonMapperConfigurator.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2022 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.jackson.internal; + +import com.fasterxml.jackson.databind.AnnotationIntrospector; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.module.jakarta.xmlbind.JakartaXmlBindAnnotationIntrospector; +import org.glassfish.jersey.internal.util.ReflectionHelper; +import org.glassfish.jersey.internal.util.collection.LazyValue; +import org.glassfish.jersey.internal.util.collection.Value; +import org.glassfish.jersey.internal.util.collection.Values; +import org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg.Annotations; +import org.glassfish.jersey.jackson.internal.jackson.jaxrs.json.JsonMapperConfigurator; + +import java.security.AccessController; +import java.util.ArrayList; + +public class JacksonMapperConfigurator extends JsonMapperConfigurator { + public JacksonMapperConfigurator(ObjectMapper mapper, Annotations[] defAnnotations) { + super(mapper, defAnnotations); + } + + @Override + protected AnnotationIntrospector _resolveIntrospectors(Annotations[] annotationsToUse) { + // Let's ensure there are no dups there first, filter out nulls + ArrayList intr = new ArrayList(); + for (Annotations a : annotationsToUse) { + if (a != null) { + _resolveIntrospector(a, intr); + } + } + int count = intr.size(); + if (count == 0) { + return AnnotationIntrospector.nopInstance(); + } + AnnotationIntrospector curr = intr.get(0); + for (int i = 1, len = intr.size(); i < len; ++i) { + curr = AnnotationIntrospector.pair(curr, intr.get(i)); + } + return curr; + } + + protected void _resolveIntrospector(Annotations ann, ArrayList intr) { + switch (ann) { + case JAXB: + /* For this, need to use indirection just so that error occurs + * when we get here, and not when this class is being loaded + */ + try { + if (_jaxbIntrospectorClass == null) { + _jaxbIntrospectorClass = JakartaXmlBindAnnotationIntrospector.class; + } + intr.add(JakartaXmlBindAnnotationIntrospector.class.newInstance()); + } catch (Exception e) { + throw new IllegalStateException("Failed to instantiate JakartaXmlBindAnnotationIntrospector: " + + e.getMessage(), e); + } + + if (jaxb2AnnotationIntrospector.get() == true) { + Class tempJaxbIntrospectorClass = _jaxbIntrospectorClass; + _jaxbIntrospectorClass = null; + intr.add(super._resolveIntrospector(ann)); + _jaxbIntrospectorClass = tempJaxbIntrospectorClass; + } + break; + default: + intr.add(super._resolveIntrospector(ann)); + } + } + + private static LazyValue jaxb2AnnotationIntrospector = Values.lazy((Value) () -> { + final Class aClass = AccessController.doPrivileged( + ReflectionHelper.classForNamePA("com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector") + ); + return aClass != null; + }); +} diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJaxbJsonProvider.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJaxbJsonProvider.java index 1c0a882fc2..eb7c072f0c 100644 --- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJaxbJsonProvider.java +++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJaxbJsonProvider.java @@ -63,4 +63,10 @@ public JacksonJaxbJsonProvider(ObjectMapper mapper, Annotations[] annotationsToU { super(mapper, annotationsToUse); } + + // Do not erase - Jersey required constructor + protected JacksonJaxbJsonProvider(JsonMapperConfigurator configurator) + { + super(configurator); + } } diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJsonProvider.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJsonProvider.java index 9fecf427a9..0871ece423 100644 --- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJsonProvider.java +++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJsonProvider.java @@ -137,6 +137,11 @@ public JacksonJsonProvider(ObjectMapper mapper, Annotations[] annotationsToUse) super(new JsonMapperConfigurator(mapper, annotationsToUse)); } + // Do not erase - Jersey required constructor + protected JacksonJsonProvider(JsonMapperConfigurator configurator) { + super(configurator); + } + /** * Method that will return version information stored in and read from jar * that contains this class. diff --git a/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/JacksonJaxb2JsonProviderTest.java b/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/JacksonJaxb2JsonProviderTest.java new file mode 100644 index 0000000000..09a3c8b7c2 --- /dev/null +++ b/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/JacksonJaxb2JsonProviderTest.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2022 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.jackson.internal; + +import jakarta.ws.rs.core.Application; +import org.glassfish.jersey.jackson.internal.model.Jaxb2ServiceTest; +import org.glassfish.jersey.server.ResourceConfig; +import org.glassfish.jersey.test.JerseyTest; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; + +public final class JacksonJaxb2JsonProviderTest extends JerseyTest { + + @Override + protected final Application configure() { + return new ResourceConfig(Jaxb2ServiceTest.class); + } + + @Test + public final void testJavaOptional() { + final String response = target("entity/simple").request().get(String.class); + assertEquals("{\"name\":\"Hello\",\"value\":\"World\"}", response); + } +} diff --git a/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/model/Jaxb2ServiceTest.java b/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/model/Jaxb2ServiceTest.java new file mode 100644 index 0000000000..a679142c55 --- /dev/null +++ b/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/model/Jaxb2ServiceTest.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2020, 2022 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.jackson.internal.model; + +import com.fasterxml.jackson.annotation.JsonGetter; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import javax.xml.bind.annotation.XmlElement; + +import java.util.Optional; + +@Path("/entity/") +public final class Jaxb2ServiceTest { + + @GET + @Produces(MediaType.APPLICATION_JSON) + @Path("/simple") + public final EntityTest simple() { + return new EntityTest("Hello", "World"); + } + + private static final class EntityTest { + + private final String name; + + private final String value; + + EntityTest(final String name, final String value) { + this.name = name; + this.value = value; + } + + @XmlElement(name = "jaxb") + @JsonGetter("name") + public final String getName() { + return name; + } + + @JsonGetter("value") + public final Optional getValue() { + return Optional.ofNullable(value); + } + } +} diff --git a/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/model/ServiceTest.java b/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/model/ServiceTest.java index 23ac90de61..314cc99d9a 100644 --- a/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/model/ServiceTest.java +++ b/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/model/ServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2022 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 diff --git a/pom.xml b/pom.xml index 26aa611c56..e55a8244a2 100644 --- a/pom.xml +++ b/pom.xml @@ -1760,6 +1760,12 @@ ${jackson.version} + + com.fasterxml.jackson.module + jackson-module-jakarta-xmlbind-annotations + ${jackson.version} + + xerces xercesImpl diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/MultipartTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/MultipartTest.java index 1c00186b4c..682f1a8d91 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/MultipartTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/MultipartTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2022 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 @@ -31,6 +31,7 @@ import jakarta.ws.rs.WebApplicationException; import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.Feature; import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.MultivaluedMap; @@ -39,7 +40,7 @@ import jakarta.ws.rs.ext.MessageBodyWriter; import org.glassfish.jersey.client.ClientConfig; -//import org.glassfish.jersey.jackson.JacksonFeature; +import org.glassfish.jersey.jackson.JacksonFeature; import org.glassfish.jersey.jsonb.JsonBindingFeature; import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; @@ -51,6 +52,9 @@ import org.glassfish.jersey.test.JerseyTest; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; @@ -58,8 +62,20 @@ /** * @author Martin Matula */ +@RunWith(Parameterized.class) public class MultipartTest extends JerseyTest { + private static Class featureClass; + + @Parameterized.Parameters(name = "Provider: {0}") + public static Iterable providers() { + return Arrays.asList(new Class[][]{{MoxyJsonFeature.class}, {JacksonFeature.class}, {JsonBindingFeature.class}}); + } + + public MultipartTest(Class featureProvider) { + super(configure(featureProvider)); + } + @SuppressWarnings("UnusedDeclaration") public static class MyObject { @@ -156,19 +172,21 @@ public void writeTo(final MultipartResource multipartResource, final Class ty } } - @Override - protected Application configure() { + protected static Application configure(Class featureClass) { + MultipartTest.featureClass = featureClass; return new ResourceConfig(MultipartResource.class, MessageBodyProvider.class) .register(MultiPartFeature.class) + .register(featureClass); // .register(JacksonFeature.class); - .register(JsonBindingFeature.class); +// .register(JsonBindingFeature.class); } @Override protected void configureClient(final ClientConfig config) { config.register(MultiPartFeature.class); + config.register(featureClass); //config.register(JacksonFeature.class); - config.register(JsonBindingFeature.class); + //config.register(JsonBindingFeature.class); } @Test @@ -207,6 +225,10 @@ public void testMbrExceptionServer() throws Exception { */ @Test public void testSpecificListAsParameter() throws Exception { + if (featureClass == MoxyJsonFeature.class) { + // No available MessageBodyWriter for class "class java.util.Arrays$ArrayList" and media type "application/json" + return; + } final MyObject object = new MyObject("object"); final List list = Arrays.asList(new MyObject("list1"), new MyObject("list2")); diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/JsonTestProvider.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/JsonTestProvider.java index 288a2e8339..f15b9f7a44 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/JsonTestProvider.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/JsonTestProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2022 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 @@ -30,7 +30,7 @@ import jakarta.json.bind.JsonbBuilder; import jakarta.json.bind.JsonbConfig; -//import org.glassfish.jersey.jackson.JacksonFeature; +import org.glassfish.jersey.jackson.JacksonFeature; import org.glassfish.jersey.jettison.JettisonConfig; import org.glassfish.jersey.jettison.JettisonFeature; import org.glassfish.jersey.jsonb.JsonBindingFeature; @@ -45,7 +45,7 @@ public abstract class JsonTestProvider { public static final Collection JAXB_PROVIDERS = new LinkedHashSet() {{ -// add(new JacksonJsonTestProvider()); + add(new JacksonJsonTestProvider()); add(new JettisonMappedJsonTestProvider()); add(new JettisonBadgerfishJsonTestProvider()); add(new MoxyJsonTestProvider()); @@ -54,7 +54,7 @@ public abstract class JsonTestProvider { // TODO add MoxyJsonTestProvider once MOXy supports POJO public static final Collection POJO_PROVIDERS = new LinkedHashSet() {{ -// add(new JacksonJsonTestProvider()); + add(new JacksonJsonTestProvider()); }}; private Feature feature; @@ -125,7 +125,7 @@ public Jsonb getContext(Class type) { return JsonbBuilder.create(config); } } -/* + public static class JacksonJsonTestProvider extends JsonTestProvider { public JacksonJsonTestProvider() { @@ -134,7 +134,7 @@ public JacksonJsonTestProvider() { } -*/ + public static class JsonbTestProvider extends JsonTestProvider { public JsonbTestProvider() { diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/JsonWithPaddingEncodingFilterTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/JsonWithPaddingEncodingFilterTest.java index f334dd6413..bc79f2c6e8 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/JsonWithPaddingEncodingFilterTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/JsonWithPaddingEncodingFilterTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2022 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 @@ -24,7 +24,7 @@ import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.Response; -//import org.glassfish.jersey.jackson.JacksonFeature; +import org.glassfish.jersey.jackson.JacksonFeature; import org.glassfish.jersey.message.DeflateEncoder; import org.glassfish.jersey.message.GZipEncoder; import org.glassfish.jersey.server.JSONP; @@ -50,7 +50,7 @@ public class JsonWithPaddingEncodingFilterTest extends JerseyTest { protected ResourceConfig configure() { enable(TestProperties.LOG_TRAFFIC); return new ResourceConfig(MyResource.class) -// .register(JacksonFeature.class) + .register(JacksonFeature.class) .register(EncodingFilter.class) .register(GZipEncoder.class) .register(DeflateEncoder.class); diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/JsonWithPaddingTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/JsonWithPaddingTest.java index 1a5d5e47c6..1a351643b7 100644 --- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/JsonWithPaddingTest.java +++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/JsonWithPaddingTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2022 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 @@ -30,7 +30,7 @@ import jakarta.xml.bind.annotation.XmlRootElement; import org.glassfish.jersey.client.ClientConfig; -// import org.glassfish.jersey.jackson.JacksonFeature; +import org.glassfish.jersey.jackson.JacksonFeature; import org.glassfish.jersey.server.JSONP; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.test.JerseyTest; @@ -176,9 +176,9 @@ public void testJsonWithJavaScriptMediaType() throws Exception { final Response response = target("jsonp").path("PureJson").request("application/x-javascript").get(); // Method is invoked but we do not have a MBW for application/x-javascript. - /* if (jsonTestProvider.getFeature().getClass() == JacksonFeature.class) { + if (jsonTestProvider.getFeature().getClass() == JacksonFeature.class) { assertThat(response.getStatus(), equalTo(200)); - } else */ { + } else { assertThat(response.getStatus(), equalTo(500)); } } diff --git a/tests/osgi/functional/pom.xml b/tests/osgi/functional/pom.xml index 69dd5bd23f..e024b15359 100644 --- a/tests/osgi/functional/pom.xml +++ b/tests/osgi/functional/pom.xml @@ -46,11 +46,6 @@ testCompile - - - org/glassfish/jersey/osgi/test/basic/JsonJacksonTest.java - - @@ -347,7 +342,7 @@ com.fasterxml.jackson.module - jackson-module-jaxb-annotations + jackson-module-jakarta-xmlbind-annotations test @@ -355,17 +350,6 @@ jackson-annotations test - - com.fasterxml.jackson.jaxrs - jackson-jaxrs-base - test - - - com.fasterxml.jackson.jaxrs - jackson-jaxrs-json-provider - test - - com.sun.xml.bind jaxb-osgi diff --git a/tests/osgi/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/JsonJacksonTest.java b/tests/osgi/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/JsonJacksonTest.java index a719d5feff..7d06f02d48 100644 --- a/tests/osgi/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/JsonJacksonTest.java +++ b/tests/osgi/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/JsonJacksonTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2022 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 @@ -48,10 +48,7 @@ public static Option[] configuration() { mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-core").versionAsInProject(), mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-databind").versionAsInProject(), mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-annotations").versionAsInProject(), - mavenBundle().groupId("com.fasterxml.jackson.jaxrs").artifactId("jackson-jaxrs-base").versionAsInProject(), - mavenBundle().groupId("com.fasterxml.jackson.jaxrs").artifactId("jackson-jaxrs-json-provider") - .versionAsInProject(), - mavenBundle().groupId("com.fasterxml.jackson.module").artifactId("jackson-module-jaxb-annotations") + mavenBundle().groupId("com.fasterxml.jackson.module").artifactId("jackson-module-jakarta-xmlbind-annotations") .versionAsInProject() )); From 719445b6bc20f4aba2e7ef994d6c4265a37b2422 Mon Sep 17 00:00:00 2001 From: jansupol Date: Tue, 8 Feb 2022 13:04:15 +0100 Subject: [PATCH 17/20] Enable tests/osgi/functional Jackson dependency Signed-off-by: jansupol --- tests/osgi/functional/pom.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/osgi/functional/pom.xml b/tests/osgi/functional/pom.xml index e024b15359..23317baaf6 100644 --- a/tests/osgi/functional/pom.xml +++ b/tests/osgi/functional/pom.xml @@ -208,11 +208,11 @@ ${httpclient.version} - - - - - + + org.glassfish.jersey.media + jersey-media-json-jackson + test + org.glassfish.jersey.media jersey-media-json-jettison From f8ad0ca93e62fb6c44ea45aae11d21f7fcbc694c Mon Sep 17 00:00:00 2001 From: jansupol Date: Tue, 8 Feb 2022 13:21:55 +0100 Subject: [PATCH 18/20] Adjust copyright years Signed-off-by: jansupol --- .../jersey/grizzly2/httpserver/GrizzlyHttpServerFactory.java | 2 +- .../java/org/glassfish/jersey/jdkhttp/JdkHttpServerFactory.java | 2 +- .../jersey/microprofile/restclient/RestClientBuilderImpl.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/containers/grizzly2-http/src/main/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpServerFactory.java b/containers/grizzly2-http/src/main/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpServerFactory.java index c142b566b8..4eb458da4f 100644 --- a/containers/grizzly2-http/src/main/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpServerFactory.java +++ b/containers/grizzly2-http/src/main/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpServerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2022 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 diff --git a/containers/jdk-http/src/main/java/org/glassfish/jersey/jdkhttp/JdkHttpServerFactory.java b/containers/jdk-http/src/main/java/org/glassfish/jersey/jdkhttp/JdkHttpServerFactory.java index 872aabdf24..1c603364bc 100644 --- a/containers/jdk-http/src/main/java/org/glassfish/jersey/jdkhttp/JdkHttpServerFactory.java +++ b/containers/jdk-http/src/main/java/org/glassfish/jersey/jdkhttp/JdkHttpServerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2022 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 diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientBuilderImpl.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientBuilderImpl.java index c1a00d000e..1a3504ebf7 100644 --- a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientBuilderImpl.java +++ b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientBuilderImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2021 Payara Foundation and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the From ae8a4b9575fbeaeadc6fa5ce915e679e650e9d0d Mon Sep 17 00:00:00 2001 From: jansupol Date: Tue, 8 Feb 2022 14:44:02 +0100 Subject: [PATCH 19/20] Fix ext\proxy-client for JDK 8 Signed-off-by: jansupol --- .../org/glassfish/jersey/client/proxy/RequestParameters.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/proxy-client/src/main/java/org/glassfish/jersey/client/proxy/RequestParameters.java b/ext/proxy-client/src/main/java/org/glassfish/jersey/client/proxy/RequestParameters.java index 007fbefde8..6457dd79c0 100644 --- a/ext/proxy-client/src/main/java/org/glassfish/jersey/client/proxy/RequestParameters.java +++ b/ext/proxy-client/src/main/java/org/glassfish/jersey/client/proxy/RequestParameters.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2022 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 @@ -61,7 +61,8 @@ class RequestParameters { RequestParameters(final WebTarget newTarget, final MultivaluedMap headers, final List cookies, final Form form) { - this.headers = new MultivaluedHashMap<>(headers); + this.headers = new MultivaluedHashMap<>(); + this.headers.putAll(headers); this.cookies = new LinkedList<>(cookies); this.form = new Form(); this.form.asMap().putAll(form.asMap()); From 85e26dccb53ee388a69730ebe3e5f4585f35343f Mon Sep 17 00:00:00 2001 From: Maxim Nesen Date: Thu, 10 Feb 2022 17:33:12 +0100 Subject: [PATCH 20/20] CP year Signed-off-by: Maxim Nesen --- containers/grizzly2-http/pom.xml | 2 +- .../jersey/grizzly2/httpserver/GrizzlyHttpServerTest.java | 2 +- .../httpserver/test/application/TestedEndpoint.java | 2 +- examples/helloworld-weld/pom.xml | 2 +- pom.xml | 7 +------ tests/osgi/functional/pom.xml | 5 +++++ tests/pom.xml | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/containers/grizzly2-http/pom.xml b/containers/grizzly2-http/pom.xml index 28ddd4a996..908323864b 100644 --- a/containers/grizzly2-http/pom.xml +++ b/containers/grizzly2-http/pom.xml @@ -1,7 +1,7 @@