JPMS build with tests Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
diff --git a/connectors/apache-connector/src/test/java/module-info.java b/connectors/apache-connector/src/test/java/module-info.java new file mode 100644 index 0000000..94ff46c --- /dev/null +++ b/connectors/apache-connector/src/test/java/module-info.java
@@ -0,0 +1,40 @@ +/* + * Copyright (c) 2023 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 + */ + +module org.glassfish.jersey.apache.connector { + requires java.logging; + + requires jakarta.inject; + requires jakarta.ws.rs; + + requires org.apache.httpcomponents.httpcore; + requires org.apache.httpcomponents.httpclient; + + requires org.glassfish.hk2.locator; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.client; + requires org.glassfish.jersey.core.server; + + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.grizzly; + + requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; + + exports org.glassfish.jersey.apache.connector; + opens org.glassfish.jersey.apache.connector; +} \ No newline at end of file
diff --git a/connectors/grizzly-connector/pom.xml b/connectors/grizzly-connector/pom.xml index 670bd99..ca71bb9 100644 --- a/connectors/grizzly-connector/pom.xml +++ b/connectors/grizzly-connector/pom.xml
@@ -70,10 +70,16 @@ </dependency> <dependency> - <groupId>org.glassfish.jersey.test-framework.providers</groupId> - <artifactId>jersey-test-framework-provider-bundle</artifactId> + <groupId>org.glassfish.jersey.test-framework</groupId> + <artifactId>jersey-test-framework-core</artifactId> <version>${project.version}</version> - <type>pom</type> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.glassfish.jersey.test-framework.providers</groupId> + <artifactId>jersey-test-framework-provider-grizzly2</artifactId> + <version>${project.version}</version> <scope>test</scope> </dependency> </dependencies>
diff --git a/connectors/grizzly-connector/src/test/java/module-info.java b/connectors/grizzly-connector/src/test/java/module-info.java new file mode 100644 index 0000000..ffe27be --- /dev/null +++ b/connectors/grizzly-connector/src/test/java/module-info.java
@@ -0,0 +1,41 @@ +/* + * Copyright (c) 2023 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 + */ + +module org.glassfish.jersey.grizzly.connector { + requires java.logging; + requires org.slf4j; + + requires jakarta.ws.rs; + + requires grizzly.framework; + requires grizzly.http.client; + +// requires grizzly.http.server; + requires grizzly.http; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.client; + requires org.glassfish.jersey.core.server; + + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.grizzly; + + requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; + + exports org.glassfish.jersey.grizzly.connector; + opens org.glassfish.jersey.grizzly.connector; +} \ No newline at end of file
diff --git a/connectors/jdk-connector/src/test/java/module-info.java b/connectors/jdk-connector/src/test/java/module-info.java new file mode 100644 index 0000000..31a6867 --- /dev/null +++ b/connectors/jdk-connector/src/test/java/module-info.java
@@ -0,0 +1,37 @@ +/* + * Copyright (c) 2023 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 + */ + +module org.glassfish.jersey.jdk.connector { + requires java.logging; + + requires jakarta.ws.rs; + requires static jakarta.activation; + + requires osgi.resource.locator; + + requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; + + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.grizzly; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.client; + requires org.glassfish.jersey.core.server; + + exports org.glassfish.jersey.jdk.connector; + exports org.glassfish.jersey.jdk.connector.internal; +} \ No newline at end of file
diff --git a/connectors/jetty-connector/pom.xml b/connectors/jetty-connector/pom.xml index f55209a..a9db82e 100644 --- a/connectors/jetty-connector/pom.xml +++ b/connectors/jetty-connector/pom.xml
@@ -38,6 +38,9 @@ <java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory> <java17.build.outputDirectory>${project.basedir}/target17</java17.build.outputDirectory> <java17.sourceDirectory>${project.basedir}/src/main/java17</java17.sourceDirectory> + <surefire.coverage.argline> + --add-modules=ALL-MODULE-PATH + </surefire.coverage.argline> </properties> <dependencies> @@ -68,12 +71,24 @@ <groupId>org.glassfish.jersey.media</groupId> <artifactId>jersey-media-json-jackson</artifactId> <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> + </exclusion> + </exclusions> <scope>test</scope> </dependency> <dependency> <groupId>org.glassfish.jersey.test-framework.providers</groupId> <artifactId>jersey-test-framework-provider-jetty</artifactId> <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> + </exclusion> + </exclusions> <scope>test</scope> </dependency> <dependency> @@ -86,6 +101,12 @@ <artifactId>jaxb-osgi</artifactId> <scope>test</scope> </dependency> + <dependency> + <groupId>org.eclipse.jetty.toolchain</groupId> + <artifactId>jetty-jakarta-servlet-api</artifactId> + <version>${jetty.servlet.api.version}</version> + <scope>provided</scope> + </dependency> </dependencies> <build>
diff --git a/containers/jetty-http/src/main/java/module-info.txt b/connectors/jetty-connector/src/test/java/module-info.java similarity index 63% copy from containers/jetty-http/src/main/java/module-info.txt copy to connectors/jetty-connector/src/test/java/module-info.java index 577ae4c..bb9eb02 100644 --- a/containers/jetty-http/src/main/java/module-info.txt +++ b/connectors/jetty-connector/src/test/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 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,21 +14,30 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.container.jetty.http { +module org.glassfish.jersey.jetty.connector { requires java.logging; - requires jakarta.ws.rs; requires jakarta.inject; - requires jakarta.servlet; - requires static jakarta.xml.bind; + requires jakarta.ws.rs; - requires org.eclipse.jetty.http; + requires org.eclipse.jetty.client; requires org.eclipse.jetty.server; + requires org.eclipse.jetty.http; + requires org.eclipse.jetty.io; requires org.eclipse.jetty.util; + requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; + requires org.hamcrest; + + requires jakarta.xml.bind; + + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.client; requires org.glassfish.jersey.core.server; - exports org.glassfish.jersey.jetty; - opens org.glassfish.jersey.jetty; + exports org.glassfish.jersey.jetty.connector; + opens org.glassfish.jersey.jetty.connector; } \ No newline at end of file
diff --git a/containers/grizzly2-http/src/test/java/module-info.java b/containers/grizzly2-http/src/test/java/module-info.java index 9e52f01..8512428 100644 --- a/containers/grizzly2-http/src/test/java/module-info.java +++ b/containers/grizzly2-http/src/test/java/module-info.java
@@ -30,6 +30,7 @@ requires org.eclipse.jetty.client; requires org.hamcrest; requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; requires grizzly.http.server; requires grizzly.http2;
diff --git a/containers/jersey-servlet-core/src/main/java/module-info.java b/containers/jersey-servlet-core/src/main/java/module-info.java index 04adfac..fcf91bb 100644 --- a/containers/jersey-servlet-core/src/main/java/module-info.java +++ b/containers/jersey-servlet-core/src/main/java/module-info.java
@@ -21,7 +21,7 @@ requires jakarta.ws.rs; requires jakarta.inject; requires static jakarta.persistence; - requires jakarta.servlet; + requires static jakarta.servlet; requires osgi.resource.locator;
diff --git a/containers/jetty-http/pom.xml b/containers/jetty-http/pom.xml index a8c1a77..038a4a9 100644 --- a/containers/jetty-http/pom.xml +++ b/containers/jetty-http/pom.xml
@@ -79,6 +79,12 @@ </exclusions> </dependency> <dependency> + <groupId>org.eclipse.jetty.toolchain</groupId> + <artifactId>jetty-jakarta-servlet-api</artifactId> + <version>${jetty.servlet.api.version}</version> + <scope>provided</scope> + </dependency> + <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <scope>test</scope>
diff --git a/containers/jetty-http/src/main/java/module-info.txt b/containers/jetty-http/src/main/java/module-info.java similarity index 87% rename from containers/jetty-http/src/main/java/module-info.txt rename to containers/jetty-http/src/main/java/module-info.java index 577ae4c..b90f9e0 100644 --- a/containers/jetty-http/src/main/java/module-info.txt +++ b/containers/jetty-http/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023 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 @@ -19,8 +19,6 @@ requires jakarta.ws.rs; requires jakarta.inject; - requires jakarta.servlet; - requires static jakarta.xml.bind; requires org.eclipse.jetty.http; requires org.eclipse.jetty.server;
diff --git a/core-server/pom.xml b/core-server/pom.xml index 55d8565..dd77f46 100644 --- a/core-server/pom.xml +++ b/core-server/pom.xml
@@ -158,7 +158,7 @@ <reuseForks>true</reuseForks> <systemPropertiesFile>${project.basedir}/etc/systemPropertiesFile</systemPropertiesFile> <argLine> - --add-modules jakarta.xml.bind + ${surefire.coverage.argline} ${surefire.security.argline} </argLine> </configuration> @@ -245,7 +245,8 @@ <groupId>org.glassfish.jersey.inject</groupId> <artifactId>jersey-hk2</artifactId> <version>${project.version}</version> - <scope>test</scope> + <scope>provided</scope> + <optional>true</optional> </dependency> <dependency> @@ -305,6 +306,7 @@ <properties> <surefire.security.argline>-Djava.security.manager -Djava.security.policy=${project.build.directory}/test-classes/server.policy</surefire.security.argline> + <surefire.coverage.argline>--add-modules=ALL-MODULE-PATH</surefire.coverage.argline> </properties> </project>
diff --git a/core-server/src/main/java/module-info.java b/core-server/src/main/java/module-info.java index 73509d7..ea3159f 100644 --- a/core-server/src/main/java/module-info.java +++ b/core-server/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023 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,9 @@ requires jdk.httpserver; + requires static org.glassfish.jersey.inject.hk2; + requires static org.glassfish.hk2.api; + // jersey common modules requires org.glassfish.jersey.core.common; requires org.glassfish.jersey.core.client; @@ -50,9 +53,14 @@ exports org.glassfish.jersey.server.internal; exports org.glassfish.jersey.server.internal.inject; exports org.glassfish.jersey.server.internal.monitoring; + exports org.glassfish.jersey.server.internal.monitoring.jmx; exports org.glassfish.jersey.server.internal.process; + exports org.glassfish.jersey.server.internal.routing; exports org.glassfish.jersey.server.internal.scanning; -// exports org.glassfish.jersey.server.internal.sonar; + exports org.glassfish.jersey.server.internal.sonar; + + exports com.sun.research.ws.wadl; // to org.glassfish.jersey.core.server.test; + exports org.glassfish.jersey.server.internal.monitoring.core; uses org.glassfish.jersey.server.spi.ComponentProvider; uses org.glassfish.jersey.server.spi.ExternalRequestScope;
diff --git a/core-server/src/test/java/module-info.test b/core-server/src/test/java/module-info.test new file mode 100644 index 0000000..521f079 --- /dev/null +++ b/core-server/src/test/java/module-info.test
@@ -0,0 +1,64 @@ +/* + * Copyright (c) 2023 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 + */ + +module org.glassfish.jersey.core.server.test { + requires java.logging; + requires java.management; + + requires jdk.httpserver; + + requires jakarta.annotation; + requires jakarta.inject; + requires jakarta.validation; + requires jakarta.ws.rs; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.inject.hk2; + requires org.glassfish.jersey.core.client; + requires org.glassfish.hk2.api; + requires org.glassfish.hk2.locator; + requires org.glassfish.hk2.utilities; + + requires org.glassfish.jersey.core.server; + + requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; + requires org.junit.jupiter.params; + requires org.assertj.core; + requires org.hamcrest; + requires jakarta.xml.bind; + requires com.sun.xml.bind.osgi; + + requires jboss.vfs; + + opens org.glassfish.jersey.server.model to org.eclipse.persistence.core; + /*exports org.glassfish.jersey.server to org.junit.platform.commons; + exports org.glassfish.jersey.server.filter to org.junit.platform.commons; + exports org.glassfish.jersey.server.model to org.junit.platform.commons; + exports org.glassfish.jersey.server.model.internal to org.junit.platform.commons; + exports org.glassfish.jersey.server.monitoring to org.junit.platform.commons; + exports org.glassfish.jersey.server.spi to org.junit.platform.commons; + exports org.glassfish.jersey.server.internal to org.junit.platform.commons; + exports org.glassfish.jersey.server.internal.process to org.junit.platform.commons; + exports org.glassfish.jersey.server.internal.monitoring to org.junit.platform.commons; + exports org.glassfish.jersey.server.internal.inject to org.junit.platform.commons; + exports org.glassfish.jersey.server.internal.routing to org.junit.platform.commons; + exports org.glassfish.jersey.server.internal.scanning to org.junit.platform.commons; + exports org.glassfish.jersey.server.internal.sonar to org.junit.platform.commons; + exports org.glassfish.jersey.server.wadl.generators.resourcedoc to org.junit.platform.commons; + exports org.glassfish.jersey.server.wadl.config to org.junit.platform.commons;*/ + +} \ No newline at end of file
diff --git a/examples/http-patch/pom.xml b/examples/http-patch/pom.xml index 829748b..9215a6d 100644 --- a/examples/http-patch/pom.xml +++ b/examples/http-patch/pom.xml
@@ -61,6 +61,12 @@ <groupId>org.glassfish.jersey.media</groupId> <artifactId>jersey-media-moxy</artifactId> <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>org.eclipse.angus</groupId> + <artifactId>angus-activation</artifactId> + </exclusion> + </exclusions> </dependency> <dependency>
diff --git a/examples/json-moxy/pom.xml b/examples/json-moxy/pom.xml index 42c0c0a..79a9230 100644 --- a/examples/json-moxy/pom.xml +++ b/examples/json-moxy/pom.xml
@@ -38,6 +38,12 @@ <dependency> <groupId>org.glassfish.jersey.media</groupId> <artifactId>jersey-media-moxy</artifactId> + <exclusions> + <exclusion> + <groupId>org.eclipse.angus</groupId> + <artifactId>angus-activation</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.glassfish.jersey.media</groupId>
diff --git a/examples/xml-moxy/pom.xml b/examples/xml-moxy/pom.xml index 3b2d040..a49a566 100644 --- a/examples/xml-moxy/pom.xml +++ b/examples/xml-moxy/pom.xml
@@ -39,6 +39,12 @@ <dependency> <groupId>org.glassfish.jersey.media</groupId> <artifactId>jersey-media-moxy</artifactId> + <exclusions> + <exclusion> + <groupId>org.eclipse.angus</groupId> + <artifactId>angus-activation</artifactId> + </exclusion> + </exclusions> </dependency> <dependency>
diff --git a/ext/microprofile/mp-config/pom.xml b/ext/microprofile/mp-config/pom.xml index 7e7aa30..89d2da3 100644 --- a/ext/microprofile/mp-config/pom.xml +++ b/ext/microprofile/mp-config/pom.xml
@@ -29,6 +29,10 @@ <artifactId>jersey-mp-config</artifactId> + <properties> + <surefire.coverage.argline>--add-modules=ALL-MODULE-PATH</surefire.coverage.argline> + </properties> + <dependencies> <dependency> @@ -49,6 +53,14 @@ </dependency> <dependency> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-server</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + <optional>true</optional> + </dependency> + + <dependency> <groupId>org.glassfish.jersey.inject</groupId> <artifactId>jersey-hk2</artifactId> <version>${project.version}</version>
diff --git a/ext/microprofile/mp-config/src/main/java/module-info.java b/ext/microprofile/mp-config/src/main/java/module-info.java index 077fe87..3019dc4 100644 --- a/ext/microprofile/mp-config/src/main/java/module-info.java +++ b/ext/microprofile/mp-config/src/main/java/module-info.java
@@ -19,6 +19,7 @@ requires microprofile.config.api; requires org.glassfish.jersey.core.common; + requires static org.glassfish.jersey.core.server; exports org.glassfish.jersey.microprofile.config; } \ No newline at end of file
diff --git a/containers/jetty-http/src/main/java/module-info.txt b/ext/microprofile/mp-config/src/test/java/module-info.test similarity index 65% copy from containers/jetty-http/src/main/java/module-info.txt copy to ext/microprofile/mp-config/src/test/java/module-info.test index 577ae4c..ddeb8cf 100644 --- a/containers/jetty-http/src/main/java/module-info.txt +++ b/ext/microprofile/mp-config/src/test/java/module-info.test
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 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,21 +14,20 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.container.jetty.http { - requires java.logging; - - requires jakarta.ws.rs; +module org.glassfish.jersey.ext.mp.config { requires jakarta.inject; - requires jakarta.servlet; - requires static jakarta.xml.bind; + requires jakarta.ws.rs; + requires microprofile.config.api; - requires org.eclipse.jetty.http; - requires org.eclipse.jetty.server; - requires org.eclipse.jetty.util; + requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; + requires org.glassfish.jersey.tests.framework.core; + + requires jetty.servlet.api; + requires smallrye.config; requires org.glassfish.jersey.core.common; requires org.glassfish.jersey.core.server; - exports org.glassfish.jersey.jetty; - opens org.glassfish.jersey.jetty; + exports org.glassfish.jersey.microprofile.config; } \ No newline at end of file
diff --git a/ext/microprofile/mp-config/src/test/java/org/glassfish/jersey/microprofile/config/ExternalPropertiesConfigurationFactoryTest.java b/ext/microprofile/mp-config/src/test/java/org/glassfish/jersey/microprofile/config/ExternalPropertiesConfigurationFactoryTest.java index 58f7bd7..3bd818a 100644 --- a/ext/microprofile/mp-config/src/test/java/org/glassfish/jersey/microprofile/config/ExternalPropertiesConfigurationFactoryTest.java +++ b/ext/microprofile/mp-config/src/test/java/org/glassfish/jersey/microprofile/config/ExternalPropertiesConfigurationFactoryTest.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2023 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 @@ -82,23 +82,23 @@ @Test public void readConfigTest() { - final Boolean responce = target("getPropertyValue/{key}") + final Boolean response = target("getPropertyValue/{key}") .resolveTemplate("key", "jersey.config.disableMetainfServicesLookup").request().get(Boolean.class); - Assertions.assertEquals(Boolean.TRUE, responce); + Assertions.assertEquals(Boolean.TRUE, response); } @Test public void smallRyeConfigTest() { - final String responce = target("readProperty/{key}") + final String response = target("readProperty/{key}") .resolveTemplate("key", "jersey.config.disableAutoDiscovery").request().get(String.class); - Assertions.assertEquals("1", responce); + Assertions.assertEquals("1", response); } @Test public void defaultHeaderValueTest() { - final String responce = target("readProperty/{key}") + final String response = target("readProperty/{key}") .resolveTemplate("key", "jersey.config.disableJsonProcessing").request().get(String.class); - Assertions.assertEquals("true", responce); + Assertions.assertEquals("true", response); } } \ No newline at end of file
diff --git a/ext/proxy-client/pom.xml b/ext/proxy-client/pom.xml index b822028..1c7fe41 100644 --- a/ext/proxy-client/pom.xml +++ b/ext/proxy-client/pom.xml
@@ -32,6 +32,12 @@ Jersey extension module providing support for (proxy-based) high-level client API. </description> + <properties> + <surefire.coverage.argline> + --add-modules=ALL-MODULE-PATH + </surefire.coverage.argline> + </properties> + <build> <plugins> <plugin> @@ -61,10 +67,15 @@ <version>${project.version}</version> </dependency> <dependency> - <groupId>org.glassfish.jersey.test-framework.providers</groupId> - <artifactId>jersey-test-framework-provider-bundle</artifactId> + <groupId>org.glassfish.jersey.test-framework</groupId> + <artifactId>jersey-test-framework-core</artifactId> <version>${project.version}</version> - <type>pom</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.test-framework.providers</groupId> + <artifactId>jersey-test-framework-provider-grizzly2</artifactId> + <version>${project.version}</version> <scope>test</scope> </dependency> <dependency>
diff --git a/containers/jetty-http/src/main/java/module-info.txt b/ext/proxy-client/src/test/java/module-info.java similarity index 61% copy from containers/jetty-http/src/main/java/module-info.txt copy to ext/proxy-client/src/test/java/module-info.java index 577ae4c..d2ad176 100644 --- a/containers/jetty-http/src/main/java/module-info.txt +++ b/ext/proxy-client/src/test/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023 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,21 +14,21 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.container.jetty.http { - requires java.logging; +module org.glassfish.jersey.ext.proxy.client { + requires static java.desktop; requires jakarta.ws.rs; - requires jakarta.inject; - requires jakarta.servlet; - requires static jakarta.xml.bind; - - requires org.eclipse.jetty.http; - requires org.eclipse.jetty.server; - requires org.eclipse.jetty.util; + requires jakarta.xml.bind; requires org.glassfish.jersey.core.common; requires org.glassfish.jersey.core.server; - exports org.glassfish.jersey.jetty; - opens org.glassfish.jersey.jetty; + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.grizzly; + + requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; + + exports org.glassfish.jersey.client.proxy; + opens org.glassfish.jersey.client.proxy; } \ No newline at end of file
diff --git a/incubator/html-json/pom.xml b/incubator/html-json/pom.xml index d25e4cb..fe6b259 100644 --- a/incubator/html-json/pom.xml +++ b/incubator/html-json/pom.xml
@@ -39,8 +39,17 @@ </description> <properties> - <net.java.html.version>1.5.1</net.java.html.version> + <net.java.html.version>1.8.1</net.java.html.version> <enforcer.skip>true</enforcer.skip> + <surefire.coverage.argline> + --add-exports org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED + --add-exports org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED + --add-reads org.glassfish.jersey.incubator.html.json=org.glassfish.jersey.core.server + --add-reads org.glassfish.jersey.incubator.html.json=org.glassfish.jersey.tests.framework.core + --add-reads org.glassfish.jersey.incubator.html.json=org.glassfish.jersey.tests.framework.provider.grizzly + --add-reads org.glassfish.jersey.incubator.html.json=org.junit.jupiter.api + --add-modules=ALL-MODULE-PATH + </surefire.coverage.argline> </properties> <dependencies> @@ -56,7 +65,7 @@ <dependency> <groupId>org.netbeans.api</groupId> <artifactId>org-openide-util-lookup</artifactId> - <version>RELEASE110</version> + <version>RELEASE160</version> <scope>provided</scope> </dependency> <dependency> @@ -81,18 +90,17 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.glassfish.jersey.test-framework.providers</groupId> + <artifactId>jersey-test-framework-provider-grizzly2</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <!--<dependency> <groupId>org.glassfish.jersey.connectors</groupId> <artifactId>jersey-apache-connector</artifactId> <version>${project.version}</version> <scope>test</scope> - </dependency> - <dependency> - <groupId>org.glassfish.jersey.test-framework.providers</groupId> - <artifactId>jersey-test-framework-provider-bundle</artifactId> - <version>${project.version}</version> - <type>pom</type> - <scope>test</scope> - </dependency> + </dependency>--> <dependency> <groupId>org.netbeans.html</groupId> <artifactId>ko-ws-tyrus</artifactId>
diff --git a/incubator/html-json/src/main/java/module-info.java b/incubator/html-json/src/main/java/module-info.java index 3117cbf..6a2d033 100644 --- a/incubator/html-json/src/main/java/module-info.java +++ b/incubator/html-json/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023 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 @@ -19,7 +19,10 @@ requires jakarta.ws.rs; requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.client; exports org.glassfish.jersey.media.htmljson; + opens org.glassfish.jersey.media.htmljson; exports org.glassfish.jersey.media.htmljson.internal; + opens org.glassfish.jersey.media.htmljson.internal; } \ No newline at end of file
diff --git a/incubator/html-json/src/test/java/module-info.test b/incubator/html-json/src/test/java/module-info.test new file mode 100644 index 0000000..b722e67 --- /dev/null +++ b/incubator/html-json/src/test/java/module-info.test
@@ -0,0 +1,37 @@ +/* + * Copyright (c) 2023 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 + */ + +module org.glassfish.jersey.incubator.html.json { + requires jakarta.annotation; + requires jakarta.ws.rs; + + requires net.java.html; + requires net.java.html.json; + requires ko.ws.tyrus; + requires grizzly.framework; + requires org.openide.util.lookup.RELEASE160; + + requires org.junit.jupiter.api; + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.grizzly; + + requires org.glassfish.jersey.core.client; + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.server; + +// exports org.glassfish.jersey.media.htmljson; + opens org.glassfish.jersey.media.htmljson; +} \ No newline at end of file
diff --git a/incubator/kryo/pom.xml b/incubator/kryo/pom.xml index b7bf1a2..afd2c79 100644 --- a/incubator/kryo/pom.xml +++ b/incubator/kryo/pom.xml
@@ -34,6 +34,14 @@ Jersey/JAX-RS Message Body Writer and Reader using Kryo serialization framework </description> + <properties> + <surefire.coverage.argline> + --add-reads org.glassfish.jersey.incubator.media.kryo=org.glassfish.jersey.core.server + --add-reads org.glassfish.jersey.incubator.media.kryo=org.glassfish.jersey.core.client + --add-modules=ALL-MODULE-PATH + </surefire.coverage.argline> + </properties> + <dependencies> <dependency> <groupId>jakarta.ws.rs</groupId> @@ -103,7 +111,7 @@ <!-- compile everything to ensure module-info contains right entries --> <release>11</release> <compilerArgs> - <arg>--add-reads</arg> + <arg>--add-opens</arg> <arg>org.glassfish.jersey.incubator.media.kryo=ALL-UNNAMED</arg> <arg>-Xdiags:verbose</arg> </compilerArgs>
diff --git a/incubator/kryo/src/main/java/module-info.java b/incubator/kryo/src/main/java/module-info.java index 36fcac8..b342a473d 100644 --- a/incubator/kryo/src/main/java/module-info.java +++ b/incubator/kryo/src/main/java/module-info.java
@@ -24,4 +24,6 @@ exports org.glassfish.jersey.kryo; exports org.glassfish.jersey.kryo.internal; + opens org.glassfish.jersey.kryo; + opens org.glassfish.jersey.kryo.internal; } \ No newline at end of file
diff --git a/incubator/kryo/src/test/java/module-info.test b/incubator/kryo/src/test/java/module-info.test new file mode 100644 index 0000000..2303a42 --- /dev/null +++ b/incubator/kryo/src/test/java/module-info.test
@@ -0,0 +1,36 @@ +/* + * Copyright (c) 2023 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 + */ + +module org.glassfish.jersey.incubator.media.kryo { + requires jakarta.annotation; + requires jakarta.ws.rs; + + requires kryo; + requires org.objectweb.asm; + + requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.grizzly; + + + requires org.glassfish.jersey.core.client; + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.server; + + exports org.glassfish.jersey.kryo; + exports org.glassfish.jersey.kryo.internal; +} \ No newline at end of file
diff --git a/incubator/kryo/src/test/java/org/glassfish/jersey/kryo/PersonResourceTest.java b/incubator/kryo/src/test/java/org/glassfish/jersey/kryo/internal/PersonResourceTest.java similarity index 81% rename from incubator/kryo/src/test/java/org/glassfish/jersey/kryo/PersonResourceTest.java rename to incubator/kryo/src/test/java/org/glassfish/jersey/kryo/internal/PersonResourceTest.java index de0e76a..7179371 100644 --- a/incubator/kryo/src/test/java/org/glassfish/jersey/kryo/PersonResourceTest.java +++ b/incubator/kryo/src/test/java/org/glassfish/jersey/kryo/internal/PersonResourceTest.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023 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,20 +14,17 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.kryo; +package org.glassfish.jersey.kryo.internal; -import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.Application; -import jakarta.ws.rs.core.Response; import org.glassfish.jersey.client.ClientConfig; +import org.glassfish.jersey.kryo.KryoContextResolver; +import org.glassfish.jersey.kryo.PersonResource; +import org.glassfish.jersey.kryo.PersonResourceBaseTest; import org.glassfish.jersey.server.ResourceConfig; -import org.glassfish.jersey.test.JerseyTest; import org.glassfish.jersey.test.TestProperties; -import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.assertEquals; - /** * Test for kryo resource. *
diff --git a/inject/cdi2-se/pom.xml b/inject/cdi2-se/pom.xml index 44d5eed..ee4db9d 100644 --- a/inject/cdi2-se/pom.xml +++ b/inject/cdi2-se/pom.xml
@@ -32,6 +32,10 @@ <description>CDI 4 SE InjectionManager implementation</description> + <properties> + <surefire.coverage.argline>--add-modules=ALL-MODULE-PATH</surefire.coverage.argline> + </properties> + <dependencies> <dependency> <groupId>org.glassfish.jersey.core</groupId>
diff --git a/media/json-processing/pom.xml b/media/json-processing/pom.xml index 8a09425..045eef8 100644 --- a/media/json-processing/pom.xml +++ b/media/json-processing/pom.xml
@@ -112,6 +112,6 @@ </dependency> </dependencies> <properties> - <surefire.coverage.argline>--add-opens org.eclipse.parsson.media/org.eclipse.parsson.media=ALL-UNNAMED</surefire.coverage.argline> + <surefire.coverage.argline>--add-modules=ALL-MODULE-PATH</surefire.coverage.argline> </properties> </project>
diff --git a/containers/jetty-http/src/main/java/module-info.txt b/media/json-processing/src/test/java/module-info.java similarity index 68% copy from containers/jetty-http/src/main/java/module-info.txt copy to media/json-processing/src/test/java/module-info.java index 577ae4c..67f5b5d 100644 --- a/containers/jetty-http/src/main/java/module-info.txt +++ b/media/json-processing/src/test/java/module-info.java
@@ -14,21 +14,19 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.container.jetty.http { - requires java.logging; - +open module org.glassfish.jersey.media.json.processing.test { + requires jakarta.annotation; requires jakarta.ws.rs; - requires jakarta.inject; - requires jakarta.servlet; - requires static jakarta.xml.bind; - requires org.eclipse.jetty.http; - requires org.eclipse.jetty.server; - requires org.eclipse.jetty.util; + requires org.eclipse.parsson.media; + requires org.junit.jupiter.api; + + requires org.glassfish.jersey.media.json.processing; + + requires org.glassfish.jersey.core.client; requires org.glassfish.jersey.core.common; requires org.glassfish.jersey.core.server; - exports org.glassfish.jersey.jetty; - opens org.glassfish.jersey.jetty; + exports org.glassfish.jersey.jsonp.test; } \ No newline at end of file
diff --git a/media/json-processing/src/test/java/org/glassfish/jersey/jsonp/JsonProcessingAutoDiscoverableClientTest.java b/media/json-processing/src/test/java/org/glassfish/jersey/jsonp/test/JsonProcessingAutoDiscoverableClientTest.java similarity index 97% rename from media/json-processing/src/test/java/org/glassfish/jersey/jsonp/JsonProcessingAutoDiscoverableClientTest.java rename to media/json-processing/src/test/java/org/glassfish/jersey/jsonp/test/JsonProcessingAutoDiscoverableClientTest.java index 2b57034..76177b9 100644 --- a/media/json-processing/src/test/java/org/glassfish/jersey/jsonp/JsonProcessingAutoDiscoverableClientTest.java +++ b/media/json-processing/src/test/java/org/glassfish/jersey/jsonp/test/JsonProcessingAutoDiscoverableClientTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.jsonp; +package org.glassfish.jersey.jsonp.test; import java.io.IOException; @@ -29,6 +29,7 @@ import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.ClientProperties; +import org.glassfish.jersey.jsonp.JsonProcessingFeature; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals;
diff --git a/media/json-processing/src/test/java/org/glassfish/jersey/jsonp/JsonProcessingAutoDiscoverableServerTest.java b/media/json-processing/src/test/java/org/glassfish/jersey/jsonp/test/JsonProcessingAutoDiscoverableServerTest.java similarity index 97% rename from media/json-processing/src/test/java/org/glassfish/jersey/jsonp/JsonProcessingAutoDiscoverableServerTest.java rename to media/json-processing/src/test/java/org/glassfish/jersey/jsonp/test/JsonProcessingAutoDiscoverableServerTest.java index 1fad557..64887a6 100644 --- a/media/json-processing/src/test/java/org/glassfish/jersey/jsonp/JsonProcessingAutoDiscoverableServerTest.java +++ b/media/json-processing/src/test/java/org/glassfish/jersey/jsonp/test/JsonProcessingAutoDiscoverableServerTest.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.jsonp; +package org.glassfish.jersey.jsonp.test; import java.io.IOException; import java.net.URI; @@ -30,6 +30,7 @@ import org.glassfish.jersey.CommonProperties; import org.glassfish.jersey.internal.MapPropertiesDelegate; +import org.glassfish.jersey.jsonp.JsonProcessingFeature; import org.glassfish.jersey.server.ApplicationHandler; import org.glassfish.jersey.server.ContainerRequest; import org.glassfish.jersey.server.ResourceConfig;
diff --git a/media/moxy/src/main/java/module-info.java b/media/moxy/src/main/java/module-info.java index a17a256..22e8b2f 100644 --- a/media/moxy/src/main/java/module-info.java +++ b/media/moxy/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023 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,4 +31,7 @@ exports org.glassfish.jersey.moxy.xml; exports org.glassfish.jersey.moxy.json; + exports org.glassfish.jersey.moxy.json.internal; + + opens org.glassfish.jersey.moxy.json.internal; } \ No newline at end of file
diff --git a/media/multipart/pom.xml b/media/multipart/pom.xml index 4daf9e7..7bc8866 100644 --- a/media/multipart/pom.xml +++ b/media/multipart/pom.xml
@@ -34,6 +34,13 @@ Jersey Multipart entity providers support module. </description> + <properties> + <surefire.coverage.argline> + --add-exports org.glassfish.jersey.core.client/org.glassfish.jersey.client.innate=ALL-UNNAMED + --add-modules=ALL-MODULE-PATH + </surefire.coverage.argline> + </properties> + <build> <plugins> <plugin>
diff --git a/test-framework/core/src/main/java/module-info.java b/test-framework/core/src/main/java/module-info.java index 6a8a788..5db5966 100644 --- a/test-framework/core/src/main/java/module-info.java +++ b/test-framework/core/src/main/java/module-info.java
@@ -17,7 +17,7 @@ module org.glassfish.jersey.tests.framework.core { requires jakarta.ws.rs; requires jakarta.xml.bind; - requires jakarta.servlet; + requires static jakarta.servlet; requires static jakarta.persistence; requires java.logging;
diff --git a/test-framework/providers/grizzly2/src/test/java/module-info.java b/test-framework/providers/grizzly2/src/test/java/module-info.java index 6248941..93cb667 100644 --- a/test-framework/providers/grizzly2/src/test/java/module-info.java +++ b/test-framework/providers/grizzly2/src/test/java/module-info.java
@@ -39,5 +39,6 @@ opens org.glassfish.jersey.test.grizzly.web; requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; requires org.hamcrest; } \ No newline at end of file
diff --git a/tests/integration/async-jersey-filter/src/test/java/module-info.java b/tests/integration/async-jersey-filter/src/test/java/module-info.java index ef7c5fe..cd60c38 100644 --- a/tests/integration/async-jersey-filter/src/test/java/module-info.java +++ b/tests/integration/async-jersey-filter/src/test/java/module-info.java
@@ -28,6 +28,7 @@ requires org.glassfish.jersey.tests.framework.provider.external; requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; exports org.glassfish.jersey.tests.integration.async; exports org.glassfish.jersey.tests.integration.jersey2730;
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml index d2cf773..02416df 100644 --- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml
@@ -76,6 +76,18 @@ <scope>provided</scope> </dependency> <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>${slf4j.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.jboss.logging</groupId> + <artifactId>jboss-logging</artifactId> + <version>${jboss.logging.version}</version> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.glassfish.jersey.ext.cdi</groupId> <artifactId>jersey-cdi1x</artifactId> <version>${project.version}</version> @@ -144,6 +156,7 @@ --add-reads jakarta.validation=weld.api --add-reads jakarta.validation=weld.core.impl --add-opens jakarta.validation/jakarta.validation=weld.core.impl + --add-reads org.jboss.logging=java.logging --add-modules=ALL-MODULE-PATH </surefire.coverage.argline> </properties>
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/module-info.java index d37e2cf..33cf646 100644 --- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/module-info.java
@@ -21,7 +21,10 @@ requires jakarta.ws.rs; requires weld.se.core; + requires weld.core.impl; requires grizzly.http.server; + requires org.hibernate.validator; + requires org.hibernate.validator.cdi; requires org.glassfish.jersey.core.common; requires org.glassfish.jersey.core.client;
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 40efd44..9c53534 100644 --- a/tests/integration/cdi-integration/cdi-client-on-server/pom.xml +++ b/tests/integration/cdi-integration/cdi-client-on-server/pom.xml
@@ -31,6 +31,10 @@ <description>CDI works on a client on a server resource</description> + <properties> + <surefire.coverage.argline>--add-reads org.jboss.logging=java.logging --add-modules=ALL-MODULE-PATH</surefire.coverage.argline> + </properties> + <dependencies> <dependency> <groupId>jakarta.ws.rs</groupId>
diff --git a/tests/integration/cdi-integration/cdi-client-on-server/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-client-on-server/src/test/java/module-info.java index 923dd31..cf45446 100644 --- a/tests/integration/cdi-integration/cdi-client-on-server/src/test/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-client-on-server/src/test/java/module-info.java
@@ -34,4 +34,5 @@ requires org.junit.jupiter.engine; exports org.glassfish.jersey.tests.cdi.client; + opens org.glassfish.jersey.tests.cdi.client; } \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-client/pom.xml b/tests/integration/cdi-integration/cdi-client/pom.xml index 2559d43..5dcb1c7 100644 --- a/tests/integration/cdi-integration/cdi-client/pom.xml +++ b/tests/integration/cdi-integration/cdi-client/pom.xml
@@ -49,6 +49,19 @@ <dependency> <groupId>org.jboss.weld.se</groupId> <artifactId>weld-se-core</artifactId> + <exclusions> + <exclusion> + <groupId>org.jboss.logging</groupId> + <artifactId>jboss-logging</artifactId> + </exclusion> + </exclusions> + <scope>provided</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.jboss.logging</groupId> + <artifactId>jboss-logging</artifactId> + <version>${jboss.logging.version}</version> <scope>test</scope> </dependency> <dependency> @@ -74,8 +87,14 @@ <artifactId>maven-surefire-plugin</artifactId> <configuration> <skipTests>${skip.tests}</skipTests> + </configuration> </plugin> </plugins> </build> + <properties> + <surefire.coverage.argline> + --add-reads org.jboss.logging=java.logging --add-modules=ALL-MODULE-PATH + </surefire.coverage.argline> + </properties> </project>
diff --git a/tests/integration/cdi-integration/cdi-client/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-client/src/main/java/module-info.java index 66e5708..3cc62bb 100644 --- a/tests/integration/cdi-integration/cdi-client/src/main/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-client/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023 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 @@ -19,6 +19,8 @@ requires jakarta.inject; requires jakarta.cdi; + requires static weld.core.impl; + opens org.glassfish.jersey.tests.cdi.client; exports org.glassfish.jersey.tests.cdi.client; } \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-log-check/pom.xml b/tests/integration/cdi-integration/cdi-log-check/pom.xml index b9fef66..44a90bd 100644 --- a/tests/integration/cdi-integration/cdi-log-check/pom.xml +++ b/tests/integration/cdi-integration/cdi-log-check/pom.xml
@@ -31,6 +31,10 @@ <description>Jersey CDI test web application</description> + <properties> + <surefire.coverage.argline>--add-reads org.jboss.logging=java.logging --add-modules=ALL-MODULE-PATH</surefire.coverage.argline> + </properties> + <dependencies> <dependency> <groupId>jakarta.ws.rs</groupId> @@ -81,7 +85,8 @@ <dependency> <groupId>org.jboss.weld.se</groupId> <artifactId>weld-se-core</artifactId> - <scope>test</scope> + <optional>true</optional> + <scope>provided</scope> </dependency> <dependency> <groupId>org.glassfish.jersey.ext.cdi</groupId>
diff --git a/tests/integration/cdi-integration/cdi-log-check/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-log-check/src/main/java/module-info.java index dfe7bdb..8faf3d6 100644 --- a/tests/integration/cdi-integration/cdi-log-check/src/main/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-log-check/src/main/java/module-info.java
@@ -22,8 +22,10 @@ requires jakarta.cdi; requires java.logging; + requires static weld.core.impl; requires org.glassfish.jersey.core.server; opens org.glassfish.jersey.tests.cdi.resources; + exports org.glassfish.jersey.tests.cdi.resources; } \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-log-check/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-log-check/src/test/java/module-info.java index 1dd6735..fad5add 100644 --- a/tests/integration/cdi-integration/cdi-log-check/src/test/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-log-check/src/test/java/module-info.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.tests.integration.cdi.log.check { +module org.glassfish.jersey.tests.integration.cdi.log.check.test { requires java.logging; requires jakarta.cdi; @@ -23,8 +23,11 @@ requires jakarta.ws.rs; requires weld.se.core; + requires weld.core.impl; requires org.jboss.logging; + requires org.glassfish.jersey.tests.integration.cdi.log.check; + requires org.glassfish.jersey.core.server; requires org.glassfish.jersey.inject.hk2; @@ -35,5 +38,6 @@ requires org.junit.jupiter.api; requires org.junit.jupiter.engine; - exports org.glassfish.jersey.tests.cdi.resources; + exports org.glassfish.jersey.tests.cdi.resources.test; + opens org.glassfish.jersey.tests.cdi.resources.test; } \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-log-check/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiComponentProviderWarningTest.java b/tests/integration/cdi-integration/cdi-log-check/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CdiComponentProviderWarningTest.java similarity index 91% rename from tests/integration/cdi-integration/cdi-log-check/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiComponentProviderWarningTest.java rename to tests/integration/cdi-integration/cdi-log-check/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CdiComponentProviderWarningTest.java index e2de3ea..964f420 100644 --- a/tests/integration/cdi-integration/cdi-log-check/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiComponentProviderWarningTest.java +++ b/tests/integration/cdi-integration/cdi-log-check/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CdiComponentProviderWarningTest.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2023 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,13 +14,15 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory; import org.glassfish.jersey.server.internal.LocalizationMessages; import org.glassfish.jersey.test.JerseyTest; import org.glassfish.jersey.test.TestProperties; import org.glassfish.jersey.test.external.ExternalTestContainerFactory; +import org.glassfish.jersey.tests.cdi.resources.EchoResource; +import org.glassfish.jersey.tests.cdi.resources.MyApplication; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; @@ -75,7 +77,7 @@ @Test public void testWarning() { String echo = target("echo").request().get(String.class); - assertEquals(echo, EchoResource.OK); + Assertions.assertEquals(echo, EchoResource.OK); String resource = target("warning").request().get(String.class); assertEquals(resource, EchoResource.class.getName());
diff --git a/tests/integration/cdi-integration/cdi-manually-bound/pom.xml b/tests/integration/cdi-integration/cdi-manually-bound/pom.xml index 8506b5b..740fbc5 100644 --- a/tests/integration/cdi-integration/cdi-manually-bound/pom.xml +++ b/tests/integration/cdi-integration/cdi-manually-bound/pom.xml
@@ -29,6 +29,10 @@ <artifactId>cdi-manually-bound</artifactId> + <properties> + <surefire.coverage.argline>--add-reads org.jboss.logging=java.logging --add-modules=ALL-MODULE-PATH</surefire.coverage.argline> + </properties> + <dependencies> <dependency> <groupId>jakarta.ws.rs</groupId> @@ -47,6 +51,11 @@ <artifactId>jersey-cdi1x</artifactId> </dependency> <dependency> + <groupId>org.jboss.weld</groupId> + <artifactId>weld-core-impl</artifactId> + <version>${weld.version}</version> + </dependency> + <dependency> <groupId>org.glassfish.jersey.core</groupId> <artifactId>jersey-server</artifactId> <scope>provided</scope>
diff --git a/tests/integration/cdi-integration/cdi-manually-bound/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-manually-bound/src/main/java/module-info.java index bffb7bb..0c44271 100644 --- a/tests/integration/cdi-integration/cdi-manually-bound/src/main/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-manually-bound/src/main/java/module-info.java
@@ -20,6 +20,8 @@ requires jakarta.cdi; requires jakarta.xml.bind; + requires weld.core.impl; + requires org.glassfish.jersey.core.common; requires org.glassfish.jersey.core.server; requires org.glassfish.jersey.inject.hk2;
diff --git a/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/module-info.java index 15888ac..aeacc09 100644 --- a/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/module-info.java
@@ -19,6 +19,7 @@ requires jakarta.ws.rs; requires weld.se.core; + requires org.jboss.logging; requires org.glassfish.jersey.core.common; requires org.glassfish.jersey.core.server; @@ -30,6 +31,7 @@ requires org.glassfish.jersey.tests.integration.cdi.manually.bound; requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; requires org.glassfish.jersey.tests.framework.core; requires org.glassfish.jersey.tests.framework.provider.external;
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 771d261..ee4053a 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
@@ -32,6 +32,10 @@ <description>CDI works for a resource class with constructor with @Context</description> + <properties> + <surefire.coverage.argline>--add-reads org.jboss.logging=java.logging --add-modules=ALL-MODULE-PATH</surefire.coverage.argline> + </properties> + <dependencies> <dependency> <groupId>jakarta.ws.rs</groupId>
diff --git a/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/module-info.java index 05cd81d..b8a87a8 100644 --- a/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/module-info.java
@@ -28,6 +28,8 @@ requires weld.se.core; requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; + requires org.glassfish.jersey.tests.framework.core; requires org.glassfish.jersey.tests.integration.cdi.resource.context; requires org.glassfish.jersey.tests.framework.provider.grizzly;
diff --git a/tests/integration/cdi-integration/cdi-singleton/pom.xml b/tests/integration/cdi-integration/cdi-singleton/pom.xml index 369623a..4effcbc 100644 --- a/tests/integration/cdi-integration/cdi-singleton/pom.xml +++ b/tests/integration/cdi-integration/cdi-singleton/pom.xml
@@ -29,6 +29,10 @@ <artifactId>cdi-singleton</artifactId> + <properties> + <surefire.coverage.argline>--add-reads org.jboss.logging=java.logging --add-modules=ALL-MODULE-PATH</surefire.coverage.argline> + </properties> + <dependencies> <dependency> <groupId>jakarta.ws.rs</groupId>
diff --git a/tests/integration/cdi-integration/cdi-singleton/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-singleton/src/test/java/module-info.java index 7cbffac..ad833a5 100644 --- a/tests/integration/cdi-integration/cdi-singleton/src/test/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-singleton/src/test/java/module-info.java
@@ -29,6 +29,7 @@ requires org.glassfish.jersey.tests.framework.provider.external; requires org.glassfish.jersey.tests.framework.provider.grizzly; requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; exports org.glassfish.jersey.tests.cdi.singleton.test; } \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/pom.xml b/tests/integration/cdi-integration/cdi-test-webapp/pom.xml index 294793c..37d1925 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/pom.xml +++ b/tests/integration/cdi-integration/cdi-test-webapp/pom.xml
@@ -31,6 +31,10 @@ <description>Jersey CDI test web application</description> + <properties> + <surefire.coverage.argline>--add-reads org.jboss.logging=java.logging --add-modules=ALL-MODULE-PATH</surefire.coverage.argline> + </properties> + <dependencies> <dependency> <groupId>jakarta.ws.rs</groupId> @@ -75,7 +79,8 @@ <dependency> <groupId>org.jboss.weld.se</groupId> <artifactId>weld-se-core</artifactId> - <scope>test</scope> + <optional>true</optional> + <scope>provided</scope> </dependency> </dependencies>
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/module-info.java index a2316ed..f82a4b7 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/module-info.java
@@ -21,6 +21,7 @@ requires jakarta.cdi; requires java.logging; + requires static weld.api; opens org.glassfish.jersey.tests.cdi.resources; exports org.glassfish.jersey.tests.cdi.resources;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/module-info.java index fe0fc38..a7bb3d5 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/module-info.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.tests.integration.cdi.test.webapp { +module org.glassfish.jersey.tests.integration.cdi.test.webapp.test { requires java.logging; requires jakarta.annotation; @@ -25,6 +25,8 @@ requires weld.se.core; requires org.hamcrest; + requires org.glassfish.jersey.tests.integration.cdi.test.webapp; + requires org.glassfish.jersey.core.server; requires org.glassfish.jersey.inject.hk2; requires org.glassfish.jersey.ext.weld2.se; @@ -37,7 +39,10 @@ requires org.glassfish.jersey.tests.framework.provider.grizzly; requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; requires org.junit.jupiter.params; exports org.glassfish.jersey.tests.cdi.resources.test; + + opens org.glassfish.jersey.tests.cdi.resources.test; } \ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiComponentProviderTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CdiComponentProviderTest.java similarity index 94% rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiComponentProviderTest.java rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CdiComponentProviderTest.java index 8fdd9be..aeca5d6 100644 --- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiComponentProviderTest.java +++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CdiComponentProviderTest.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023 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.tests.cdi.resources; +package org.glassfish.jersey.tests.cdi.resources.test; import org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider; import org.glassfish.jersey.server.ResourceConfig;
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 850045f..54976a8 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/pom.xml +++ b/tests/integration/cdi-integration/context-inject-on-server/pom.xml
@@ -58,7 +58,8 @@ <dependency> <groupId>org.jboss.weld.se</groupId> <artifactId>weld-se-core</artifactId> - <scope>test</scope> + <scope>provided</scope> + <optional>true</optional> </dependency> <dependency> <groupId>org.glassfish.jersey.media</groupId> @@ -120,8 +121,6 @@ </profile> </profiles> <properties> - <surefire.coverage.argline> - --add-modules=ALL-MODULE-PATH - </surefire.coverage.argline> + <surefire.coverage.argline>--add-opens jakarta.ws.rs/jakarta.ws.rs.sse=ALL-UNNAMED --add-reads org.jboss.logging=java.logging --add-modules=ALL-MODULE-PATH</surefire.coverage.argline> </properties> </project>
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/main/java/module-info.java b/tests/integration/cdi-integration/context-inject-on-server/src/main/java/module-info.java index 2aab19a..bb006a5 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/src/main/java/module-info.java +++ b/tests/integration/cdi-integration/context-inject-on-server/src/main/java/module-info.java
@@ -23,6 +23,8 @@ requires jakarta.servlet; // requires jakarta.persistence; + requires static weld.api; + requires org.glassfish.jersey.core.common; requires org.glassfish.jersey.core.server; requires org.glassfish.jersey.container.servlet.core;
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/main/java/org/glassfish/jersey/tests/cdi/inject/ServletApplication.java b/tests/integration/cdi-integration/context-inject-on-server/src/main/java/org/glassfish/jersey/tests/cdi/inject/ServletApplication.java index dddd0bd..7affe91 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/src/main/java/org/glassfish/jersey/tests/cdi/inject/ServletApplication.java +++ b/tests/integration/cdi-integration/context-inject-on-server/src/main/java/org/glassfish/jersey/tests/cdi/inject/ServletApplication.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023 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,7 +22,7 @@ @ApplicationScoped public class ServletApplication extends ResourceConfig { - ServletApplication() { + public ServletApplication() { super(ServletExceptionMapper.class, ServletResponseFilter.class, ServletRequestFilter.class,
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/module-info.java b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/module-info.java index 3d2a688..4bd2777 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/module-info.java +++ b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/module-info.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.tests.integration.cdi.inject.server { +module org.glassfish.jersey.tests.integration.cdi.inject.server.test { requires jakarta.annotation; requires jakarta.cdi; requires jakarta.inject; @@ -29,8 +29,13 @@ requires org.glassfish.jersey.ext.weld2.se; requires org.glassfish.jersey.ext.cdi.rs.inject; + requires org.glassfish.jersey.tests.integration.cdi.inject.server; + requires weld.se.core; + requires org.glassfish.jersey.media.sse; + requires org.glassfish.jersey.ext.cdi1x; + requires org.junit.jupiter.api; requires org.glassfish.jersey.tests.framework.core; requires org.glassfish.jersey.tests.framework.provider.grizzly;
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/ServletTest.java b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/ServletTest.java similarity index 92% rename from tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/ServletTest.java rename to tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/ServletTest.java index d847ac1..815c7f7 100644 --- a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/ServletTest.java +++ b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/ServletTest.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023 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.tests.cdi.inject; +package org.glassfish.jersey.tests.cdi.inject.test; import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory; import org.glassfish.jersey.servlet.ServletProperties; @@ -24,6 +24,8 @@ import org.glassfish.jersey.test.grizzly.GrizzlyWebTestContainerFactory; import org.glassfish.jersey.test.spi.TestContainerException; import org.glassfish.jersey.test.spi.TestContainerFactory; +import org.glassfish.jersey.tests.cdi.inject.InjectionChecker; +import org.glassfish.jersey.tests.cdi.inject.ServletApplication; import org.jboss.weld.environment.se.Weld; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/client-connector-provider/pom.xml b/tests/integration/client-connector-provider/pom.xml index 82aa5d1..04f5111 100644 --- a/tests/integration/client-connector-provider/pom.xml +++ b/tests/integration/client-connector-provider/pom.xml
@@ -48,9 +48,13 @@ <scope>provided</scope> </dependency> <dependency> + <groupId>org.glassfish.jersey.test-framework</groupId> + <artifactId>jersey-test-framework-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.glassfish.jersey.test-framework.providers</groupId> - <artifactId>jersey-test-framework-provider-bundle</artifactId> - <type>pom</type> + <artifactId>jersey-test-framework-provider-grizzly2</artifactId> <scope>test</scope> </dependency> </dependencies>
diff --git a/tests/integration/client-connector-provider/src/test/java/module-info.java b/tests/integration/client-connector-provider/src/test/java/module-info.java new file mode 100644 index 0000000..7fa0966 --- /dev/null +++ b/tests/integration/client-connector-provider/src/test/java/module-info.java
@@ -0,0 +1,31 @@ +/* + * Copyright (c) 2023 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 + */ + +module org.glassfish.jersey.tests.integration.client.connector.provider.test { + requires jakarta.ws.rs; + + requires org.glassfish.jersey.tests.integration.client.connector.provider; + + requires org.glassfish.jersey.core.client; + requires org.glassfish.jersey.core.server; + + requires org.junit.jupiter.api; + requires org.junit.jupiter.engine; + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.grizzly; + + exports org.glassfish.jersey.tests.integration.client.connector.provider.test; +} \ No newline at end of file
diff --git a/tests/integration/client-connector-provider/src/test/java/org/glassfish/jersey/tests/integration/client/connector/provider/CustomConnectorProviderTest.java b/tests/integration/client-connector-provider/src/test/java/org/glassfish/jersey/tests/integration/client/connector/provider/test/CustomConnectorProviderTest.java similarity index 79% rename from tests/integration/client-connector-provider/src/test/java/org/glassfish/jersey/tests/integration/client/connector/provider/CustomConnectorProviderTest.java rename to tests/integration/client-connector-provider/src/test/java/org/glassfish/jersey/tests/integration/client/connector/provider/test/CustomConnectorProviderTest.java index 71ccc04..ee5498a 100644 --- a/tests/integration/client-connector-provider/src/test/java/org/glassfish/jersey/tests/integration/client/connector/provider/CustomConnectorProviderTest.java +++ b/tests/integration/client-connector-provider/src/test/java/org/glassfish/jersey/tests/integration/client/connector/provider/test/CustomConnectorProviderTest.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023 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,16 +14,18 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.tests.integration.client.connector.provider; +package org.glassfish.jersey.tests.integration.client.connector.provider.test; import jakarta.ws.rs.core.Response; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.test.JerseyTest; +import org.glassfish.jersey.tests.integration.client.connector.provider.CustomConnectorProvider; +import org.glassfish.jersey.tests.integration.client.connector.provider.TestResource; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; /** @@ -38,7 +40,7 @@ @Test public void testInvoked() { - assertFalse(CustomConnectorProvider.invoked); + Assertions.assertFalse(CustomConnectorProvider.invoked); Response response = target().path("test").request("text/plain").get(); assertEquals(200, response.getStatus());
diff --git a/tests/integration/jersey-1604/pom.xml b/tests/integration/jersey-1604/pom.xml index a2fd82f..43ecbba 100644 --- a/tests/integration/jersey-1604/pom.xml +++ b/tests/integration/jersey-1604/pom.xml
@@ -66,4 +66,7 @@ </plugin> </plugins> </build> + <properties> + <failsafe.coverage.argline>--add-opens org.glassfish.jersey.core.client/org.glassfish.jersey.client.innate=ALL-UNNAMED --add-modules=ALL-MODULE-PATH</failsafe.coverage.argline> + </properties> </project>
diff --git a/tests/integration/jersey-2255/pom.xml b/tests/integration/jersey-2255/pom.xml index 4944f35..1e4b6af 100644 --- a/tests/integration/jersey-2255/pom.xml +++ b/tests/integration/jersey-2255/pom.xml
@@ -51,6 +51,12 @@ <artifactId>jersey-test-framework-provider-external</artifactId> <scope>test</scope> </dependency> + <dependency> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-xjc</artifactId> + <version>${jaxb.ri.version}</version> + <scope>test</scope> + </dependency> </dependencies> <build> @@ -69,5 +75,7 @@ </plugin> </plugins> </build> - + <properties> + <failsafe.coverage.argline>--add-opens org.eclipse.persistence.moxy/org.eclipse.persistence.jaxb.rs=org.glassfish.hk2.utilities --add-modules=ALL-MODULE-PATH</failsafe.coverage.argline> + </properties> </project>
diff --git a/tests/integration/jersey-2255/src/test/java/module-info.java b/tests/integration/jersey-2255/src/test/java/module-info.java new file mode 100644 index 0000000..cdb0cb5 --- /dev/null +++ b/tests/integration/jersey-2255/src/test/java/module-info.java
@@ -0,0 +1,33 @@ +/* + * Copyright (c) 2023 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 + */ + +module org.glassfish.jersey.tests.integration.jersey_2255 { + requires jakarta.ws.rs; + requires jakarta.xml.bind; + + requires org.junit.jupiter.api; + requires org.hamcrest; + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.external; + + requires org.eclipse.persistence.moxy; + + requires org.glassfish.jersey.core.common; + requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.ext.entity.filtering; + + opens org.glassfish.jersey.tests.integration.jersey2255; +} \ No newline at end of file
diff --git a/tests/integration/jersey-4099/pom.xml b/tests/integration/jersey-4099/pom.xml index fa547fc..1b3d337 100644 --- a/tests/integration/jersey-4099/pom.xml +++ b/tests/integration/jersey-4099/pom.xml
@@ -42,9 +42,13 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.glassfish.jersey.test-framework</groupId> + <artifactId>jersey-test-framework-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.glassfish.jersey.test-framework.providers</groupId> - <artifactId>jersey-test-framework-provider-bundle</artifactId> - <type>pom</type> + <artifactId>jersey-test-framework-provider-grizzly2</artifactId> <scope>test</scope> </dependency> @@ -92,4 +96,9 @@ </plugin> </plugins> </build> + <properties> + <surefire.coverage.argline> + --add-reads org.jboss.logging=java.logging --add-modules=ALL-MODULE-PATH + </surefire.coverage.argline> + </properties> </project>
diff --git a/tests/integration/jersey-4099/src/main/java/module-info.java b/tests/integration/jersey-4099/src/main/java/module-info.java index a8835e1..35c3a3e 100644 --- a/tests/integration/jersey-4099/src/main/java/module-info.java +++ b/tests/integration/jersey-4099/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2023 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,11 +14,10 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.tests.integration.jersey1928 { +module org.glassfish.jersey.tests.integration.jersey4099 { requires jakarta.ws.rs; requires jakarta.annotation; requires jakarta.cdi; - requires jakarta.xml.bind; } \ No newline at end of file
diff --git a/tests/integration/jersey-4099/src/test/java/module-info.java b/tests/integration/jersey-4099/src/test/java/module-info.java new file mode 100644 index 0000000..428bc79 --- /dev/null +++ b/tests/integration/jersey-4099/src/test/java/module-info.java
@@ -0,0 +1,33 @@ +/* + * Copyright (c) 2023 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 + */ + +module org.glassfish.jersey.tests.integration.jersey4099 { + requires jakarta.ws.rs; + requires jakarta.annotation; + + requires jakarta.cdi; + requires weld.se.core; + + requires jakarta.xml.bind; + + requires org.glassfish.jersey.core.server; + + requires org.junit.jupiter.api; + requires org.glassfish.jersey.tests.framework.core; + requires org.glassfish.jersey.tests.framework.provider.grizzly; + + exports org.glassfish.jersey.tests.integration.jersey4099; +} \ No newline at end of file
diff --git a/tests/integration/jersey-780/src/test/java/module-info.java b/tests/integration/jersey-780/src/test/java/module-info.java index 986f96b..1d39d18 100644 --- a/tests/integration/jersey-780/src/test/java/module-info.java +++ b/tests/integration/jersey-780/src/test/java/module-info.java
@@ -23,4 +23,6 @@ requires org.glassfish.jersey.tests.framework.provider.external; requires org.junit.jupiter.api; + + exports org.glassfish.jersey.tests.integration.jersey780; } \ No newline at end of file