new module for dependencyConvergence validation Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
diff --git a/connectors/apache-connector/pom.xml b/connectors/apache-connector/pom.xml index f366855..258ef18 100644 --- a/connectors/apache-connector/pom.xml +++ b/connectors/apache-connector/pom.xml
@@ -40,6 +40,18 @@ <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> + <exclusions> + <exclusion> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>${commons.codec.version}</version> + <scope>test</scope> </dependency> <dependency>
diff --git a/connectors/apache5-connector/pom.xml b/connectors/apache5-connector/pom.xml index 6e24418..9d08082 100644 --- a/connectors/apache5-connector/pom.xml +++ b/connectors/apache5-connector/pom.xml
@@ -40,9 +40,21 @@ <dependency> <groupId>org.apache.httpcomponents.client5</groupId> <artifactId>httpclient5</artifactId> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>${slf4j.version}</version> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.glassfish.jersey.containers</groupId> <artifactId>jersey-container-grizzly2-http</artifactId> <version>${project.version}</version>
diff --git a/connectors/grizzly-connector/pom.xml b/connectors/grizzly-connector/pom.xml index a9327a5..ba96bfd 100644 --- a/connectors/grizzly-connector/pom.xml +++ b/connectors/grizzly-connector/pom.xml
@@ -49,9 +49,18 @@ <groupId>org.glassfish.grizzly</groupId> <artifactId>connection-pool</artifactId> </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </exclusion> </exclusions> </dependency> <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>${slf4j.version}</version> + </dependency> + <dependency> <groupId>org.glassfish.grizzly</groupId> <artifactId>grizzly-websockets</artifactId> </dependency>
diff --git a/examples/groovy/pom.xml b/examples/groovy/pom.xml index c3cb714..49a7051 100644 --- a/examples/groovy/pom.xml +++ b/examples/groovy/pom.xml
@@ -77,7 +77,7 @@ <plugin> <groupId>org.codehaus.gmavenplus</groupId> <artifactId>gmavenplus-plugin</artifactId> - <version>1.12.1</version> + <version>${org.codehaus.gmavenplus.version}</version> <executions> <execution> <id>1</id>
diff --git a/examples/open-tracing/pom.xml b/examples/open-tracing/pom.xml index 71eca19..cc01f99 100644 --- a/examples/open-tracing/pom.xml +++ b/examples/open-tracing/pom.xml
@@ -52,7 +52,7 @@ <dependency> <groupId>com.uber.jaeger</groupId> <artifactId>jaeger-core</artifactId> - <version>0.27.0</version> + <version>${com.uber.jaeger.version}</version> <exclusions> <exclusion> <groupId>org.slf4j</groupId>
diff --git a/ext/cdi/jersey-weld2-se/pom.xml b/ext/cdi/jersey-weld2-se/pom.xml index 17e5f20..18eddfb 100644 --- a/ext/cdi/jersey-weld2-se/pom.xml +++ b/ext/cdi/jersey-weld2-se/pom.xml
@@ -36,6 +36,12 @@ <dependency> <groupId>org.jboss.weld.se</groupId> <artifactId>weld-se-core</artifactId> + <exclusions> + <exclusion> + <groupId>jakarta.interceptor</groupId> + <artifactId>jakarta.interceptor-api</artifactId> + </exclusion> + </exclusions> <scope>provided</scope> </dependency> <dependency> @@ -51,6 +57,12 @@ <dependency> <groupId>jakarta.enterprise</groupId> <artifactId>jakarta.enterprise.cdi-api</artifactId> + <exclusions> + <exclusion> + <groupId>jakarta.interceptor</groupId> + <artifactId>jakarta.interceptor-api</artifactId> + </exclusion> + </exclusions> </dependency> </dependencies>
diff --git a/ext/mvc-mustache/pom.xml b/ext/mvc-mustache/pom.xml index 8a14f5c..c409a7c 100644 --- a/ext/mvc-mustache/pom.xml +++ b/ext/mvc-mustache/pom.xml
@@ -66,6 +66,17 @@ <groupId>com.github.spullara.mustache.java</groupId> <artifactId>compiler</artifactId> <version>${mustache.version}</version> + <exclusions> + <exclusion> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>${guava.version}</version> </dependency> </dependencies>
diff --git a/ext/rx/rx-client-rxjava2/pom.xml b/ext/rx/rx-client-rxjava2/pom.xml index d0f8bb2..f859654 100644 --- a/ext/rx/rx-client-rxjava2/pom.xml +++ b/ext/rx/rx-client-rxjava2/pom.xml
@@ -42,11 +42,17 @@ <groupId>io.reactivex.rxjava2</groupId> <artifactId>rxjava</artifactId> <version>${rxjava2.version}</version> + <exclusions> + <exclusion> + <groupId>org.reactivestreams</groupId> + <artifactId>reactive-streams</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.reactivestreams</groupId> <artifactId>reactive-streams</artifactId> - <version>1.0.0</version> + <version>${reactive.streams.version}</version> </dependency> </dependencies> </project>
diff --git a/ext/spring6/pom.xml b/ext/spring6/pom.xml index c7817c6..701fc99 100644 --- a/ext/spring6/pom.xml +++ b/ext/spring6/pom.xml
@@ -89,6 +89,12 @@ <groupId>org.glassfish.hk2</groupId> <artifactId>hk2</artifactId> <version>${hk2.version}</version> + <exclusions> + <exclusion> + <groupId>org.ow2.asm</groupId> + <artifactId>asm</artifactId> + </exclusion> + </exclusions> </dependency> <dependency>
diff --git a/incubator/kryo/pom.xml b/incubator/kryo/pom.xml index 7c09b33..36b1f1b 100644 --- a/incubator/kryo/pom.xml +++ b/incubator/kryo/pom.xml
@@ -48,6 +48,17 @@ <dependency> <groupId>com.esotericsoftware</groupId> <artifactId>kryo</artifactId> + <exclusions> + <exclusion> + <groupId>org.ow2.asm</groupId> + <artifactId>asm</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm</artifactId> + <version>${asm.version}</version> </dependency> <dependency>
diff --git a/pom.xml b/pom.xml index cf11075..ca17016 100644 --- a/pom.xml +++ b/pom.xml
@@ -2109,6 +2109,14 @@ <grizzly.client.version>1.16</grizzly.client.version> <enforcer.version>3.1.0</enforcer.version> + <!--versions, extracted here due to maven-enforcer-plugin --> + <slf4j.version>2.0.0-alpha6</slf4j.version> + <commons.codec.version>1.15</commons.codec.version> + <reactive.streams.version>1.0.3</reactive.streams.version> + <com.uber.jaeger.version>0.27.0</com.uber.jaeger.version> + <org.codehaus.gmavenplus.version>1.13.1</org.codehaus.gmavenplus.version> + <!-- end of versions extracted here due to maven-enforcer-plugin --> + <!-- microprofile --> <microprofile.config.version>3.0</microprofile.config.version> <microprofile.rest.client.version>3.0</microprofile.rest.client.version> @@ -2134,7 +2142,7 @@ <jmh.version>1.10.2</jmh.version> <jmockit.version>1.44</jmockit.version> <junit5.version>5.6.0</junit5.version> - <kryo.version>4.0.1</kryo.version> + <kryo.version>4.0.2</kryo.version> <mockito.version>3.9.0</mockito.version> <!-- CQ 17673 --> <mustache.version>0.8.17</mustache.version> <netty.version>4.1.75.Final</netty.version>
diff --git a/test-framework/maven/container-runner-maven-plugin/pom.xml b/test-framework/maven/container-runner-maven-plugin/pom.xml index ce864fb..8306f9f 100644 --- a/test-framework/maven/container-runner-maven-plugin/pom.xml +++ b/test-framework/maven/container-runner-maven-plugin/pom.xml
@@ -119,7 +119,7 @@ <dependency> <groupId>org.codehaus.gmavenplus</groupId> <artifactId>gmavenplus-plugin</artifactId> - <version>1.13.1</version> + <version>${org.codehaus.gmavenplus.version}</version> <exclusions> <exclusion> <groupId>org.apache.maven.shared</groupId>
diff --git a/tests/e2e-client/pom.xml b/tests/e2e-client/pom.xml index 1dce53c..a286c36 100644 --- a/tests/e2e-client/pom.xml +++ b/tests/e2e-client/pom.xml
@@ -182,6 +182,11 @@ <artifactId>xmlunit</artifactId> <scope>test</scope> </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>${commons.io.version}</version> + </dependency> </dependencies> <profiles>
diff --git a/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/ChunkedInputStreamClosedPrematurelyTest.java b/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/ChunkedInputStreamClosedPrematurelyTest.java index 33b1fbb..3298e5d 100644 --- a/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/ChunkedInputStreamClosedPrematurelyTest.java +++ b/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/ChunkedInputStreamClosedPrematurelyTest.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 @@ -22,6 +22,7 @@ import java.net.HttpURLConnection; import java.net.URL; import java.util.Arrays; +import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ExecutionException; @@ -57,8 +58,6 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import com.google.common.util.concurrent.SettableFuture; - /** * Reproducer for JERSEY-2705. Client side entity InputStream exception * in chunked mode should not lead to the same behavior on the server side, @@ -80,7 +79,7 @@ @SuppressWarnings({"ThrowableResultOfMethodCallIgnored", "JavaDoc"}) public static class TestResource { - private static final ConcurrentMap<String, SettableFuture<Exception>> REQUEST_MAP = new ConcurrentHashMap<>(); + private static final ConcurrentMap<String, CompletableFuture<Exception>> REQUEST_MAP = new ConcurrentHashMap<>(); @QueryParam(REQ_ID_PARAM_NAME) private String reqId; @@ -100,7 +99,7 @@ thrown = ex; } - if (!getFutureFor(reqId).set(thrown)) { + if (!getFutureFor(reqId).complete(thrown)) { LOGGER.log(Level.WARNING, "Unable to set stream processing exception into the settable future instance for request id " + reqId, thrown); @@ -113,7 +112,7 @@ @GET public Boolean getRequestWasMade() { // add a new future for the request if not there yet to avoid race conditions with POST processing - final SettableFuture<Exception> esf = getFutureFor(reqId); + final CompletableFuture<Exception> esf = getFutureFor(reqId); try { // wait for up to three second for a request to be made; // there is always a value, if set... @@ -126,7 +125,7 @@ @Path("/requestCausedException") @GET public Boolean getRequestCausedException() { - final SettableFuture<Exception> esf = getFutureFor(reqId); + final CompletableFuture<Exception> esf = getFutureFor(reqId); try { return esf.get(3, TimeUnit.SECONDS) != NO_EXCEPTION; } catch (InterruptedException | ExecutionException | TimeoutException e) { @@ -134,9 +133,9 @@ } } - private SettableFuture<Exception> getFutureFor(String key) { - final SettableFuture<Exception> esf = SettableFuture.create(); - final SettableFuture<Exception> oldEsf = REQUEST_MAP.putIfAbsent(key, esf); + private CompletableFuture<Exception> getFutureFor(String key) { + final CompletableFuture<Exception> esf = new CompletableFuture(); + final CompletableFuture<Exception> oldEsf = REQUEST_MAP.putIfAbsent(key, esf); return (oldEsf != null) ? oldEsf : esf; } }
diff --git a/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/connector/ssl/AbstractConnectorServerTest.java b/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/connector/ssl/AbstractConnectorServerTest.java index f26fca9..7976f4d 100644 --- a/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/connector/ssl/AbstractConnectorServerTest.java +++ b/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/connector/ssl/AbstractConnectorServerTest.java
@@ -36,7 +36,7 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; -import com.google.common.io.ByteStreams; +import org.apache.commons.io.IOUtils; /** * SSL connector hostname verification tests. @@ -99,9 +99,9 @@ final InputStream trustStore = SslConnectorConfigurationTest.class.getResourceAsStream(clientTrustStore()); final InputStream keyStore = SslConnectorConfigurationTest.class.getResourceAsStream(CLIENT_KEY_STORE); return SslConfigurator.newInstance() - .trustStoreBytes(ByteStreams.toByteArray(trustStore)) + .trustStoreBytes(IOUtils.toByteArray(trustStore)) .trustStorePassword("asdfgh") - .keyStoreBytes(ByteStreams.toByteArray(keyStore)) + .keyStoreBytes(IOUtils.toByteArray(keyStore)) .keyPassword("asdfgh") .createSSLContext(); }
diff --git a/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/connector/ssl/Server.java b/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/connector/ssl/Server.java index c986c2c..20795c3 100644 --- a/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/connector/ssl/Server.java +++ b/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/connector/ssl/Server.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 @@ -23,6 +23,7 @@ import jakarta.ws.rs.core.UriBuilder; +import org.apache.commons.io.IOUtils; import org.glassfish.jersey.logging.LoggingFeature; import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory; import org.glassfish.jersey.server.ResourceConfig; @@ -31,8 +32,6 @@ import org.glassfish.grizzly.ssl.SSLContextConfigurator; import org.glassfish.grizzly.ssl.SSLEngineConfigurator; -import com.google.common.io.ByteStreams; - /** * A simple SSL-secured HTTP server for testing purposes. * @@ -87,9 +86,9 @@ SSLContextConfigurator sslContext = new SSLContextConfigurator(); // set up security context - sslContext.setKeyStoreBytes(ByteStreams.toByteArray(keyStore)); // contains server key pair + sslContext.setKeyStoreBytes(IOUtils.toByteArray(keyStore)); // contains server key pair sslContext.setKeyStorePass("asdfgh"); - sslContext.setTrustStoreBytes(ByteStreams.toByteArray(trustStore)); // contains client certificate + sslContext.setTrustStoreBytes(IOUtils.toByteArray(trustStore)); // contains client certificate sslContext.setTrustStorePass("asdfgh"); ResourceConfig rc = new ResourceConfig();
diff --git a/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/wadl/WadlBeanParamTest.java b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/wadl/WadlBeanParamTest.java index 195c675..9dc66d9 100644 --- a/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/wadl/WadlBeanParamTest.java +++ b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/wadl/WadlBeanParamTest.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -22,6 +22,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import java.util.Collections; import jakarta.ws.rs.BeanParam; import jakarta.ws.rs.CookieParam; @@ -61,8 +62,6 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; -import com.google.common.collect.ImmutableMap; - /** * Tests whether WADL for a {@link BeanParam} annotated resource method parameter is generated properly. * <p/> @@ -168,7 +167,7 @@ XPathConstants.NODE)) ); XMLUnit.setXpathNamespaceContext( - new SimpleNamespaceContext(ImmutableMap.of("wadl", "http://wadl.dev.java.net/2009/02"))); + new SimpleNamespaceContext(Collections.singletonMap("wadl", "http://wadl.dev.java.net/2009/02"))); diff.overrideElementQualifier(elementQualifier); XMLAssert.assertXMLEqual(diff, true); }
diff --git a/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/wadl/WadlResourceTest.java b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/wadl/WadlResourceTest.java index 7237128..42e549e 100644 --- a/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/wadl/WadlResourceTest.java +++ b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/wadl/WadlResourceTest.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2021 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 @@ -27,6 +27,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.net.URI; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -112,8 +113,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import com.google.common.collect.ImmutableMap; - import com.sun.research.ws.wadl.Method; import com.sun.research.ws.wadl.Param; import com.sun.research.ws.wadl.Request; @@ -1279,7 +1278,7 @@ XPathConstants.NODE)) ); XMLUnit.setXpathNamespaceContext( - new SimpleNamespaceContext(ImmutableMap.of("wadl", "http://wadl.dev.java.net/2009/02"))); + new SimpleNamespaceContext(Collections.singletonMap("wadl", "http://wadl.dev.java.net/2009/02"))); final ElementQualifier elementQualifier = new RecursiveElementNameAndTextQualifier(); diff.overrideElementQualifier(elementQualifier); XMLAssert.assertXMLEqual(diff, true);
diff --git a/tests/integration/jersey-5087/pom.xml b/tests/integration/jersey-5087/pom.xml new file mode 100644 index 0000000..efbfe3c --- /dev/null +++ b/tests/integration/jersey-5087/pom.xml
@@ -0,0 +1,333 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + 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 + +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <artifactId>project</artifactId> + <groupId>org.glassfish.jersey.tests.integration</groupId> + <version>3.1.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + + <artifactId>jersey-5087</artifactId> + <packaging>war</packaging> + <name>jersey-tests-integration-jersey-5087</name> + + <description>dependencyConvergence rule check</description> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.glassfish.jersey</groupId> + <artifactId>jersey-bom</artifactId> + <version>${project.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-common</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-client</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-server</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.bundles</groupId> + <artifactId>jaxrs-ri</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.connectors</groupId> + <artifactId>jersey-apache-connector</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.connectors</groupId> + <artifactId>jersey-apache5-connector</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.connectors</groupId> + <artifactId>jersey-helidon-connector</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.connectors</groupId> + <artifactId>jersey-grizzly-connector</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.connectors</groupId> + <artifactId>jersey-jetty-connector</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.connectors</groupId> + <artifactId>jersey-jdk-connector</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.connectors</groupId> + <artifactId>jersey-netty-connector</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-jetty-http</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-grizzly2-http</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-grizzly2-servlet</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-jetty-servlet</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-jdk-http</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-netty-http</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-servlet</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-servlet-core</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers</groupId> + <artifactId>jersey-container-simple-http</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.containers.glassfish</groupId> + <artifactId>jersey-gf-ejb</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext</groupId> + <artifactId>jersey-bean-validation</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext</groupId> + <artifactId>jersey-entity-filtering</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext</groupId> + <artifactId>jersey-metainf-services</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext.microprofile</groupId> + <artifactId>jersey-mp-config</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext</groupId> + <artifactId>jersey-mvc</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext</groupId> + <artifactId>jersey-mvc-bean-validation</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext</groupId> + <artifactId>jersey-mvc-freemarker</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext</groupId> + <artifactId>jersey-mvc-jsp</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext</groupId> + <artifactId>jersey-mvc-mustache</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext</groupId> + <artifactId>jersey-proxy-client</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext</groupId> + <artifactId>jersey-spring6</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext</groupId> + <artifactId>jersey-declarative-linking</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext</groupId> + <artifactId>jersey-wadl-doclet</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext.cdi</groupId> + <artifactId>jersey-weld2-se</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext.cdi</groupId> + <artifactId>jersey-cdi1x</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext.cdi</groupId> + <artifactId>jersey-cdi1x-transaction</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext.cdi</groupId> + <artifactId>jersey-cdi1x-validation</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext.cdi</groupId> + <artifactId>jersey-cdi1x-servlet</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext.cdi</groupId> + <artifactId>jersey-cdi1x-ban-custom-hk2-binding</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext.cdi</groupId> + <artifactId>jersey-cdi-rs-inject</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext.rx</groupId> + <artifactId>jersey-rx-client-guava</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext.rx</groupId> + <artifactId>jersey-rx-client-rxjava</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext.rx</groupId> + <artifactId>jersey-rx-client-rxjava2</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.ext.microprofile</groupId> + <artifactId>jersey-mp-rest-client</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-jaxb</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-json-jackson</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-json-jettison</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-json-processing</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-json-binding</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-kryo</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-moxy</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-multipart</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-sse</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.security</groupId> + <artifactId>oauth1-client</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.security</groupId> + <artifactId>oauth1-server</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.security</groupId> + <artifactId>oauth1-signature</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.security</groupId> + <artifactId>oauth2-client</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.inject</groupId> + <artifactId>jersey-hk2</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.inject</groupId> + <artifactId>jersey-cdi2-se</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.test-framework</groupId> + <artifactId>jersey-test-framework-core</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.test-framework.providers</groupId> + <artifactId>jersey-test-framework-provider-bundle</artifactId> + <type>pom</type> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.test-framework.providers</groupId> + <artifactId>jersey-test-framework-provider-external</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.test-framework.providers</groupId> + <artifactId>jersey-test-framework-provider-grizzly2</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.test-framework.providers</groupId> + <artifactId>jersey-test-framework-provider-inmemory</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.test-framework.providers</groupId> + <artifactId>jersey-test-framework-provider-jdk-http</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.test-framework.providers</groupId> + <artifactId>jersey-test-framework-provider-simple</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.test-framework.providers</groupId> + <artifactId>jersey-test-framework-provider-jetty</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.test-framework</groupId> + <artifactId>jersey-test-framework-util</artifactId> + </dependency> + + </dependencies> + + <properties> + <maven.test.skip>true</maven.test.skip> <!-- do not run any tests here, it's useless, + dependencies clash is being tested even before compilation. --> + </properties> +</project> \ No newline at end of file
diff --git a/tests/integration/jersey-5087/src/main/java/org/glassfish/jersey/tests/integration/jersey5087/Jersey5087.java b/tests/integration/jersey-5087/src/main/java/org/glassfish/jersey/tests/integration/jersey5087/Jersey5087.java new file mode 100644 index 0000000..05f4d67 --- /dev/null +++ b/tests/integration/jersey-5087/src/main/java/org/glassfish/jersey/tests/integration/jersey5087/Jersey5087.java
@@ -0,0 +1,26 @@ +/* + * 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.tests.integration.jersey5087; + +import org.glassfish.jersey.server.ResourceConfig; + +public class Jersey5087 extends ResourceConfig { + + public Jersey5087() { + register(Resource5087.class); + } +}
diff --git a/tests/integration/jersey-5087/src/main/java/org/glassfish/jersey/tests/integration/jersey5087/Resource5087.java b/tests/integration/jersey-5087/src/main/java/org/glassfish/jersey/tests/integration/jersey5087/Resource5087.java new file mode 100644 index 0000000..ce32dc3 --- /dev/null +++ b/tests/integration/jersey-5087/src/main/java/org/glassfish/jersey/tests/integration/jersey5087/Resource5087.java
@@ -0,0 +1,30 @@ +/* + * 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.tests.integration.jersey5087; + +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; + +@Path("/") +public class Resource5087 { + + @GET + public String getResource() { + return "OK"; + } + +}
diff --git a/tests/integration/jersey-5087/src/test/java/org/glassfish/jersey/tests/integration/jersey5087/Jersey5087Test.java b/tests/integration/jersey-5087/src/test/java/org/glassfish/jersey/tests/integration/jersey5087/Jersey5087Test.java new file mode 100644 index 0000000..8c1b3be --- /dev/null +++ b/tests/integration/jersey-5087/src/test/java/org/glassfish/jersey/tests/integration/jersey5087/Jersey5087Test.java
@@ -0,0 +1,53 @@ +/* + * 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.tests.integration.jersey5087; + +import org.glassfish.jersey.server.ResourceConfig; +import org.glassfish.jersey.server.ServerProperties; +import org.glassfish.jersey.test.DeploymentContext; +import org.glassfish.jersey.test.JerseyTest; +import org.glassfish.jersey.test.ServletDeploymentContext; +import org.glassfish.jersey.test.grizzly.GrizzlyWebTestContainerFactory; +import org.glassfish.jersey.test.spi.TestContainerFactory; +import org.junit.Assert; +import org.junit.Test; + +import java.util.EnumSet; + +public class Jersey5087Test extends JerseyTest { + + @Override + protected ResourceConfig configure() { + return new Jersey5087(); + } + + @Override + protected TestContainerFactory getTestContainerFactory() { + return new GrizzlyWebTestContainerFactory(); + } + + @Override + protected DeploymentContext configureDeployment() { + return ServletDeploymentContext.newInstance(Jersey5087.class); + } + + @Test + public void testDependenciesClash() { + final String response = target().request().get(String.class); + Assert.assertEquals("OK", response); + } +}
diff --git a/tests/integration/pom.xml b/tests/integration/pom.xml index 6406f8d..1d5f1b6 100644 --- a/tests/integration/pom.xml +++ b/tests/integration/pom.xml
@@ -59,6 +59,7 @@ <module>jersey-4722</module> <module>microprofile</module> <module>reactive-streams</module> + <module>jersey-5087</module> </modules> <profiles>