Merge remote-tracking branch 'upstream/4.0' into 'upstream/4.0.JPMS'
Signed-off-by: Maxim Nesen <senivam@gmail.com>
diff --git a/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml b/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml
index 9f6fb8d..e50c9e8 100644
--- a/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml
@@ -70,8 +70,6 @@
<artifactId>maven-compiler-plugin</artifactId>
<inherited>true</inherited>
<configuration>
- <source>${java.version}</source>
- <target>${java.version}</target>
<showWarnings>false</showWarnings>
<fork>false</fork>
</configuration>
diff --git a/archetypes/jersey-quickstart-grizzly2/pom.xml b/archetypes/jersey-quickstart-grizzly2/pom.xml
index 2a0ff0d..7ee16b7 100644
--- a/archetypes/jersey-quickstart-grizzly2/pom.xml
+++ b/archetypes/jersey-quickstart-grizzly2/pom.xml
@@ -53,4 +53,4 @@
</plugins>
</build>
-</project>
+</project>
\ No newline at end of file
diff --git a/archetypes/jersey-quickstart-grizzly2/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetypes/jersey-quickstart-grizzly2/src/main/resources/META-INF/maven/archetype-metadata.xml
index 54380e5..58e9ba4 100644
--- a/archetypes/jersey-quickstart-grizzly2/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/archetypes/jersey-quickstart-grizzly2/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -18,24 +18,38 @@
-->
<archetype-descriptor
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
- name="jersey-quickstart-webapp"
- xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0 https://maven.apache.org/xsd/archetype-descriptor-1.1.0.xsd"
+ name="quickstart">
<fileSets>
- <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <fileSet filtered="true" packaged="true">
+ <excludes>
+ <exclude>module-info.java</exclude>
+ </excludes>
<directory>src/main/java</directory>
<includes>
- <include>**/*</include>
+ <include>**/*.java</include>
</includes>
</fileSet>
- <!--<fileSet filtered="true" encoding="UTF-8">
- <directory>src/main/webapp</directory>
- </fileSet>-->
- <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <fileSet filtered="true" packaged="false">
+ <directory>src/main/java</directory>
+ <includes>
+ <include>module-info.java</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" packaged="true">
+ <excludes>
+ <exclude>module-info.java</exclude>
+ </excludes>
<directory>src/test/java</directory>
<includes>
- <include>**/*</include>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" packaged="false">
+ <directory>src/test/java</directory>
+ <includes>
+ <include>module-info.java</include>
</includes>
</fileSet>
</fileSets>
diff --git a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml
index 087417f..2690b43 100644
--- a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml
@@ -52,10 +52,6 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.mvn.plugin.version}</version>
<inherited>true</inherited>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
diff --git a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/main/java/module-info.java b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/main/java/module-info.java
new file mode 100644
index 0000000..fc807e6
--- /dev/null
+++ b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/main/java/module-info.java
@@ -0,0 +1,10 @@
+module ${package}.module {
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.grizzly.http.server;
+
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.container.grizzly2.http;
+
+ exports ${package};
+}
\ No newline at end of file
diff --git a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/test/java/MyResourceTest.java b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/test/java/MyResourceTest.java
index 0b5f5c7..729b5d5 100644
--- a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/test/java/MyResourceTest.java
+++ b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/test/java/MyResourceTest.java
@@ -1,4 +1,4 @@
-package $package;
+package ${package}.test;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.client.ClientBuilder;
@@ -6,6 +6,8 @@
import org.glassfish.grizzly.http.server.HttpServer;
+import ${package}.Main;
+
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
diff --git a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/test/java/module-info.java b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/test/java/module-info.java
new file mode 100644
index 0000000..dd95b34
--- /dev/null
+++ b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/test/java/module-info.java
@@ -0,0 +1,9 @@
+module ${package}.module.test {
+ requires jakarta.ws.rs;
+
+ requires org.junit.jupiter.api;
+
+ requires com.example.archetype.grizzly.module;
+
+ exports ${package}.test;
+}
\ No newline at end of file
diff --git a/archetypes/jersey-quickstart-webapp/pom.xml b/archetypes/jersey-quickstart-webapp/pom.xml
index ab622c9..71279ab 100644
--- a/archetypes/jersey-quickstart-webapp/pom.xml
+++ b/archetypes/jersey-quickstart-webapp/pom.xml
@@ -52,4 +52,4 @@
</resource>
</resources>
</build>
-</project>
+</project>
\ No newline at end of file
diff --git a/archetypes/jersey-quickstart-webapp/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetypes/jersey-quickstart-webapp/src/main/resources/META-INF/maven/archetype-metadata.xml
index bea65b3..97e49d3 100644
--- a/archetypes/jersey-quickstart-webapp/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/archetypes/jersey-quickstart-webapp/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -18,25 +18,27 @@
-->
<archetype-descriptor
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
- name="jersey-quickstart-webapp"
- xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0 https://maven.apache.org/xsd/archetype-descriptor-1.1.0.xsd"
+ name="quickstart">
<fileSets>
- <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <fileSet filtered="true" packaged="true">
+ <excludes>
+ <exclude>module-info.java</exclude>
+ </excludes>
<directory>src/main/java</directory>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
</fileSet>
- <fileSet filtered="true" encoding="UTF-8">
+ <fileSet filtered="true" packaged="false">
+ <directory>src/main/java</directory>
+ <includes>
+ <include>module-info.java</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" packaged="false">
<directory>src/main/webapp</directory>
- <includes>
- <include>**/*</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" packaged="true" encoding="UTF-8">
- <directory>src/test/java</directory>
- <includes>
- <include>**/*</include>
- </includes>
</fileSet>
</fileSets>
</archetype-descriptor>
\ No newline at end of file
diff --git a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml
index 1720b6a..9be4049 100644
--- a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml
@@ -17,10 +17,6 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.mvn.plugin.version}</version>
<inherited>true</inherited>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
diff --git a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/java/module-info.java b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/java/module-info.java
new file mode 100644
index 0000000..8217f2f
--- /dev/null
+++ b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/java/module-info.java
@@ -0,0 +1,8 @@
+module ${package}.module {
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.container.servlet;
+ requires org.glassfish.jersey.inject.hk2;
+
+ exports ${package};
+}
\ No newline at end of file
diff --git a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
index 7c85b3a..279de3c 100644
--- a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
+++ b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
@@ -7,7 +7,7 @@
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
- <param-value>$package</param-value>
+ <param-value>${package}</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
diff --git a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/index.jsp b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/index.jsp
index a064b45..9b08787 100644
--- a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/index.jsp
+++ b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/src/main/webapp/index.jsp
@@ -2,7 +2,7 @@
<body>
<h2>Jersey RESTful Web Application!</h2>
<p><a href="webapi/myresource">Jersey resource</a>
- <p>Visit <a href="http://jersey.java.net">Project Jersey website</a>
+ <p>Visit <a href="http://eclipse-ee4j.github.io/jersey">Project Jersey website</a>
for more information on Jersey!
</body>
</html>
diff --git a/archetypes/pom.xml b/archetypes/pom.xml
index da6f62e..f83ec08 100644
--- a/archetypes/pom.xml
+++ b/archetypes/pom.xml
@@ -32,7 +32,7 @@
<description>
A module containing archetypes for generating Jersey-based applications.
</description>
-
+ <!-- List of available modules -->
<modules>
<module>jersey-heroku-webapp</module>
<module>jersey-quickstart-grizzly2</module>
@@ -57,4 +57,7 @@
</plugin>
</plugins>
</build>
+ <properties>
+ <maven.resources.plugin.version>3.2.0</maven.resources.plugin.version>
+ </properties>
</project>
diff --git a/bundles/apidocs/pom.xml b/bundles/apidocs/pom.xml
index 9981f9f..2b41cd8 100644
--- a/bundles/apidocs/pom.xml
+++ b/bundles/apidocs/pom.xml
@@ -416,23 +416,35 @@
<sourceFileExcludes>
<fileExclude>META-INF/versions/21/org/glassfish/jersey/helidon/connector/*.java</fileExclude>
<fileExclude>org/glassfish/jersey/helidon/connector/*.java</fileExclude>
+ <fileExclude>org/glassfish/jersey/jetty/*.java</fileExclude>
+ <fileExclude>org/glassfish/jersey/jetty/connector/*.java</fileExclude>
+ <fileExclude>org/glassfish/jersey/wadl/doclet/*.java</fileExclude>
+ <fileExclude>module-info.java</fileExclude>
</sourceFileExcludes>
+ <source>${java.version}</source>
+ <disableSourcepathUsage>true</disableSourcepathUsage>
<dependencySourceIncludes>
<dependencySourceInclude>org.glassfish.jersey.*:*</dependencySourceInclude>
</dependencySourceIncludes>
<excludePackageNames>*.innate:*.innate.*</excludePackageNames>
+ <legacyMode>true</legacyMode>
+ <verbose>false</verbose>
+ <debug>true</debug>
+ <detectJavaApiLink>false</detectJavaApiLink>
+ <detectLinks>false</detectLinks>
+ <doclint>none</doclint>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>exclude-jar</id>
<goals>
- <goal>remove-project-artifact</goal>
+ <goal>purge-local-repository</goal>
</goals>
</execution>
</executions>
diff --git a/bundles/jaxrs-ri/pom.xml b/bundles/jaxrs-ri/pom.xml
index d28a8e0..15f8f39 100644
--- a/bundles/jaxrs-ri/pom.xml
+++ b/bundles/jaxrs-ri/pom.xml
@@ -196,8 +196,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<inherited>false</inherited>
<configuration>
- <source>${java.version}</source>
- <target>${java.version}</target>
+ <release>${java.version}</release>
<compilerArguments>
<!-- Do not warn about using sun.misc.Unsafe -->
<XDignore.symbol.file />
@@ -453,6 +452,15 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>java_version</id>
+ <activation>
+ <jdk>21</jdk>
+ </activation>
+ <properties>
+ <java.version>21</java.version>
+ </properties>
+ </profile>
</profiles>
<properties>
diff --git a/connectors/apache5-connector/src/main/java/module-info.java b/connectors/apache5-connector/src/main/java/module-info.java
new file mode 100644
index 0000000..ab997c4
--- /dev/null
+++ b/connectors/apache5-connector/src/main/java/module-info.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2024, 2025 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.apache5.connector {
+ requires java.logging;
+
+ requires jakarta.ws.rs;
+
+ requires org.apache.httpcomponents.core5.httpcore5;
+ requires org.apache.httpcomponents.client5.httpclient5;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+
+ exports org.glassfish.jersey.apache5.connector;
+
+ opens org.glassfish.jersey.apache5.connector;
+}
\ No newline at end of file
diff --git a/connectors/apache5-connector/src/test/java/module-info.java b/connectors/apache5-connector/src/test/java/module-info.java
new file mode 100644
index 0000000..9351a82
--- /dev/null
+++ b/connectors/apache5-connector/src/test/java/module-info.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2024, 2025 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.apache5.connector.test {
+ requires java.logging;
+
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires org.apache.httpcomponents.client5.httpclient5;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.server;
+
+ requires org.glassfish.jersey.apache5.connector;
+ 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;
+ requires org.junit.platform.commons;
+ requires org.hamcrest;
+
+ exports org.glassfish.jersey.apache5.connector.test to
+ org.junit.platform.commons,
+ org.glassfish.jersey.core.server;
+ opens org.glassfish.jersey.apache5.connector.test to
+ org.glassfish.hk2.locator,
+ org.glassfish.hk2.utilities;
+}
\ No newline at end of file
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/AsyncTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/AsyncTest.java
similarity index 97%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/AsyncTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/AsyncTest.java
index 249ad82..18d948a 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/AsyncTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/AsyncTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
@@ -34,6 +34,7 @@
import jakarta.ws.rs.core.Application;
import jakarta.ws.rs.core.Response;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/AuthTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/AuthTest.java
similarity index 98%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/AuthTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/AuthTest.java
index 130a2b3..8fda3ef 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/AuthTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/AuthTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import jakarta.ws.rs.DELETE;
import jakarta.ws.rs.GET;
@@ -38,6 +38,9 @@
import org.apache.hc.client5.http.auth.UsernamePasswordCredentials;
import org.apache.hc.client5.http.impl.auth.BasicCredentialsProvider;
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager;
+import org.glassfish.jersey.apache5.connector.Apache5ClientProperties;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
+import org.glassfish.jersey.apache5.connector.Apache5HttpClientBuilderConfigurator;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
import org.glassfish.jersey.client.authentication.ResponseAuthenticationException;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/CookieTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/CookieTest.java
similarity index 72%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/CookieTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/CookieTest.java
index a92271e..80befa6 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/CookieTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/CookieTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
@@ -28,13 +28,20 @@
import jakarta.ws.rs.core.NewCookie;
import jakarta.ws.rs.core.Response;
+import org.apache.hc.client5.http.cookie.CookieStore;
+import org.glassfish.jersey.apache5.connector.Apache5ClientProperties;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.JerseyClient;
import org.glassfish.jersey.client.JerseyClientBuilder;
+import org.glassfish.jersey.client.spi.Connector;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
import org.junit.jupiter.api.Test;
+
+import java.lang.reflect.Method;
+
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
@@ -85,11 +92,11 @@
assertEquals("NO-COOKIE", r.request().get(String.class));
assertEquals("NO-COOKIE", r.request().get(String.class));
- final Apache5Connector connector = (Apache5Connector) client.getConfiguration().getConnector();
- if (connector.getCookieStore() != null) {
- assertTrue(connector.getCookieStore().getCookies().isEmpty());
+ final CookieStore cookieStore = cookieStore(client);
+ if (cookieStore != null) {
+ assertTrue(cookieStore.getCookies().isEmpty());
} else {
- assertNull(connector.getCookieStore());
+ assertNull(cookieStore);
}
}
@@ -103,9 +110,21 @@
assertEquals("NO-COOKIE", r.request().get(String.class));
assertEquals("value", r.request().get(String.class));
- final Apache5Connector connector = (Apache5Connector) client.getConfiguration().getConnector();
- assertNotNull(connector.getCookieStore().getCookies());
- assertEquals(1, connector.getCookieStore().getCookies().size());
- assertEquals("value", connector.getCookieStore().getCookies().get(0).getValue());
+ final CookieStore cookieStore = cookieStore(client);
+ assertNotNull(cookieStore.getCookies());
+ assertEquals(1, cookieStore.getCookies().size());
+ assertEquals("value", cookieStore.getCookies().get(0).getValue());
+ }
+
+ private static CookieStore cookieStore(JerseyClient client) {
+ Connector connector = client.getConfiguration().getConnector();
+ Method method = null;
+ try {
+ method = connector.getClass().getDeclaredMethod("getCookieStore");
+ method.setAccessible(true);
+ return (CookieStore) method.invoke(connector);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
}
}
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/CustomLoggingFilter.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/CustomLoggingFilter.java
similarity index 94%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/CustomLoggingFilter.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/CustomLoggingFilter.java
index 8b23445..8f4f2aa 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/CustomLoggingFilter.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/CustomLoggingFilter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import java.io.IOException;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/DisableContentEncodingTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/DisableContentEncodingTest.java
similarity index 92%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/DisableContentEncodingTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/DisableContentEncodingTest.java
index 85b2408..36f4a7e 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/DisableContentEncodingTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/DisableContentEncodingTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.HeaderParam;
@@ -25,6 +25,8 @@
import jakarta.ws.rs.core.Application;
import org.apache.hc.client5.http.config.RequestConfig;
+import org.glassfish.jersey.apache5.connector.Apache5ClientProperties;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.message.GZipEncoder;
import org.glassfish.jersey.server.ResourceConfig;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/FollowRedirectsTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/FollowRedirectsTest.java
similarity index 94%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/FollowRedirectsTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/FollowRedirectsTest.java
index cb8932a..424b4b3 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/FollowRedirectsTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/FollowRedirectsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import java.io.IOException;
import java.util.logging.Logger;
@@ -29,6 +29,7 @@
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.UriBuilder;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.ClientResponse;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/GZIPContentEncodingTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/GZIPContentEncodingTest.java
similarity index 93%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/GZIPContentEncodingTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/GZIPContentEncodingTest.java
index d1e43fd..cd2851a 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/GZIPContentEncodingTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/GZIPContentEncodingTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import java.util.Arrays;
@@ -28,6 +28,7 @@
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.message.GZipEncoder;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/HelloWorldTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/HelloWorldTest.java
similarity index 98%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/HelloWorldTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/HelloWorldTest.java
index 96114cb..4946b57 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/HelloWorldTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/HelloWorldTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import java.io.IOException;
import java.util.Map;
@@ -47,6 +47,8 @@
import org.apache.hc.core5.io.CloseMode;
import org.apache.hc.core5.util.TimeValue;
import org.apache.hc.core5.util.Timeout;
+import org.glassfish.jersey.apache5.connector.Apache5ClientProperties;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/HttpEntityTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/HttpEntityTest.java
similarity index 93%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/HttpEntityTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/HttpEntityTest.java
index 9e08aa8..0a51e5c 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/HttpEntityTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/HttpEntityTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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,12 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.io.entity.ByteArrayEntity;
import org.apache.hc.core5.http.io.entity.InputStreamEntity;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/HttpHeadersTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/HttpHeadersTest.java
similarity index 95%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/HttpHeadersTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/HttpHeadersTest.java
index 16e135a..cd6a9c2 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/HttpHeadersTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/HttpHeadersTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import java.io.IOException;
import java.io.OutputStream;
@@ -36,6 +36,7 @@
import jakarta.ws.rs.ext.MessageBodyWriter;
import jakarta.ws.rs.ext.Provider;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.logging.LoggingFeature;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/HttpMethodTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/HttpMethodTest.java
similarity index 96%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/HttpMethodTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/HttpMethodTest.java
index 107faad..8e697c3 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/HttpMethodTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/HttpMethodTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -36,6 +36,8 @@
import jakarta.ws.rs.core.Response;
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager;
+import org.glassfish.jersey.apache5.connector.Apache5ClientProperties;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.server.ResourceConfig;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/HttpMethodWithClientFilterTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/HttpMethodWithClientFilterTest.java
similarity index 85%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/HttpMethodWithClientFilterTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/HttpMethodWithClientFilterTest.java
index 03d182d..dbfb80b 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/HttpMethodWithClientFilterTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/HttpMethodWithClientFilterTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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,12 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.client.ClientBuilder;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.logging.LoggingFeature;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/LargeDataTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/LargeDataTest.java
similarity index 95%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/LargeDataTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/LargeDataTest.java
index 1173941..87cd8af 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/LargeDataTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/LargeDataTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import java.io.IOException;
import java.io.InputStream;
@@ -32,6 +32,7 @@
import jakarta.ws.rs.core.Response.Status;
import jakarta.ws.rs.core.StreamingOutput;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/ManagedClientTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/ManagedClientTest.java
similarity index 97%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/ManagedClientTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/ManagedClientTest.java
index 3ab8a2a..1db31cf 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/ManagedClientTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/ManagedClientTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import java.io.IOException;
import java.lang.annotation.Documented;
@@ -39,6 +39,7 @@
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ClientBinding;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/NoEntityTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/NoEntityTest.java
similarity index 93%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/NoEntityTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/NoEntityTest.java
index cff230d..a088faf 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/NoEntityTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/NoEntityTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import java.util.logging.Logger;
@@ -26,6 +26,7 @@
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.Response.Status;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/RetryStrategyTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/RetryStrategyTest.java
similarity index 94%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/RetryStrategyTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/RetryStrategyTest.java
index 234c10d..e801515 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/RetryStrategyTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/RetryStrategyTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import java.io.IOException;
@@ -34,6 +34,8 @@
import org.apache.hc.core5.http.HttpResponse;
import org.apache.hc.core5.http.protocol.HttpContext;
import org.apache.hc.core5.util.TimeValue;
+import org.glassfish.jersey.apache5.connector.Apache5ClientProperties;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.RequestEntityProcessing;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/SpecialHeaderTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/SpecialHeaderTest.java
similarity index 93%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/SpecialHeaderTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/SpecialHeaderTest.java
index 0007ead..d98117e 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/SpecialHeaderTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/SpecialHeaderTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
@@ -23,6 +23,7 @@
import jakarta.ws.rs.core.HttpHeaders;
import jakarta.ws.rs.core.Response;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.message.GZipEncoder;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/StreamingTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/StreamingTest.java
similarity index 95%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/StreamingTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/StreamingTest.java
index 232507e..3063b5f 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/StreamingTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/StreamingTest.java
@@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import java.io.IOException;
import java.io.InputStream;
@@ -31,6 +31,9 @@
import jakarta.inject.Singleton;
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager;
+import org.glassfish.jersey.apache5.connector.Apache5ClientProperties;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectionClosingStrategy;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.server.ChunkedOutput;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/TimeoutTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/TimeoutTest.java
similarity index 93%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/TimeoutTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/TimeoutTest.java
index 3dda5ec..1840319 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/TimeoutTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/TimeoutTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import java.net.SocketTimeoutException;
import java.util.logging.Logger;
@@ -25,6 +25,7 @@
import jakarta.ws.rs.core.Application;
import jakarta.ws.rs.core.Response;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.logging.LoggingFeature;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/TraceSupportTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/TraceSupportTest.java
similarity index 97%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/TraceSupportTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/TraceSupportTest.java
index a1fcb93..e9d36dd 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/TraceSupportTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/TraceSupportTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -37,6 +37,7 @@
import jakarta.ws.rs.core.Request;
import jakarta.ws.rs.core.Response;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.process.Inflector;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/UnderlyingCookieStoreAccessTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/UnderlyingCookieStoreAccessTest.java
similarity index 91%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/UnderlyingCookieStoreAccessTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/UnderlyingCookieStoreAccessTest.java
index 02a21e1..d13d017 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/UnderlyingCookieStoreAccessTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/UnderlyingCookieStoreAccessTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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,14 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.client.ClientBuilder;
import jakarta.ws.rs.client.WebTarget;
import org.apache.hc.client5.http.cookie.CookieStore;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.junit.jupiter.api.Test;
diff --git a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/UnderlyingHttpClientAccessTest.java b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/UnderlyingHttpClientAccessTest.java
similarity index 91%
rename from connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/UnderlyingHttpClientAccessTest.java
rename to connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/UnderlyingHttpClientAccessTest.java
index b487a82..5dbce9e 100644
--- a/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/UnderlyingHttpClientAccessTest.java
+++ b/connectors/apache5-connector/src/test/java/org/glassfish/jersey/apache5/connector/test/UnderlyingHttpClientAccessTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 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,14 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.apache5.connector;
+package org.glassfish.jersey.apache5.connector.test;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.client.ClientBuilder;
import jakarta.ws.rs.client.WebTarget;
import org.apache.hc.client5.http.classic.HttpClient;
+import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.junit.jupiter.api.Test;
diff --git a/connectors/grizzly-connector/pom.xml b/connectors/grizzly-connector/pom.xml
index c5efd73..6e739c0 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>
@@ -90,10 +96,6 @@
<artifactId>build-helper-maven-plugin</artifactId>
<inherited>true</inherited>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- </plugin>
</plugins>
</build>
diff --git a/connectors/grizzly-connector/src/main/java/module-info.java b/connectors/grizzly-connector/src/main/java/module-info.java
new file mode 100644
index 0000000..8412c6c
--- /dev/null
+++ b/connectors/grizzly-connector/src/main/java/module-info.java
@@ -0,0 +1,30 @@
+/*
+ * 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
+ * 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 jakarta.ws.rs;
+
+ requires org.glassfish.grizzly;
+ requires grizzly.http.client;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+
+ exports org.glassfish.jersey.grizzly.connector;
+ opens org.glassfish.jersey.grizzly.connector;
+}
\ No newline at end of file
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..11c6ad2
--- /dev/null
+++ b/connectors/grizzly-connector/src/test/java/module-info.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2023, 2024 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.test {
+ requires java.logging;
+ requires org.slf4j;
+
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.grizzly;
+ requires grizzly.http.client;
+
+ requires org.glassfish.grizzly.http;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.grizzly.connector;
+
+ 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;
+ requires org.hamcrest;
+
+ exports org.glassfish.jersey.grizzly.connector.test;
+ opens org.glassfish.jersey.grizzly.connector.test;
+}
\ No newline at end of file
diff --git a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/AsyncTest.java b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/AsyncTest.java
similarity index 97%
rename from connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/AsyncTest.java
rename to connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/AsyncTest.java
index 0818c7e..91972a1 100644
--- a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/AsyncTest.java
+++ b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/AsyncTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 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.grizzly.connector;
+package org.glassfish.jersey.grizzly.connector.test;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
@@ -31,6 +31,7 @@
import jakarta.ws.rs.core.Response;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.grizzly.connector.GrizzlyConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/CustomizersTest.java b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/CustomizersTest.java
similarity index 96%
rename from connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/CustomizersTest.java
rename to connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/CustomizersTest.java
index b987fc0..1f99366 100644
--- a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/CustomizersTest.java
+++ b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/CustomizersTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2024 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.grizzly.connector;
+package org.glassfish.jersey.grizzly.connector.test;
import jakarta.ws.rs.HeaderParam;
import jakarta.ws.rs.POST;
@@ -29,6 +29,7 @@
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientRequest;
+import org.glassfish.jersey.grizzly.connector.GrizzlyConnectorProvider;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/FollowRedirectsTest.java b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/FollowRedirectsTest.java
similarity index 94%
rename from connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/FollowRedirectsTest.java
rename to connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/FollowRedirectsTest.java
index e313b10..822503f 100644
--- a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/FollowRedirectsTest.java
+++ b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/FollowRedirectsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2024 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.grizzly.connector;
+package org.glassfish.jersey.grizzly.connector.test;
import java.io.IOException;
@@ -31,6 +31,7 @@
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.ClientResponse;
+import org.glassfish.jersey.grizzly.connector.GrizzlyConnectorProvider;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/HttpHeadersTest.java b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/HttpHeadersTest.java
similarity index 91%
rename from connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/HttpHeadersTest.java
rename to connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/HttpHeadersTest.java
index 2b8cdf2..d3a407b 100644
--- a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/HttpHeadersTest.java
+++ b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/HttpHeadersTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2024 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.grizzly.connector;
+package org.glassfish.jersey.grizzly.connector.test;
import jakarta.ws.rs.HeaderParam;
import jakarta.ws.rs.POST;
@@ -23,6 +23,7 @@
import jakarta.ws.rs.core.Response;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.grizzly.connector.GrizzlyConnectorProvider;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/HttpMethodTest.java b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/HttpMethodTest.java
similarity index 92%
rename from connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/HttpMethodTest.java
rename to connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/HttpMethodTest.java
index 650eea5..64e9059 100644
--- a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/HttpMethodTest.java
+++ b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/HttpMethodTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2024 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,9 +14,10 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.grizzly.connector;
+package org.glassfish.jersey.grizzly.connector.test;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.grizzly.connector.GrizzlyConnectorProvider;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
import org.junit.jupiter.api.Test;
diff --git a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/NoEntityTest.java b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/NoEntityTest.java
similarity index 93%
rename from connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/NoEntityTest.java
rename to connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/NoEntityTest.java
index 4e15b4e..d9cc1c3 100644
--- a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/NoEntityTest.java
+++ b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/NoEntityTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 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.grizzly.connector;
+package org.glassfish.jersey.grizzly.connector.test;
import java.util.logging.Logger;
@@ -27,6 +27,7 @@
import jakarta.ws.rs.core.Response.Status;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.grizzly.connector.GrizzlyConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/ParallelTest.java b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/ParallelTest.java
similarity index 96%
rename from connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/ParallelTest.java
rename to connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/ParallelTest.java
index 1987d91..2cc0971 100644
--- a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/ParallelTest.java
+++ b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/ParallelTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2024 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.grizzly.connector;
+package org.glassfish.jersey.grizzly.connector.test;
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CountDownLatch;
@@ -34,6 +34,7 @@
import jakarta.ws.rs.core.Response;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.grizzly.connector.GrizzlyConnectorProvider;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/TimeoutTest.java b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/TimeoutTest.java
similarity index 93%
rename from connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/TimeoutTest.java
rename to connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/TimeoutTest.java
index 5066426..6f5f543 100644
--- a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/TimeoutTest.java
+++ b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/TimeoutTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2024 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.grizzly.connector;
+package org.glassfish.jersey.grizzly.connector.test;
import java.util.concurrent.TimeoutException;
@@ -26,6 +26,7 @@
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
+import org.glassfish.jersey.grizzly.connector.GrizzlyConnectorProvider;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/TraceSupportTest.java b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/TraceSupportTest.java
similarity index 97%
rename from connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/TraceSupportTest.java
rename to connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/TraceSupportTest.java
index 2a3fb44..36158a1 100644
--- a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/TraceSupportTest.java
+++ b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/TraceSupportTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 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.grizzly.connector;
+package org.glassfish.jersey.grizzly.connector.test;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -38,6 +38,7 @@
import jakarta.ws.rs.core.Response;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.grizzly.connector.GrizzlyConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.process.Inflector;
import org.glassfish.jersey.server.ContainerRequest;
diff --git a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/UnderlyingHttpClientAccessTest.java b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/UnderlyingHttpClientAccessTest.java
similarity index 92%
rename from connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/UnderlyingHttpClientAccessTest.java
rename to connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/UnderlyingHttpClientAccessTest.java
index 031baaa..59ef586 100644
--- a/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/UnderlyingHttpClientAccessTest.java
+++ b/connectors/grizzly-connector/src/test/java/org/glassfish/jersey/grizzly/connector/test/UnderlyingHttpClientAccessTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2024 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.grizzly.connector;
+package org.glassfish.jersey.grizzly.connector.test;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.client.ClientBuilder;
@@ -22,6 +22,7 @@
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.grizzly.connector.GrizzlyConnectorProvider;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertSame;
diff --git a/connectors/helidon-connector/pom.xml b/connectors/helidon-connector/pom.xml
index dfc34ab..8c3c71c 100644
--- a/connectors/helidon-connector/pom.xml
+++ b/connectors/helidon-connector/pom.xml
@@ -36,6 +36,7 @@
<java17.sourceDirectory>${project.basedir}/src/main/java17</java17.sourceDirectory>
<java21.build.outputDirectory>${project.basedir}/target21</java21.build.outputDirectory>
<java21.sourceDirectory>${project.basedir}/src/main/java21</java21.sourceDirectory>
+ <javadoc.skip>${maven.javadoc.skip}</javadoc.skip>
</properties>
<dependencies>
@@ -76,6 +77,13 @@
<artifactId>maven-compiler-plugin</artifactId>
<inherited>false</inherited>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <skip>${javadoc.skip}</skip>
+ </configuration>
+ </plugin>
</plugins>
</build>
@@ -170,6 +178,7 @@
<configuration>
<instructions>
<Multi-Release>true</Multi-Release>
+ <Automatic-Module-Name>org.glassfish.jersey.helidon.connector</Automatic-Module-Name>
</instructions>
</configuration>
</plugin>
diff --git a/connectors/jdk-connector/pom.xml b/connectors/jdk-connector/pom.xml
index 1cdb7d5..c92967d 100644
--- a/connectors/jdk-connector/pom.xml
+++ b/connectors/jdk-connector/pom.xml
@@ -54,6 +54,13 @@
</dependency>
<dependency>
+ <groupId>jakarta.activation</groupId>
+ <artifactId>jakarta.activation-api</artifactId>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
diff --git a/connectors/jdk-connector/src/main/java/module-info.java b/connectors/jdk-connector/src/main/java/module-info.java
new file mode 100644
index 0000000..753dffd
--- /dev/null
+++ b/connectors/jdk-connector/src/main/java/module-info.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2022, 2025 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.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+
+ exports org.glassfish.jersey.jdk.connector;
+ exports org.glassfish.jersey.jdk.connector.internal to
+ org.glassfish.jersey.core.client,
+ org.glassfish.hk2.locator,
+ org.glassfish.hk2.utilities,
+ weld.core.impl;
+ exports org.glassfish.jersey.jdk.connector.internal.l10n;
+
+ opens org.glassfish.jersey.jdk.connector;
+ opens org.glassfish.jersey.jdk.connector.internal to
+ org.glassfish.jersey.core.client,
+ org.glassfish.hk2.locator,
+ org.glassfish.hk2.utilities,
+ weld.core.impl;
+
+ opens org.glassfish.jersey.jdk.connector.internal.l10n;
+}
\ No newline at end of file
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/AsynchronousBodyInputStream.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/AsynchronousBodyInputStream.java
index 083b076..027087c 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/AsynchronousBodyInputStream.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/AsynchronousBodyInputStream.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 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 java.util.concurrent.ExecutorService;
import org.glassfish.jersey.internal.util.collection.ByteBufferInputStream;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
/**
* TODO Some of the operations added for async. support (e.g.) can be also supported in sync. mode
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/BufferedBodyOutputStream.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/BufferedBodyOutputStream.java
index 2ee03fe..8030c1c 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/BufferedBodyOutputStream.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/BufferedBodyOutputStream.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,6 +16,8 @@
package org.glassfish.jersey.jdk.connector.internal;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
+
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ChunkedBodyOutputStream.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ChunkedBodyOutputStream.java
index 92b5a03..f40a1cb 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ChunkedBodyOutputStream.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ChunkedBodyOutputStream.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,6 +16,8 @@
package org.glassfish.jersey.jdk.connector.internal;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
+
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.Buffer;
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ConnectorConfiguration.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ConnectorConfiguration.java
index 9b92517..0554277 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ConnectorConfiguration.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ConnectorConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -33,6 +33,7 @@
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.innate.http.SSLParamConfigurator;
import org.glassfish.jersey.jdk.connector.JdkConnectorProperties;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
/**
* A container for connector configuration to make it easier to move around.
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/DestinationConnectionPool.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/DestinationConnectionPool.java
index 976f7b4..08c78f5 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/DestinationConnectionPool.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/DestinationConnectionPool.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,6 +16,8 @@
package org.glassfish.jersey.jdk.connector.internal;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
+
import java.io.IOException;
import java.net.CookieManager;
import java.net.URI;
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/HttpConnection.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/HttpConnection.java
index d9ea76e..772440d 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/HttpConnection.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/HttpConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 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
@@ -32,6 +32,7 @@
import javax.net.ssl.SSLContext;
import org.glassfish.jersey.SslConfigurator;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
/**
* @author Petr Janouch
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/HttpParser.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/HttpParser.java
index 6099e8e..a5814fc 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/HttpParser.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/HttpParser.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 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.util.List;
import jakarta.ws.rs.core.HttpHeaders;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
/**
* @author Alexey Stashok
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/HttpRequest.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/HttpRequest.java
index cc8dfbe..7aa92fe 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/HttpRequest.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/HttpRequest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,6 +16,8 @@
package org.glassfish.jersey.jdk.connector.internal;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
+
import java.net.URI;
import java.nio.ByteBuffer;
import java.util.ArrayList;
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ProxyBasicAuthenticator.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ProxyBasicAuthenticator.java
index d965cfd..de9dc5b 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ProxyBasicAuthenticator.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ProxyBasicAuthenticator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,6 +16,8 @@
package org.glassfish.jersey.jdk.connector.internal;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
+
import java.nio.charset.Charset;
import java.util.Base64;
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ProxyDigestAuthenticator.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ProxyDigestAuthenticator.java
index b47d508..31de2dd 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ProxyDigestAuthenticator.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ProxyDigestAuthenticator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,6 +16,8 @@
package org.glassfish.jersey.jdk.connector.internal;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
+
import java.io.IOException;
import java.net.URI;
import java.nio.charset.Charset;
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ProxyFilter.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ProxyFilter.java
index 6ca75b0..9dbf409 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ProxyFilter.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ProxyFilter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,6 +16,8 @@
package org.glassfish.jersey.jdk.connector.internal;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
+
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/RedirectHandler.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/RedirectHandler.java
index 889632a..ea1ea4c 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/RedirectHandler.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/RedirectHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,6 +16,8 @@
package org.glassfish.jersey.jdk.connector.internal;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
+
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/SslFilter.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/SslFilter.java
index 979a9ce..e503101 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/SslFilter.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/SslFilter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -17,6 +17,7 @@
package org.glassfish.jersey.jdk.connector.internal;
import org.glassfish.jersey.client.innate.http.SSLParamConfigurator;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
import java.nio.ByteBuffer;
import java.nio.Buffer;
@@ -40,7 +41,7 @@
Method doHandshakeStep must be synchronized, because it might be entered both by writing and reading thread
during re-handshake. Write, close and re-handshake cannot be done concurrently, because all those operations might
- do SSLEngine#wrap. Read can be be done concurrently with any other operation, because even thought re-handshake
+ do SSLEngine#wrap. Read can be done concurrently with any other operation, because even thought re-handshake
can do SSLEngine#unwrap, it won't do so if it was entered from write operation.
Operations upstreamFilter#onRead cannot be done while holding a lock of this class. Doing so might lead to a deadlock. An
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ThreadPoolConfig.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ThreadPoolConfig.java
index 0b02290..dda4745 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ThreadPoolConfig.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/ThreadPoolConfig.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,6 +16,8 @@
package org.glassfish.jersey.jdk.connector.internal;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
+
import java.util.Queue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/TransferEncodingParser.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/TransferEncodingParser.java
index 1a94ff7..630644f 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/TransferEncodingParser.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/TransferEncodingParser.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,6 +16,8 @@
package org.glassfish.jersey.jdk.connector.internal;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
+
import java.nio.ByteBuffer;
import java.nio.Buffer;
diff --git a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/TransportFilter.java b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/TransportFilter.java
index fde8298..a5dba36 100644
--- a/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/TransportFilter.java
+++ b/connectors/jdk-connector/src/main/java/org/glassfish/jersey/jdk/connector/internal/TransportFilter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,6 +16,8 @@
package org.glassfish.jersey.jdk.connector.internal;
+import org.glassfish.jersey.jdk.connector.internal.l10n.LocalizationMessages;
+
import java.io.IOException;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
diff --git a/connectors/jdk-connector/src/main/resources/org/glassfish/jersey/jdk/connector/internal/localization.properties b/connectors/jdk-connector/src/main/resources/org/glassfish/jersey/jdk/connector/internal/l10n/localization.properties
similarity index 98%
rename from connectors/jdk-connector/src/main/resources/org/glassfish/jersey/jdk/connector/internal/localization.properties
rename to connectors/jdk-connector/src/main/resources/org/glassfish/jersey/jdk/connector/internal/l10n/localization.properties
index 0d78e71..e9c6deb 100644
--- a/connectors/jdk-connector/src/main/resources/org/glassfish/jersey/jdk/connector/internal/localization.properties
+++ b/connectors/jdk-connector/src/main/resources/org/glassfish/jersey/jdk/connector/internal/l10n/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/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..b5650fd
--- /dev/null
+++ b/connectors/jdk-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.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.grizzly.http;
+ requires org.glassfish.grizzly.http.server;
+
+ 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 0d4b6ce..52cbddc 100644
--- a/connectors/jetty-connector/pom.xml
+++ b/connectors/jetty-connector/pom.xml
@@ -34,6 +34,9 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <surefire.coverage.argline>
+ --add-modules=ALL-MODULE-PATH
+ </surefire.coverage.argline>
</properties>
<dependencies>
@@ -47,7 +50,6 @@
</exclusion>
</exclusions>
</dependency>
-
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-jaxb</artifactId>
@@ -64,12 +66,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>
@@ -82,6 +96,17 @@
<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>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
</dependencies>
<build>
diff --git a/connectors/jetty-connector/src/main/java/module-info.java b/connectors/jetty-connector/src/main/java/module-info.java
new file mode 100644
index 0000000..41d7d8c
--- /dev/null
+++ b/connectors/jetty-connector/src/main/java/module-info.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2022, 2025 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.jetty.connector {
+ requires java.logging;
+ requires org.slf4j;
+
+ requires jakarta.ws.rs;
+
+ requires org.eclipse.jetty.client;
+ requires org.eclipse.jetty.http;
+ requires org.eclipse.jetty.io;
+ requires org.eclipse.jetty.util;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+
+ exports org.glassfish.jersey.jetty.connector;
+ opens org.glassfish.jersey.jetty.connector;
+}
\ No newline at end of file
diff --git a/connectors/jetty-connector/src/test/java/module-info.java b/connectors/jetty-connector/src/test/java/module-info.java
new file mode 100644
index 0000000..e67eb51
--- /dev/null
+++ b/connectors/jetty-connector/src/test/java/module-info.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2023, 2025 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.jetty.connector {
+ requires java.logging;
+
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires org.eclipse.jetty.server;
+ requires org.eclipse.jetty.client;
+ 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.connector;
+ opens org.glassfish.jersey.jetty.connector;
+}
\ No newline at end of file
diff --git a/connectors/jetty-http2-connector/pom.xml b/connectors/jetty-http2-connector/pom.xml
index 9bc4145..5e6ec4c 100644
--- a/connectors/jetty-http2-connector/pom.xml
+++ b/connectors/jetty-http2-connector/pom.xml
@@ -40,6 +40,12 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-client</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
diff --git a/connectors/jetty-http2-connector/src/main/java/module-info.java b/connectors/jetty-http2-connector/src/main/java/module-info.java
new file mode 100644
index 0000000..942d478
--- /dev/null
+++ b/connectors/jetty-http2-connector/src/main/java/module-info.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2023, 2025 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.jetty.http2.connector {
+
+ requires jakarta.ws.rs;
+
+ requires org.eclipse.jetty.client;
+ requires org.eclipse.jetty.http2.client;
+ requires org.eclipse.jetty.http2.client.transport;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.jetty.connector;
+
+ exports org.glassfish.jersey.jetty.http2.connector;
+ opens org.glassfish.jersey.jetty.http2.connector;
+}
\ No newline at end of file
diff --git a/connectors/jetty-http2-connector/src/test/java/module-info.java b/connectors/jetty-http2-connector/src/test/java/module-info.java
new file mode 100644
index 0000000..ab3f5a5
--- /dev/null
+++ b/connectors/jetty-http2-connector/src/test/java/module-info.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2023, 2025 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.jetty.http2.connector {
+
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires java.logging;
+
+ requires org.eclipse.jetty.client;
+ requires org.eclipse.jetty.http2.client;
+ requires org.eclipse.jetty.http2.client.transport;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.jetty.connector;
+ requires org.glassfish.jersey.media.json.jackson;
+
+ requires org.junit.jupiter.api;
+ requires org.hamcrest;
+
+ requires org.glassfish.jersey.tests.framework.core;
+
+ exports org.glassfish.jersey.jetty.http2.connector;
+ opens org.glassfish.jersey.jetty.http2.connector;
+}
\ No newline at end of file
diff --git a/connectors/jetty11-connector/src/main/java/module-info.java b/connectors/jetty11-connector/src/main/java/module-info.java
new file mode 100644
index 0000000..62dbbb8
--- /dev/null
+++ b/connectors/jetty11-connector/src/main/java/module-info.java
@@ -0,0 +1,32 @@
+/*
+ * 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.jetty11.connector {
+ requires java.logging;
+
+ requires jakarta.ws.rs;
+
+ requires org.eclipse.jetty.client;
+ requires org.eclipse.jetty.http;
+ requires org.eclipse.jetty.io;
+ requires org.eclipse.jetty.util;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+
+ exports org.glassfish.jersey.jetty.connector;
+ opens org.glassfish.jersey.jetty.connector;
+}
\ No newline at end of file
diff --git a/connectors/jetty11-connector/src/test/java/module-info.java b/connectors/jetty11-connector/src/test/java/module-info.java
new file mode 100644
index 0000000..eb47e83
--- /dev/null
+++ b/connectors/jetty11-connector/src/test/java/module-info.java
@@ -0,0 +1,43 @@
+/*
+ * 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.jetty11.connector {
+ requires java.logging;
+
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ 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.connector;
+ opens org.glassfish.jersey.jetty.connector;
+}
\ No newline at end of file
diff --git a/connectors/jnh-connector/pom.xml b/connectors/jnh-connector/pom.xml
index 1df2484..9368936 100644
--- a/connectors/jnh-connector/pom.xml
+++ b/connectors/jnh-connector/pom.xml
@@ -39,10 +39,15 @@
<dependencies>
<dependency>
- <groupId>org.glassfish.jersey.test-framework.providers</groupId>
- <artifactId>jersey-test-framework-provider-bundle</artifactId>
+ <groupId>org.glassfish.jersey.containers</groupId>
+ <artifactId>jersey-container-grizzly2-http</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/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java b/connectors/jnh-connector/src/main/java/module-info.java
similarity index 60%
copy from tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
copy to connectors/jnh-connector/src/main/java/module-info.java
index e389cff..3c099b6 100644
--- a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
+++ b/connectors/jnh-connector/src/main/java/module-info.java
@@ -14,22 +14,15 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.e2e.inject.cdi.se.j6000;
+module org.glassfish.jersey.jnh.connector {
+ requires java.logging;
+ requires java.net.http;
-import jakarta.inject.Inject;
-import jakarta.ws.rs.GET;
-import jakarta.ws.rs.Path;
-import jakarta.ws.rs.Produces;
-import jakarta.ws.rs.core.MediaType;
-import jakarta.ws.rs.core.Response;
+ requires jakarta.ws.rs;
-@Path("/ping")
-public class PingApi {
- private @Inject PingService delegate;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.common;
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response ping() {
- return this.delegate.ping();
- }
+ exports org.glassfish.jersey.jnh.connector;
+ opens org.glassfish.jersey.jnh.connector;
}
\ No newline at end of file
diff --git a/connectors/jnh-connector/src/test/java/module-info.java b/connectors/jnh-connector/src/test/java/module-info.java
new file mode 100644
index 0000000..e1b8bce
--- /dev/null
+++ b/connectors/jnh-connector/src/test/java/module-info.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2025 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.jnh.connector.test {
+ requires java.logging;
+ requires java.net.http;
+
+ requires jakarta.ws.rs;
+ requires jakarta.inject;
+ requires jakarta.xml.bind;
+ requires static jakarta.activation;
+
+ requires osgi.resource.locator;
+
+ requires org.assertj.core;
+ requires org.junit.jupiter.api;
+ requires org.junit.jupiter.engine;
+
+ requires awaitility;
+
+ requires org.glassfish.grizzly.http;
+ requires org.glassfish.grizzly.http.server;
+
+ 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;
+ requires org.glassfish.jersey.jnh.connector;
+ requires org.glassfish.jersey.media.json.jackson;
+
+ exports org.glassfish.jersey.jnh.connector.test;
+ opens org.glassfish.jersey.jnh.connector.test;
+}
\ No newline at end of file
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/AbstractJavaConnectorTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/AbstractJavaConnectorTest.java
similarity index 93%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/AbstractJavaConnectorTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/AbstractJavaConnectorTest.java
index 6d6e3c0..1202518 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/AbstractJavaConnectorTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/AbstractJavaConnectorTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.DefaultValue;
@@ -30,6 +30,8 @@
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnector;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
@@ -87,7 +89,7 @@
asyncResponse.setTimeout(timeoutSeconds, TimeUnit.SECONDS);
CompletableFuture.runAsync(() -> {
try {
- Thread.sleep(3000);
+ Thread.sleep(2000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e);
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/AsyncTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/AsyncTest.java
similarity index 93%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/AsyncTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/AsyncTest.java
index 2df4ad4..3c6bfa9 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/AsyncTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/AsyncTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import jakarta.ws.rs.client.Entity;
import jakarta.ws.rs.core.Response;
@@ -34,7 +34,7 @@
public class AsyncTest extends AbstractJavaConnectorTest {
/**
* Checks, that 3 interleaved requests all complete and return their associated responses.
- * Additionally checks, that all requests complete in 3 times the running time on the server.
+ * Additionally, checks, that all requests complete in 3 times the running time on the server.
*/
@Test
public void testAsyncRequestsWithoutTimeout() {
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/AuthTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/AuthTest.java
similarity index 96%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/AuthTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/AuthTest.java
index 677d4d0..28f75c8 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/AuthTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/AuthTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import jakarta.inject.Singleton;
import jakarta.ws.rs.DELETE;
@@ -30,6 +30,8 @@
import jakarta.ws.rs.core.HttpHeaders;
import jakarta.ws.rs.core.Response;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpClientProperties;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/BodyPublisherTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/BodyPublisherTest.java
similarity index 94%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/BodyPublisherTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/BodyPublisherTest.java
index b57107c..f6cdaba 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/BodyPublisherTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/BodyPublisherTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import jakarta.ws.rs.client.Entity;
import jakarta.ws.rs.core.MediaType;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/CookieTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/CookieTest.java
similarity index 93%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/CookieTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/CookieTest.java
index 31eda93..1b6c005 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/CookieTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/CookieTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
@@ -30,6 +30,9 @@
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.JerseyClient;
import org.glassfish.jersey.client.JerseyClientBuilder;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpClientProperties;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnector;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/EntityTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/EntityTest.java
similarity index 96%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/EntityTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/EntityTest.java
index f1af21c..1b207d8 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/EntityTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/EntityTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.POST;
@@ -26,6 +26,7 @@
import jakarta.xml.bind.annotation.XmlRootElement;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.jackson.JacksonFeature;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/ErrorTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/ErrorTest.java
similarity index 95%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/ErrorTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/ErrorTest.java
index 960f063..2bca761 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/ErrorTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/ErrorTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import jakarta.ws.rs.ClientErrorException;
import jakarta.ws.rs.POST;
@@ -24,6 +24,7 @@
import jakarta.ws.rs.core.Application;
import jakarta.ws.rs.core.Response;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/FirstByteCachingStreamTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/FirstByteCachingStreamTest.java
similarity index 97%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/FirstByteCachingStreamTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/FirstByteCachingStreamTest.java
index d645018..4a82272 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/FirstByteCachingStreamTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/FirstByteCachingStreamTest.java
@@ -14,8 +14,9 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnector;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/FollowRedirectsTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/FollowRedirectsTest.java
similarity index 96%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/FollowRedirectsTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/FollowRedirectsTest.java
index f6432a3..c751155 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/FollowRedirectsTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/FollowRedirectsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
@@ -30,6 +30,7 @@
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.ClientResponse;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/GZIPContentEncodingTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/GZIPContentEncodingTest.java
similarity index 94%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/GZIPContentEncodingTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/GZIPContentEncodingTest.java
index 8d94f25..f44eb25 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/GZIPContentEncodingTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/GZIPContentEncodingTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
@@ -27,6 +27,7 @@
import jakarta.ws.rs.core.Response;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.message.GZipEncoder;
import org.glassfish.jersey.server.ResourceConfig;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/HelloWorldTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/HelloWorldTest.java
similarity index 96%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/HelloWorldTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/HelloWorldTest.java
index 5143ec7..f941a3d 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/HelloWorldTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/HelloWorldTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -29,6 +29,7 @@
import jakarta.ws.rs.core.Response;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/Http2PresenceTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/Http2PresenceTest.java
similarity index 91%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/Http2PresenceTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/Http2PresenceTest.java
index a2eaa3b..b8bd7c6 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/Http2PresenceTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/Http2PresenceTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2023, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
@@ -23,6 +23,8 @@
import jakarta.ws.rs.core.HttpHeaders;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.spi.ConnectorProvider;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpClientProperties;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/HttpHeadersTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/HttpHeadersTest.java
similarity index 94%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/HttpHeadersTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/HttpHeadersTest.java
index 550183c..b01a15b 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/HttpHeadersTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/HttpHeadersTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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,9 +14,10 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/HttpsTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/HttpsTest.java
similarity index 94%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/HttpsTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/HttpsTest.java
index 4f6a035..bd97875 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/HttpsTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/HttpsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import java.net.URI;
import java.util.Optional;
@@ -24,6 +24,7 @@
import javax.net.ssl.SSLParameters;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/ManagedClientTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/ManagedClientTest.java
similarity index 97%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/ManagedClientTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/ManagedClientTest.java
index 8eca289..d6099ec 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/ManagedClientTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/ManagedClientTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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,9 +14,10 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ClientBinding;
import org.glassfish.jersey.server.ResourceConfig;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/MethodTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/MethodTest.java
similarity index 95%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/MethodTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/MethodTest.java
index a4837ee..06202c7 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/MethodTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/MethodTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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,9 +14,10 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/NoEntityTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/NoEntityTest.java
similarity index 94%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/NoEntityTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/NoEntityTest.java
index 6635a61..9b316f1 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/NoEntityTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/NoEntityTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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,10 +14,11 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import jakarta.ws.rs.core.GenericType;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/OptionsMethodTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/OptionsMethodTest.java
similarity index 91%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/OptionsMethodTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/OptionsMethodTest.java
index a333bd1..a79949b 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/OptionsMethodTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/OptionsMethodTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import jakarta.ws.rs.core.Response;
import org.junit.jupiter.api.Test;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/RedirectTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/RedirectTest.java
similarity index 93%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/RedirectTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/RedirectTest.java
index e1edc24..61fbe10 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/RedirectTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/RedirectTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import jakarta.ws.rs.core.Response;
import org.glassfish.jersey.client.ClientProperties;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/RetrieveHttpClientFromConnectorProviderTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/RetrieveHttpClientFromConnectorProviderTest.java
similarity index 89%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/RetrieveHttpClientFromConnectorProviderTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/RetrieveHttpClientFromConnectorProviderTest.java
index 8592bd7..8a19fcc 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/RetrieveHttpClientFromConnectorProviderTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/RetrieveHttpClientFromConnectorProviderTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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,8 +14,9 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.junit.jupiter.api.Test;
import java.net.http.HttpClient;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/SslUtils.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/SslUtils.java
similarity index 97%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/SslUtils.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/SslUtils.java
index 469959a..0c40d45 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/SslUtils.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/SslUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import javax.net.ssl.KeyManager;
import javax.net.ssl.KeyManagerFactory;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/TimeoutTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/TimeoutTest.java
similarity index 95%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/TimeoutTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/TimeoutTest.java
index b32f122..1ba6d0a 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/TimeoutTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/TimeoutTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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,10 +14,11 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
@@ -36,7 +37,6 @@
import jakarta.ws.rs.core.Response;
import org.junit.jupiter.api.Test;
-import static org.hamcrest.CoreMatchers.instanceOf;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.fail;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/TraceSupportTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/TraceSupportTest.java
similarity index 97%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/TraceSupportTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/TraceSupportTest.java
index b8a079a..78f752d 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/TraceSupportTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/TraceSupportTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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,9 +14,10 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.process.Inflector;
import org.glassfish.jersey.server.ContainerRequest;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/UnderlyingHttpClientAccessTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/UnderlyingHttpClientAccessTest.java
similarity index 92%
rename from connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/UnderlyingHttpClientAccessTest.java
rename to connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/UnderlyingHttpClientAccessTest.java
index 8bf9f46..bd92b3e 100644
--- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/UnderlyingHttpClientAccessTest.java
+++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/UnderlyingHttpClientAccessTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2025 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.jnh.connector;
+package org.glassfish.jersey.jnh.connector.test;
import org.glassfish.jersey.client.ClientConfig;
@@ -23,6 +23,7 @@
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.client.ClientBuilder;
import jakarta.ws.rs.client.WebTarget;
+import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertNotNull;
diff --git a/connectors/netty-connector/pom.xml b/connectors/netty-connector/pom.xml
index f174145..28bb733 100644
--- a/connectors/netty-connector/pom.xml
+++ b/connectors/netty-connector/pom.xml
@@ -34,14 +34,34 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <surefire.coverage.argline>--add-opens java.base/java.lang=ALL-UNNAMED
- --add-opens java.base/java.lang.reflect=ALL-UNNAMED</surefire.coverage.argline>
+ <surefire.coverage.argline>
+ --add-opens org.glassfish.jersey.core.common/org.glassfish.jersey.innate=ALL-UNNAMED
+ --add-opens org.glassfish.jersey.core.common/org.glassfish.jersey.innate.inject=ALL-UNNAMED
+ --add-opens org.glassfish.jersey.core.common/org.glassfish.jersey.innate.virtual=ALL-UNNAMED
+ --add-opens java.base/java.lang=org.glassfish.jersey.netty.connector
+ --add-opens java.base/java.lang.reflect=org.glassfish.jersey.netty.connector
+ --add-opens java.base/java.lang=ALL-UNNAMED
+ --add-opens java.base/java.lang.reflect=ALL-UNNAMED
+ --add-exports org.glassfish.jersey.core.common/org.glassfish.jersey.innate=ALL-UNNAMED
+ --add-modules=ALL-MODULE-PATH
+ </surefire.coverage.argline>
</properties>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
+ <exclusions>
+ <!-- package conflict -->
+ <exclusion>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-codec-xml</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-handler-ssl-ocsp</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
@@ -52,11 +72,22 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-server</artifactId>
+ <version>${project.version}</version>
+<!-- <scope>test</scope>-->
+ </dependency>
+ <dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-jetty</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
@@ -82,5 +113,4 @@
</plugin>
</plugins>
</build>
-
</project>
diff --git a/connectors/netty-connector/src/main/java/module-info.java b/connectors/netty-connector/src/main/java/module-info.java
new file mode 100644
index 0000000..48b0a1f
--- /dev/null
+++ b/connectors/netty-connector/src/main/java/module-info.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2022, 2025 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.netty.connector {
+ requires java.logging;
+
+ requires jakarta.ws.rs;
+ requires jakarta.inject;
+
+ requires io.netty.all;
+ requires io.netty.buffer;
+ requires io.netty.handler;
+ requires io.netty.handler.proxy;
+ requires io.netty.codec;
+ requires io.netty.codec.http;
+ requires io.netty.codec.http2;
+ requires io.netty.common;
+ requires io.netty.resolver;
+ requires io.netty.transport;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.server;
+
+ exports org.glassfish.jersey.netty.connector;
+ exports org.glassfish.jersey.netty.connector.internal to org.glassfish.jersey.container.netty.http;
+
+ opens org.glassfish.jersey.netty.connector;
+}
\ No newline at end of file
diff --git a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/JerseyClientHandler.java b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/JerseyClientHandler.java
index 1efebc2..29e48b3 100644
--- a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/JerseyClientHandler.java
+++ b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/JerseyClientHandler.java
@@ -16,7 +16,6 @@
package org.glassfish.jersey.netty.connector;
-import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.URI;
import java.util.Locale;
diff --git a/containers/glassfish/jersey-gf-ejb/pom.xml b/containers/glassfish/jersey-gf-ejb/pom.xml
index d82c591..74036fa 100644
--- a/containers/glassfish/jersey-gf-ejb/pom.xml
+++ b/containers/glassfish/jersey-gf-ejb/pom.xml
@@ -63,6 +63,12 @@
</dependency>
<!-- TODO remove versions when org.glassfish.exousia:exousia:jar in central-->
<dependency>
+ <groupId>org.glassfish.jersey.inject</groupId>
+ <artifactId>jersey-hk2</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.glassfish.main.ejb</groupId>
<artifactId>ejb-container</artifactId>
<version>6.0.0</version>
@@ -131,4 +137,4 @@
</plugin>
</plugins>
</build>
- </project>
+ </project>
\ No newline at end of file
diff --git a/containers/glassfish/jersey-gf-ejb/src/main/java/module-info.java b/containers/glassfish/jersey-gf-ejb/src/main/java/module-info.java
new file mode 100644
index 0000000..ff08ff0
--- /dev/null
+++ b/containers/glassfish/jersey-gf-ejb/src/main/java/module-info.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2022, 2025 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.gf.ejb {
+ requires java.logging;
+ requires java.naming;
+
+ requires jakarta.ws.rs;
+ requires static jakarta.activation;
+ requires jakarta.annotation;
+ requires jakarta.ejb;
+ requires jakarta.inject;
+ requires jakarta.interceptor;
+
+ requires ejb.container;
+ requires internal.api;
+ requires config.api;
+
+ requires org.glassfish.hk2.api;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.ext.cdi1x;
+ requires org.glassfish.jersey.inject.hk2;
+
+ exports org.glassfish.jersey.gf.ejb.internal;
+ opens org.glassfish.jersey.gf.ejb.internal;
+
+ provides org.glassfish.jersey.server.spi.ComponentProvider with
+ org.glassfish.jersey.gf.ejb.internal.EjbComponentProvider;
+}
\ No newline at end of file
diff --git a/containers/grizzly2-http/pom.xml b/containers/grizzly2-http/pom.xml
index 9e0eefa..f4588f8 100644
--- a/containers/grizzly2-http/pom.xml
+++ b/containers/grizzly2-http/pom.xml
@@ -47,6 +47,12 @@
<artifactId>jakarta.inject-api</artifactId>
</dependency>
<dependency>
+ <groupId>jakarta.xml.bind</groupId>
+ <artifactId>jakarta.xml.bind-api</artifactId>
+ <optional>true</optional>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-http-server</artifactId>
</dependency>
@@ -66,7 +72,6 @@
<artifactId>grizzly-npn-api</artifactId>
<scope>test</scope>
</dependency>
-
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-client</artifactId>
@@ -92,6 +97,22 @@
</dependencies>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-testCompile</id>
+ <configuration>
+ <source>11</source>
+ <target>11</target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>com.sun.istack</groupId>
@@ -146,4 +167,4 @@
</plugin>
</plugins>
</build>
-</project>
+</project>
\ No newline at end of file
diff --git a/containers/grizzly2-http/src/main/java/module-info.java b/containers/grizzly2-http/src/main/java/module-info.java
new file mode 100644
index 0000000..b9b9377
--- /dev/null
+++ b/containers/grizzly2-http/src/main/java/module-info.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2022, 2025 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.container.grizzly2.http {
+ requires java.logging;
+ requires java.net.http;
+
+ requires jakarta.ws.rs;
+ requires jakarta.inject;
+ requires static jakarta.xml.bind;
+
+ requires org.glassfish.grizzly;
+ requires org.glassfish.grizzly.http.server;
+ requires org.glassfish.grizzly.http;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+
+ exports org.glassfish.jersey.grizzly2.httpserver;
+ exports org.glassfish.jersey.grizzly2.httpserver.internal; // localization
+ opens org.glassfish.jersey.grizzly2.httpserver;
+ opens org.glassfish.jersey.grizzly2.httpserver.internal;
+
+ provides org.glassfish.jersey.innate.BootstrapPreinitialization with
+ org.glassfish.jersey.grizzly2.httpserver.GrizzlyBootstrapPreinitialization;
+ provides org.glassfish.jersey.server.spi.ContainerProvider with
+ org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainerProvider;
+ provides org.glassfish.jersey.server.spi.WebServerProvider with
+ org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerProvider;
+}
\ No newline at end of file
diff --git a/containers/grizzly2-http/src/main/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpContainer.java b/containers/grizzly2-http/src/main/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpContainer.java
index f86e909..438c5c5 100644
--- a/containers/grizzly2-http/src/main/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpContainer.java
+++ b/containers/grizzly2-http/src/main/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpContainer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2025 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
@@ -118,9 +118,11 @@
* Note that since Grizzly {@code Request} class is not proxiable as it does not expose an empty constructor,
* the injection of Grizzly request instance into singleton JAX-RS and Jersey providers is only supported via
* {@link jakarta.inject.Provider injection provider}.
+ * <p/>
+ * Note that since Jersey 4, Grizzly {@code Response} is also supported via
+ * {@link jakarta.inject.Provider injection provider} only for the java module reasons.
*/
static class GrizzlyBinder extends InternalBinder {
-
@Override
protected void configure() {
bindFactory(GrizzlyRequestReferencingFactory.class).to(Request.class)
@@ -131,7 +133,7 @@
.id(InjectionIds.GRIZZLY_REQUEST.id());
bindFactory(GrizzlyResponseReferencingFactory.class).to(Response.class)
- .proxy(true).proxyForSameScope(false).in(RequestScoped.class)
+ .proxy(false).in(RequestScoped.class)
.id(InjectionIds.GRIZZLY_RESPONSE_REFERENCING_FACTORY.id());
bindFactory(ReferencingFactory.<Response>referenceFactory()).to(new GenericType<Ref<Response>>() {})
.in(RequestScoped.class)
diff --git a/containers/grizzly2-http/src/test/java/module-info.java b/containers/grizzly2-http/src/test/java/module-info.java
new file mode 100644
index 0000000..bf57de9
--- /dev/null
+++ b/containers/grizzly2-http/src/test/java/module-info.java
@@ -0,0 +1,50 @@
+/*
+ * 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
+ * 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
+ */
+
+open module org.glassfish.jersey.container.grizzly2.http {
+
+ requires java.net.http;
+ requires java.logging;
+
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires org.eclipse.jetty.http2.client;
+ requires org.eclipse.jetty.http2.client.transport;
+
+ requires org.bouncycastle.provider;
+ requires org.bouncycastle.pkix;
+ requires org.eclipse.jetty.client;
+ requires org.hamcrest;
+ requires org.junit.jupiter.api;
+ requires org.junit.jupiter.engine;
+
+ requires org.glassfish.grizzly.http.server;
+ requires org.glassfish.grizzly;
+ requires org.glassfish.grizzly.http;
+ requires org.glassfish.grizzly.http2;
+
+ requires org.glassfish.hk2.api;
+ requires org.glassfish.hk2.locator;
+
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.inject.hk2;
+
+ exports org.glassfish.jersey.grizzly2.httpserver.test.application
+ to org.glassfish.jersey.core.server;
+}
\ No newline at end of file
diff --git a/containers/grizzly2-servlet/pom.xml b/containers/grizzly2-servlet/pom.xml
index d178535..0a7cfe3 100644
--- a/containers/grizzly2-servlet/pom.xml
+++ b/containers/grizzly2-servlet/pom.xml
@@ -79,6 +79,6 @@
<unpackBundle>true</unpackBundle>
</configuration>
</plugin>
- </plugins>
+ </plugins>
</build>
-</project>
+</project>
\ No newline at end of file
diff --git a/containers/grizzly2-servlet/src/main/java/module-info.java b/containers/grizzly2-servlet/src/main/java/module-info.java
new file mode 100644
index 0000000..d6a3668
--- /dev/null
+++ b/containers/grizzly2-servlet/src/main/java/module-info.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2022, 2025 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.container.grizzly2.servlet {
+ requires jakarta.ws.rs;
+ requires jakarta.servlet;
+
+ requires org.glassfish.grizzly.servlet;
+ requires org.glassfish.grizzly.http.server;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.container.servlet;
+ requires org.glassfish.jersey.container.grizzly2.http;
+
+ exports org.glassfish.jersey.grizzly2.servlet;
+ opens org.glassfish.jersey.grizzly2.servlet;
+}
\ No newline at end of file
diff --git a/containers/helidon/pom.xml b/containers/helidon/pom.xml
index f54f975..a54fb51 100644
--- a/containers/helidon/pom.xml
+++ b/containers/helidon/pom.xml
@@ -91,6 +91,16 @@
<artifactId>build-helper-maven-plugin</artifactId>
<inherited>true</inherited>
</plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <instructions>
+ <Automatic-Module-Name>org.glassfish.jersey.container.helidon</Automatic-Module-Name>
+ </instructions>
+ </configuration>
+ </plugin>
</plugins>
<resources>
diff --git a/containers/jdk-http/pom.xml b/containers/jdk-http/pom.xml
index 50185e7..b54a400 100644
--- a/containers/jdk-http/pom.xml
+++ b/containers/jdk-http/pom.xml
@@ -38,6 +38,12 @@
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>jakarta.xml.bind</groupId>
+ <artifactId>jakarta.xml.bind-api</artifactId>
+ <optional>true</optional>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
@@ -78,4 +84,4 @@
<!-- https://bugs.openjdk.java.net/browse/JDK-8211426 -->
<surefire.security.argline>-Djdk.tls.client.protocols=TLSv1.2</surefire.security.argline>
</properties>
-</project>
+</project>
\ No newline at end of file
diff --git a/containers/jdk-http/src/main/java/module-info.java b/containers/jdk-http/src/main/java/module-info.java
new file mode 100644
index 0000000..812b63a
--- /dev/null
+++ b/containers/jdk-http/src/main/java/module-info.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2022, 2025 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.container.jdk.http {
+ requires java.logging;
+
+ requires jdk.httpserver;
+
+ requires jakarta.ws.rs;
+ requires static jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+
+ exports org.glassfish.jersey.jdkhttp;
+ exports org.glassfish.jersey.jdkhttp.internal; // localization
+ opens org.glassfish.jersey.jdkhttp;
+ opens org.glassfish.jersey.jdkhttp.internal;
+
+ provides org.glassfish.jersey.server.spi.ContainerProvider with
+ org.glassfish.jersey.jdkhttp.JdkHttpHandlerContainerProvider;
+ provides org.glassfish.jersey.server.spi.WebServerProvider with
+ org.glassfish.jersey.jdkhttp.JdkHttpServerProvider;
+}
\ No newline at end of file
diff --git a/containers/jdk-http/src/test/java/org/glassfish/jersey/jdkhttp/JdkHttpsServerTest.java b/containers/jdk-http/src/test/java/org/glassfish/jersey/jdkhttp/JdkHttpsServerTest.java
index a0d978b..6e14841 100644
--- a/containers/jdk-http/src/test/java/org/glassfish/jersey/jdkhttp/JdkHttpsServerTest.java
+++ b/containers/jdk-http/src/test/java/org/glassfish/jersey/jdkhttp/JdkHttpsServerTest.java
@@ -55,14 +55,14 @@
*/
public class JdkHttpsServerTest extends AbstractJdkHttpServerTester {
- private static final String TRUSTSTORE_CLIENT_FILE = "./truststore_client";
+ private static final String TRUSTSTORE_CLIENT_FILE = "truststore_client";
private static final String TRUSTSTORE_CLIENT_PWD = "asdfgh";
- private static final String KEYSTORE_CLIENT_FILE = "./keystore_client";
+ private static final String KEYSTORE_CLIENT_FILE = "keystore_client";
private static final String KEYSTORE_CLIENT_PWD = "asdfgh";
- private static final String KEYSTORE_SERVER_FILE = "./keystore_server";
+ private static final String KEYSTORE_SERVER_FILE = "keystore_server";
private static final String KEYSTORE_SERVER_PWD = "asdfgh";
- private static final String TRUSTSTORE_SERVER_FILE = "./truststore_server";
+ private static final String TRUSTSTORE_SERVER_FILE = "truststore_server";
private static final String TRUSTSTORE_SERVER_PWD = "asdfgh";
private HttpServer server;
@@ -228,4 +228,4 @@
server = null;
}
}
-}
\ No newline at end of file
+}
diff --git a/containers/jersey-servlet/src/main/java/module-info.java b/containers/jersey-servlet/src/main/java/module-info.java
new file mode 100644
index 0000000..4e03f6b
--- /dev/null
+++ b/containers/jersey-servlet/src/main/java/module-info.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2022, 2025 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.container.servlet {
+ requires java.logging;
+ requires java.naming;
+
+ requires jakarta.inject;
+ requires static jakarta.persistence;
+ requires jakarta.ws.rs;
+ requires static jakarta.servlet;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+
+ exports org.glassfish.jersey.servlet.async;
+ exports org.glassfish.jersey.servlet.init;
+ exports org.glassfish.jersey.servlet.internal.l10n;
+ exports org.glassfish.jersey.servlet.internal.spi; //
+ exports org.glassfish.jersey.servlet.spi;
+ exports org.glassfish.jersey.servlet;
+
+ opens org.glassfish.jersey.servlet;
+ opens org.glassfish.jersey.servlet.async;
+ opens org.glassfish.jersey.servlet.init;
+ opens org.glassfish.jersey.servlet.internal.spi;
+ opens org.glassfish.jersey.servlet.internal.l10n;
+ opens org.glassfish.jersey.servlet.spi;
+
+ uses org.glassfish.jersey.servlet.spi.AsyncContextDelegate;
+ uses org.glassfish.jersey.servlet.spi.AsyncContextDelegateProvider;
+ uses org.glassfish.jersey.servlet.spi.FilterUrlMappingsProvider;
+
+ provides org.glassfish.jersey.servlet.spi.AsyncContextDelegateProvider with
+ org.glassfish.jersey.servlet.async.AsyncContextDelegateProviderImpl;
+ provides org.glassfish.jersey.servlet.spi.FilterUrlMappingsProvider with
+ org.glassfish.jersey.servlet.init.FilterUrlMappingsProviderImpl;
+}
\ No newline at end of file
diff --git a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/ServletContainer.java b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/ServletContainer.java
index 718f34b..092103a 100644
--- a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/ServletContainer.java
+++ b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/ServletContainer.java
@@ -40,7 +40,7 @@
import org.glassfish.jersey.server.internal.ContainerUtils;
import org.glassfish.jersey.server.spi.Container;
import org.glassfish.jersey.server.spi.ContainerLifecycleListener;
-import org.glassfish.jersey.servlet.internal.LocalizationMessages;
+import org.glassfish.jersey.servlet.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.servlet.internal.ResponseWriter;
import org.glassfish.jersey.servlet.spi.FilterUrlMappingsProvider;
import org.glassfish.jersey.uri.UriComponent;
diff --git a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/WebComponent.java b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/WebComponent.java
index a0dd29b..f6d66b7 100644
--- a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/WebComponent.java
+++ b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/WebComponent.java
@@ -35,7 +35,7 @@
import jakarta.ws.rs.core.SecurityContext;
import org.glassfish.jersey.innate.inject.InjectionIds;
import org.glassfish.jersey.innate.inject.InternalBinder;
-import org.glassfish.jersey.innate.inject.ServiceFinderBinder;
+import org.glassfish.jersey.internal.ServiceFinderBinder;
import org.glassfish.jersey.innate.io.InputStreamWrapper;
import org.glassfish.jersey.internal.inject.InjectionManager;
import org.glassfish.jersey.internal.inject.Providers;
@@ -54,7 +54,7 @@
import org.glassfish.jersey.server.ServerProperties;
import org.glassfish.jersey.server.internal.InternalServerProperties;
import org.glassfish.jersey.server.spi.RequestScopedInitializer;
-import org.glassfish.jersey.servlet.internal.LocalizationMessages;
+import org.glassfish.jersey.servlet.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.servlet.internal.PersistenceUnitBinder;
import org.glassfish.jersey.servlet.internal.ResponseWriter;
import org.glassfish.jersey.servlet.internal.ServletContainerProviderFactory;
diff --git a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/async/AsyncContextDelegateProviderImpl.java b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/async/AsyncContextDelegateProviderImpl.java
index ade7c29..d077f54 100644
--- a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/async/AsyncContextDelegateProviderImpl.java
+++ b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/async/AsyncContextDelegateProviderImpl.java
@@ -28,7 +28,7 @@
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
-import org.glassfish.jersey.servlet.internal.LocalizationMessages;
+import org.glassfish.jersey.servlet.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.servlet.spi.AsyncContextDelegate;
import org.glassfish.jersey.servlet.spi.AsyncContextDelegateProvider;
diff --git a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/init/JerseyServletContainerInitializer.java b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/init/JerseyServletContainerInitializer.java
index bf99736..16ee30d 100644
--- a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/init/JerseyServletContainerInitializer.java
+++ b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/init/JerseyServletContainerInitializer.java
@@ -42,7 +42,7 @@
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.servlet.ServletContainer;
import org.glassfish.jersey.servlet.ServletProperties;
-import org.glassfish.jersey.servlet.internal.LocalizationMessages;
+import org.glassfish.jersey.servlet.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.servlet.internal.ServletContainerProviderFactory;
import org.glassfish.jersey.servlet.internal.Utils;
import org.glassfish.jersey.servlet.internal.spi.ServletContainerProvider;
diff --git a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/internal/PersistenceUnitBinder.java b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/internal/PersistenceUnitBinder.java
index 1c85564..43833f3 100644
--- a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/internal/PersistenceUnitBinder.java
+++ b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/internal/PersistenceUnitBinder.java
@@ -26,6 +26,7 @@
import org.glassfish.jersey.internal.inject.Injectee;
import org.glassfish.jersey.internal.inject.InjectionResolver;
import org.glassfish.jersey.server.ContainerException;
+import org.glassfish.jersey.servlet.internal.l10n.LocalizationMessages;
import java.lang.reflect.Proxy;
import java.util.Enumeration;
diff --git a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/internal/ResponseWriter.java b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/internal/ResponseWriter.java
index 4cbd46a..ec7867d 100644
--- a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/internal/ResponseWriter.java
+++ b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/internal/ResponseWriter.java
@@ -37,6 +37,7 @@
import org.glassfish.jersey.server.ContainerResponse;
import org.glassfish.jersey.server.internal.JerseyRequestTimeoutHandler;
import org.glassfish.jersey.server.spi.ContainerResponseWriter;
+import org.glassfish.jersey.servlet.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.servlet.spi.AsyncContextDelegate;
/**
@@ -312,4 +313,4 @@
// do not close - let the servlet container close the stream
}
}
-}
+}
\ No newline at end of file
diff --git a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/internal/ThreadLocalInvoker.java b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/internal/ThreadLocalInvoker.java
index 909018f..d1dc964 100644
--- a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/internal/ThreadLocalInvoker.java
+++ b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/internal/ThreadLocalInvoker.java
@@ -16,6 +16,8 @@
package org.glassfish.jersey.servlet.internal;
+import org.glassfish.jersey.servlet.internal.l10n.LocalizationMessages;
+
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
diff --git a/containers/jersey-servlet/src/main/resources/org/glassfish/jersey/servlet/internal/localization.properties b/containers/jersey-servlet/src/main/resources/org/glassfish/jersey/servlet/internal/l10n/localization.properties
similarity index 100%
rename from containers/jersey-servlet/src/main/resources/org/glassfish/jersey/servlet/internal/localization.properties
rename to containers/jersey-servlet/src/main/resources/org/glassfish/jersey/servlet/internal/l10n/localization.properties
diff --git a/containers/jetty-http/pom.xml b/containers/jetty-http/pom.xml
index 1d81205..a55a174 100644
--- a/containers/jetty-http/pom.xml
+++ b/containers/jetty-http/pom.xml
@@ -72,6 +72,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.client5</groupId>
<artifactId>httpclient5</artifactId>
<scope>test</scope>
diff --git a/containers/jetty-http/src/main/java/module-info.java b/containers/jetty-http/src/main/java/module-info.java
new file mode 100644
index 0000000..97fbda9
--- /dev/null
+++ b/containers/jetty-http/src/main/java/module-info.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2022, 2025 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.container.jetty.http {
+ requires java.logging;
+
+ requires jakarta.ws.rs;
+ requires jakarta.inject;
+
+ requires org.eclipse.jetty.http;
+ requires org.eclipse.jetty.server;
+ requires org.eclipse.jetty.security;
+ requires org.eclipse.jetty.util;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+
+ exports org.glassfish.jersey.jetty;
+ exports org.glassfish.jersey.jetty.internal; // localization
+ opens org.glassfish.jersey.jetty;
+ opens org.glassfish.jersey.jetty.internal;
+
+ provides org.glassfish.jersey.server.spi.ContainerProvider with
+ org.glassfish.jersey.jetty.JettyHttpContainerProvider;
+ provides org.glassfish.jersey.server.spi.WebServerProvider with
+ org.glassfish.jersey.jetty.JettyHttpServerProvider;
+}
\ No newline at end of file
diff --git a/containers/jetty-http2/src/main/java/module-info.java b/containers/jetty-http2/src/main/java/module-info.java
new file mode 100644
index 0000000..1d6ddb6
--- /dev/null
+++ b/containers/jetty-http2/src/main/java/module-info.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2022, 2025 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.container.jetty.http2 {
+
+ requires jakarta.ws.rs;
+
+ requires org.eclipse.jetty.http2.server;
+ requires org.eclipse.jetty.alpn.server;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.container.jetty.http;
+
+ exports org.glassfish.jersey.jetty.http2;
+ opens org.glassfish.jersey.jetty.http2;
+
+ provides org.glassfish.jersey.server.spi.ContainerProvider with
+ org.glassfish.jersey.jetty.http2.JettyHttp2ContainerProvider;
+}
\ No newline at end of file
diff --git a/containers/jetty-http2/src/main/java/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerProvider.java b/containers/jetty-http2/src/main/java/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerProvider.java
index e0e5ec7..6880187 100644
--- a/containers/jetty-http2/src/main/java/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerProvider.java
+++ b/containers/jetty-http2/src/main/java/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2023, 2025 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,6 @@
import org.glassfish.jersey.internal.util.JdkVersion;
import org.glassfish.jersey.jetty.JettyHttpContainer;
import org.glassfish.jersey.jetty.JettyHttpContainerProvider;
-import org.glassfish.jersey.jetty.internal.LocalizationMessages;
import org.glassfish.jersey.server.spi.ContainerProvider;
import jakarta.ws.rs.ProcessingException;
diff --git a/containers/jetty-http2/src/test/java/module-info.java b/containers/jetty-http2/src/test/java/module-info.java
new file mode 100644
index 0000000..d8f20dd
--- /dev/null
+++ b/containers/jetty-http2/src/test/java/module-info.java
@@ -0,0 +1,34 @@
+/*
+ * 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
+ * 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.container.jetty.http2 {
+ requires java.logging;
+
+ requires jakarta.ws.rs;
+
+ requires org.eclipse.jetty.http2.server;
+ requires org.eclipse.jetty.alpn.server;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.container.jetty.http;
+
+ requires org.junit.jupiter.api;
+ requires org.hamcrest;
+
+ exports org.glassfish.jersey.jetty.http2;
+ opens org.glassfish.jersey.jetty.http2;
+}
\ No newline at end of file
diff --git a/containers/jetty-servlet/src/main/java/module-info.txt b/containers/jetty-servlet/src/main/java/module-info.txt
new file mode 100644
index 0000000..894f892
--- /dev/null
+++ b/containers/jetty-servlet/src/main/java/module-info.txt
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2022, 2025 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.container.jetty.servlet {
+
+ requires jakarta.ws.rs;
+// requires jakarta.servlet; //taken from jetty.servlet.api which is part of jetty server
+
+ requires org.eclipse.jetty.http;
+ requires org.eclipse.jetty.server;
+ requires org.eclipse.jetty.util;
+ requires org.eclipse.jetty.webapp;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.container.jetty.http;
+ requires static org.glassfish.jersey.container.servlet;
+
+ exports org.glassfish.jersey.jetty.servlet;
+}
\ No newline at end of file
diff --git a/containers/netty-http/pom.xml b/containers/netty-http/pom.xml
index a830c50..783e510 100644
--- a/containers/netty-http/pom.xml
+++ b/containers/netty-http/pom.xml
@@ -47,6 +47,12 @@
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>jakarta.xml.bind</groupId>
+ <artifactId>jakarta.xml.bind-api</artifactId>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
</dependencies>
<build>
@@ -69,4 +75,4 @@
</plugins>
</build>
-</project>
+</project>
\ No newline at end of file
diff --git a/containers/netty-http/src/main/java/module-info.java b/containers/netty-http/src/main/java/module-info.java
new file mode 100644
index 0000000..b8a6806
--- /dev/null
+++ b/containers/netty-http/src/main/java/module-info.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2022, 2025 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.container.netty.http {
+ requires java.logging;
+ requires jakarta.ws.rs;
+ requires io.netty.all;
+
+ requires static jakarta.xml.bind;
+
+ requires org.glassfish.jersey.netty.connector;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.core.common;
+
+ exports org.glassfish.jersey.netty.httpserver;
+ opens org.glassfish.jersey.netty.httpserver;
+
+ provides org.glassfish.jersey.server.spi.ContainerProvider with
+ org.glassfish.jersey.netty.httpserver.NettyHttpContainerProvider;
+ provides org.glassfish.jersey.server.spi.WebServerProvider with
+ org.glassfish.jersey.netty.httpserver.NettyHttpServerProvider;
+}
\ No newline at end of file
diff --git a/core-client/pom.xml b/core-client/pom.xml
index 483dce9..04eb6bd 100644
--- a/core-client/pom.xml
+++ b/core-client/pom.xml
@@ -33,6 +33,15 @@
<description>Jersey core client implementation</description>
+ <properties>
+ <surefire.coverage.argline>
+ --add-exports org.glassfish.jersey.core.common/org.glassfish.jersey.innate=ALL-UNNAMED
+ --add-exports org.glassfish.jersey.core.common/org.glassfish.jersey.innate.virtual=ALL-UNNAMED
+ --add-exports org.glassfish.jersey.core.common/org.glassfish.jersey.innate.io=ALL-UNNAMED
+ --add-exports org.glassfish.jersey.core.common/org.glassfish.jersey.innate.inject=ALL-UNNAMED
+ </surefire.coverage.argline>
+ </properties>
+
<build>
<plugins>
<plugin>
@@ -41,24 +50,36 @@
<inherited>true</inherited>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <inherited>true</inherited>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <inherited>false</inherited>
- <configuration>
- <source>${java.version}</source>
- <target>${java.version}</target>
- <compilerArguments>
- <!-- Do not warn about using sun.misc.Unsafe -->
- <XDignore.symbol.file />
- </compilerArguments>
- <showWarnings>false</showWarnings>
- <fork>false</fork>
- </configuration>
+ <executions>
+ <execution>
+ <id>default-compile</id>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <source>${java.version}</source>
+ <target>${java.version}</target>
+ <compilerArguments>
+ <!-- Do not warn about using sun.misc.Unsafe -->
+ <XDignore.symbol.file/>
+ </compilerArguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>default-testCompile</id>
+ <goals>
+ <goal>testCompile</goal>
+ </goals>
+ <configuration>
+ <compilerArgs>
+ <arg>--add-exports</arg>
+ <arg>org.glassfish.jersey.core.common/org.glassfish.jersey.innate.inject=ALL-UNNAMED</arg>
+ </compilerArgs>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -68,6 +89,7 @@
<parallel>classesAndMethods</parallel>
<perCoreThreadCount>true</perCoreThreadCount>
<threadCount>1</threadCount>
+ <forkCount>0</forkCount>
</configuration>
</plugin>
@@ -119,6 +141,19 @@
<artifactId>jakarta.inject-api</artifactId>
</dependency>
+<!--
+ <dependency>
+ <groupId>jakarta.xml.bind</groupId>
+ <artifactId>jakarta.xml.bind-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>jakarta.annotation</groupId>
+ <artifactId>jakarta.annotation-api</artifactId>
+ </dependency>
+-->
+
<dependency>
<!-- not to warn about missing activation -->
<groupId>org.eclipse.angus</groupId>
diff --git a/core-client/src/main/java/module-info.java b/core-client/src/main/java/module-info.java
new file mode 100644
index 0000000..5a2241d
--- /dev/null
+++ b/core-client/src/main/java/module-info.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2022, 2025 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.client {
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires java.logging;
+
+ requires org.glassfish.jersey.core.common;
+
+ exports org.glassfish.jersey.client;
+ exports org.glassfish.jersey.client.authentication;
+ exports org.glassfish.jersey.client.filter;
+ exports org.glassfish.jersey.client.http;
+ exports org.glassfish.jersey.client.inject;
+ exports org.glassfish.jersey.client.spi;
+ exports org.glassfish.jersey.client.internal;
+ exports org.glassfish.jersey.client.internal.inject to org.glassfish.jersey.incubator.cdi.inject.weld;
+
+ exports org.glassfish.jersey.client.innate to
+ org.glassfish.jersey.apache5.connector,
+ org.glassfish.jersey.netty.connector,
+ org.glassfish.jersey.grizzly.connector,
+ org.glassfish.jersey.jetty.connector,
+ org.glassfish.jersey.jnh.connector;
+
+ exports org.glassfish.jersey.client.innate.http to
+ org.glassfish.jersey.apache5.connector,
+ org.glassfish.jersey.netty.connector,
+ org.glassfish.jersey.grizzly.connector,
+ org.glassfish.jersey.jetty.connector,
+ org.glassfish.jersey.jdk.connector,
+ org.glassfish.jersey.jnh.connector;
+
+ exports org.glassfish.jersey.client.innate.inject to
+ org.glassfish.jersey.incubator.injectless.client;
+
+ opens org.glassfish.jersey.client;
+ opens org.glassfish.jersey.client.authentication;
+ opens org.glassfish.jersey.client.filter;
+ opens org.glassfish.jersey.client.http;
+ opens org.glassfish.jersey.client.inject;
+ opens org.glassfish.jersey.client.spi;
+
+ // for Localization messages
+ opens org.glassfish.jersey.client.internal;
+
+ uses org.glassfish.jersey.client.spi.ConnectorProvider;
+ uses org.glassfish.jersey.client.spi.DefaultSslContextProvider;
+
+ provides jakarta.ws.rs.client.ClientBuilder with
+ org.glassfish.jersey.client.JerseyClientBuilder;
+ provides org.glassfish.jersey.innate.BootstrapPreinitialization with
+ org.glassfish.jersey.client.ClientBootstrapPreinitialization;
+}
\ No newline at end of file
diff --git a/core-common/pom.xml b/core-common/pom.xml
index d1ae668..6229fb0 100644
--- a/core-common/pom.xml
+++ b/core-common/pom.xml
@@ -71,30 +71,14 @@
</resources>
<testResources>
- <testResource>
- <directory>${basedir}/src/test/resources</directory>
- <filtering>true</filtering>
- </testResource>
+ <testResource>
+ <directory>${basedir}/src/test/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
</testResources>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${compiler.common.mvn.plugin.version}</version>
- <inherited>false</inherited>
- <configuration>
- <source>${java.version}</source>
- <target>${java.version}</target>
- <compilerArguments>
- <!-- Do not warn about using sun.misc.Unsafe -->
- <XDignore.symbol.file />
- </compilerArguments>
- <showWarnings>false</showWarnings>
- <fork>false</fork>
- </configuration>
- </plugin>
- <plugin>
<groupId>com.sun.istack</groupId>
<artifactId>istack-commons-maven-plugin</artifactId>
<inherited>true</inherited>
@@ -226,6 +210,13 @@
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>jakarta.xml.bind</groupId>
+ <artifactId>jakarta.xml.bind-api</artifactId>
+ <scope>provided</scope>
+ <optional>true</optional>
</dependency>
<dependency>
<groupId>jakarta.inject</groupId>
@@ -294,7 +285,7 @@
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
- <id>add.java20-</id>
+ <id>add.java20+</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
diff --git a/core-common/src/main/java/module-info.java b/core-common/src/main/java/module-info.java
new file mode 100644
index 0000000..0ed83e4
--- /dev/null
+++ b/core-common/src/main/java/module-info.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2022, 2025 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.common {
+ requires jakarta.ws.rs;
+ requires jakarta.inject;
+ requires static jakarta.xml.bind;
+ requires static jakarta.activation;
+ requires jakarta.annotation;
+ requires java.logging;
+ requires static java.desktop;
+
+ // Filename-based auto-modules
+ requires static org.osgi.core;
+ requires static osgi.resource.locator;
+
+ exports org.glassfish.jersey;
+ exports org.glassfish.jersey.http;
+ exports org.glassfish.jersey.internal;
+ exports org.glassfish.jersey.internal.config to
+ org.glassfish.jersey.core.client,
+ org.glassfish.jersey.core.server,
+ org.glassfish.jersey.ext.mp.config;
+ exports org.glassfish.jersey.internal.guava;
+ exports org.glassfish.jersey.internal.inject;
+ exports org.glassfish.jersey.internal.l10n;
+ exports org.glassfish.jersey.internal.sonar;
+ exports org.glassfish.jersey.internal.spi;
+ exports org.glassfish.jersey.internal.routing; //
+ exports org.glassfish.jersey.internal.util;
+ exports org.glassfish.jersey.internal.util.collection;
+ exports org.glassfish.jersey.io.spi;
+ exports org.glassfish.jersey.logging;
+ exports org.glassfish.jersey.message;
+ exports org.glassfish.jersey.message.internal; // Providers
+ exports org.glassfish.jersey.model;
+ exports org.glassfish.jersey.model.internal;
+ exports org.glassfish.jersey.model.internal.spi;
+ exports org.glassfish.jersey.process;
+ exports org.glassfish.jersey.process.internal; // @RequestScoped
+ exports org.glassfish.jersey.spi;
+ exports org.glassfish.jersey.uri;
+ exports org.glassfish.jersey.uri.internal; // JerseyUriBuilder
+
+
+ exports org.glassfish.jersey.innate to org.glassfish.jersey.core.client,
+ org.glassfish.jersey.core.server,
+ org.glassfish.jersey.container.grizzly2.http,
+ org.glassfish.jersey.container.servlet,
+ org.glassfish.jersey.container.jetty.http,
+ org.glassfish.jersey.netty.connector,
+ org.glassfish.jersey.ext.mp.rest.client,
+ org.glassfish.jersey.inject.cdi2.se,
+ org.glassfish.jersey.incubator.cdi.inject.weld;
+
+ exports org.glassfish.jersey.innate.inject to
+ org.glassfish.jersey.inject.hk2,
+ org.glassfish.jersey.core.client,
+ org.glassfish.jersey.core.server,
+ org.glassfish.jersey.container.grizzly2.http,
+ org.glassfish.jersey.container.servlet,
+ org.glassfish.jersey.container.jetty.http,
+ org.glassfish.jersey.media.sse,
+ org.glassfish.jersey.media.jaxb,
+ org.glassfish.jersey.media.json.jackson,
+ org.glassfish.jersey.media.moxy,
+ org.glassfish.jersey.media.multipart,
+ org.glassfish.jersey.ext.bean.validation,
+ org.glassfish.jersey.ext.cdi1x,
+ org.glassfish.jersey.ext.cdi1x.transaction,
+ org.glassfish.jersey.ext.entity.filtering,
+ org.glassfish.jersey.ext.metainf.services,
+ org.glassfish.jersey.ext.mvc,
+ org.glassfish.jersey.incubator.cdi.inject.weld,
+ org.glassfish.jersey.incubator.declarative.linking,
+ org.glassfish.jersey.inject.cdi2.se,
+ org.glassfish.jersey.gf.ejb,
+ org.glassfish.jersey.security.oauth1.signature;
+ exports org.glassfish.jersey.innate.virtual to org.glassfish.jersey.container.grizzly2.http,
+ org.glassfish.jersey.container.jetty.http,
+ org.glassfish.jersey.netty.connector,
+ org.glassfish.jersey.ext.mp.rest.client;
+
+ opens org.glassfish.jersey.innate.virtual to org.glassfish.jersey.container.grizzly2.http,
+ org.glassfish.jersey.container.jetty.http;
+ opens org.glassfish.jersey.innate to org.glassfish.jersey.container.servlet;
+
+ exports org.glassfish.jersey.innate.io to org.glassfish.jersey.core.server,
+ org.glassfish.jersey.core.client,
+ org.glassfish.jersey.container.servlet,
+ org.glassfish.jersey.apache5.connector;
+ exports org.glassfish.jersey.innate.spi to org.glassfish.jersey.core.client,
+ org.glassfish.jersey.core.server,
+ org.glassfish.jersey.media.multipart;
+ exports org.glassfish.jersey.innate.inject.spi to org.glassfish.jersey.inject.hk2;
+
+ opens org.glassfish.jersey;
+ opens org.glassfish.jersey.http;
+ opens org.glassfish.jersey.innate.spi to org.glassfish.jersey.media.multipart;
+ opens org.glassfish.jersey.internal;
+ opens org.glassfish.jersey.internal.guava;
+ opens org.glassfish.jersey.internal.inject;
+ opens org.glassfish.jersey.internal.l10n;
+ opens org.glassfish.jersey.internal.sonar;
+ opens org.glassfish.jersey.internal.spi;
+ opens org.glassfish.jersey.internal.routing;
+ opens org.glassfish.jersey.internal.util;
+ opens org.glassfish.jersey.internal.util.collection;
+ opens org.glassfish.jersey.io.spi;
+ opens org.glassfish.jersey.logging;
+ opens org.glassfish.jersey.message;
+ opens org.glassfish.jersey.message.internal;
+ opens org.glassfish.jersey.model;
+ opens org.glassfish.jersey.model.internal;
+ opens org.glassfish.jersey.model.internal.spi;
+ opens org.glassfish.jersey.process;
+ opens org.glassfish.jersey.process.internal;
+ opens org.glassfish.jersey.spi;
+ opens org.glassfish.jersey.uri;
+ opens org.glassfish.jersey.uri.internal;
+
+ uses jakarta.ws.rs.core.Feature;
+ uses jakarta.ws.rs.container.DynamicFeature;
+ uses jakarta.ws.rs.ext.RuntimeDelegate;
+
+ uses org.glassfish.jersey.innate.spi.EntityPartBuilderProvider;
+ uses org.glassfish.jersey.internal.inject.InjectionManagerFactory;
+ uses org.glassfish.jersey.internal.spi.AutoDiscoverable;
+ uses org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable;
+ uses org.glassfish.jersey.model.internal.spi.ParameterServiceProvider;
+ uses org.glassfish.jersey.spi.HeaderDelegateProvider;
+ uses org.glassfish.jersey.spi.ExternalConfigurationProvider;
+ uses org.glassfish.jersey.spi.ComponentProvider;
+
+ provides jakarta.ws.rs.ext.RuntimeDelegate
+ with org.glassfish.jersey.internal.RuntimeDelegateImpl;
+ provides org.glassfish.jersey.internal.spi.AutoDiscoverable
+ with org.glassfish.jersey.logging.LoggingFeatureAutoDiscoverable;
+}
\ No newline at end of file
diff --git a/core-common/src/main/java/org/glassfish/jersey/innate/inject/BlindBinder.java b/core-common/src/main/java/org/glassfish/jersey/innate/inject/BlindBinder.java
index 12efd1b..d343bdf 100644
--- a/core-common/src/main/java/org/glassfish/jersey/innate/inject/BlindBinder.java
+++ b/core-common/src/main/java/org/glassfish/jersey/innate/inject/BlindBinder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2025 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
@@ -77,7 +77,7 @@
* @param <T> type of the managed instance returned using provider.
* @return provider with instance of managed instance.
*/
- protected final <T> Provider<T> createManagedInstanceProvider(Class<T> clazz) {
+ protected <T> Provider<T> createManagedInstanceProvider(Class<T> clazz) {
return () -> {
if (injectionManager == null) {
throw new IllegalStateException(LocalizationMessages.INJECTION_MANAGER_NOT_PROVIDED());
diff --git a/core-common/src/main/java/org/glassfish/jersey/innate/inject/ServiceFinderBinder.java b/core-common/src/main/java/org/glassfish/jersey/internal/ServiceFinderBinder.java
similarity index 95%
rename from core-common/src/main/java/org/glassfish/jersey/innate/inject/ServiceFinderBinder.java
rename to core-common/src/main/java/org/glassfish/jersey/internal/ServiceFinderBinder.java
index e0577ee..cd79c21 100644
--- a/core-common/src/main/java/org/glassfish/jersey/innate/inject/ServiceFinderBinder.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/ServiceFinderBinder.java
@@ -14,14 +14,13 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.innate.inject;
+package org.glassfish.jersey.internal;
import java.util.Map;
import jakarta.ws.rs.RuntimeType;
import org.glassfish.jersey.innate.inject.InternalBinder;
-import org.glassfish.jersey.internal.ServiceFinder;
import org.glassfish.jersey.internal.inject.InjectionManager;
import org.glassfish.jersey.internal.util.PropertiesHelper;
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/util/ReflectionHelper.java b/core-common/src/main/java/org/glassfish/jersey/internal/util/ReflectionHelper.java
index 6383095..aa46870 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/util/ReflectionHelper.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/util/ReflectionHelper.java
@@ -1344,6 +1344,7 @@
* @param m the method to find
* @return privileged action to return public method found.
* @see AccessController#doPrivileged(java.security.PrivilegedAction)
+ *
*/
public static PrivilegedAction<Method> findMethodOnClassPA(final Class<?> c, final Method m) {
return new PrivilegedAction<Method>() {
diff --git a/core-common/src/main/java/org/glassfish/jersey/message/internal/MessagingBinders.java b/core-common/src/main/java/org/glassfish/jersey/message/internal/MessagingBinders.java
index d5b0e63..7ec2367 100644
--- a/core-common/src/main/java/org/glassfish/jersey/message/internal/MessagingBinders.java
+++ b/core-common/src/main/java/org/glassfish/jersey/message/internal/MessagingBinders.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 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
@@ -37,7 +37,7 @@
import org.glassfish.jersey.innate.inject.InjectionIds;
import org.glassfish.jersey.innate.inject.InternalBinder;
import org.glassfish.jersey.internal.LocalizationMessages;
-import org.glassfish.jersey.innate.inject.ServiceFinderBinder;
+import org.glassfish.jersey.internal.ServiceFinderBinder;
import org.glassfish.jersey.internal.util.ReflectionHelper;
import org.glassfish.jersey.internal.util.Tokenizer;
import org.glassfish.jersey.spi.HeaderDelegateProvider;
diff --git a/core-server/pom.xml b/core-server/pom.xml
index 9291fda..2583a37 100644
--- a/core-server/pom.xml
+++ b/core-server/pom.xml
@@ -155,9 +155,13 @@
<parallel>classes</parallel>
<perCoreThreadCount>true</perCoreThreadCount>
<threadCount>1</threadCount>
- <forkCount>1C</forkCount>
+ <forkCount>1</forkCount>
<reuseForks>true</reuseForks>
<systemPropertiesFile>${project.basedir}/etc/systemPropertiesFile</systemPropertiesFile>
+ <argLine>
+ ${surefire.coverage.argline}
+ ${surefire.security.argline}
+ </argLine>
</configuration>
</plugin>
</plugins>
@@ -248,7 +252,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>
@@ -311,6 +316,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-opens org.glassfish.jersey.core.server/org.glassfish.jersey.server.internal.inject=jakarta.xml.bind</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
new file mode 100644
index 0000000..733d774
--- /dev/null
+++ b/core-server/src/main/java/module-info.java
@@ -0,0 +1,128 @@
+/*
+ * Copyright (c) 2022, 2025 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 {
+ requires jakarta.ws.rs;
+ requires static jakarta.xml.bind;
+ requires java.logging;
+ requires jakarta.annotation;
+ requires static java.desktop;
+ requires java.management;
+ requires jakarta.activation;
+ requires jakarta.inject;
+ requires jakarta.validation;
+
+ 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;
+
+ exports org.glassfish.jersey.server;
+ exports org.glassfish.jersey.server.filter;
+ exports org.glassfish.jersey.server.filter.internal to
+ org.glassfish.hk2.locator,
+ org.glassfish.hk2.utilities,
+ org.glassfish.jersey.incubator.cdi.inject.weld;
+ exports org.glassfish.jersey.server.internal;
+ exports org.glassfish.jersey.server.internal.inject to
+ org.glassfish.hk2.locator,
+ org.glassfish.jersey.core.common,
+ org.glassfish.jersey.core.client,
+ org.glassfish.jersey.media.sse,
+ org.glassfish.jersey.ext.bean.validation,
+ org.glassfish.jersey.media.multipart,
+ org.glassfish.jersey.ext.mvc;
+ exports org.glassfish.jersey.server.internal.monitoring; // MonitoringFeature
+ exports org.glassfish.jersey.server.internal.process to org.glassfish.hk2.locator;
+ exports org.glassfish.jersey.server.internal.routing;
+ exports org.glassfish.jersey.server.internal.scanning to org.glassfish.jersey.container.servlet;
+ exports org.glassfish.jersey.server.internal.sonar;
+ exports org.glassfish.jersey.server.model;
+ exports org.glassfish.jersey.server.model.internal to org.glassfish.jersey.ext.mvc, org.glassfish.jersey.media.sse;
+ exports org.glassfish.jersey.server.monitoring;
+ exports org.glassfish.jersey.server.spi;
+ exports org.glassfish.jersey.server.spi.internal;
+ exports org.glassfish.jersey.server.wadl;
+ exports org.glassfish.jersey.server.wadl.config;
+ exports org.glassfish.jersey.server.wadl.processor;
+ exports org.glassfish.jersey.server.wadl.internal;
+ exports org.glassfish.jersey.server.wadl.internal.generators;
+ exports org.glassfish.jersey.server.wadl.internal.generators.resourcedoc;
+ exports org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model;
+
+ exports com.sun.research.ws.wadl;
+
+ opens com.sun.research.ws.wadl to jakarta.xml.bind;
+
+ opens org.glassfish.jersey.server;
+ opens org.glassfish.jersey.server.filter;
+ opens org.glassfish.jersey.server.filter.internal to
+ org.glassfish.hk2.locator,
+ org.glassfish.hk2.utilities,
+ org.glassfish.jersey.inject.cdi2.se,
+ org.glassfish.jersey.incubator.cdi.inject.weld,
+ org.glassfish.jersey.core.client, // NonInjectionManager
+ weld.core.impl;
+ opens org.glassfish.jersey.server.internal;
+ opens org.glassfish.jersey.server.internal.inject to
+ org.glassfish.hk2.locator,
+ org.glassfish.hk2.utilities,
+ org.glassfish.jersey.core.common,
+ org.glassfish.jersey.media.sse,
+ org.glassfish.jersey.ext.bean.validation,
+ org.glassfish.jersey.media.multipart,
+ org.glassfish.jersey.ext.mvc;
+ opens org.glassfish.jersey.server.internal.monitoring;
+ opens org.glassfish.jersey.server.internal.monitoring.jmx to org.glassfish.hk2.utilities;
+ opens org.glassfish.jersey.server.internal.process to
+ org.glassfish.hk2.locator,
+ org.glassfish.hk2.utilities,
+ org.glassfish.jersey.inject.cdi2.se,
+ org.glassfish.jersey.incubator.cdi.inject.weld,
+ weld.core.impl;
+ opens org.glassfish.jersey.server.internal.routing;
+ opens org.glassfish.jersey.server.internal.sonar;
+ opens org.glassfish.jersey.server.model;
+ opens org.glassfish.jersey.server.spi;
+ opens org.glassfish.jersey.server.spi.internal;
+ opens org.glassfish.jersey.server.wadl;
+ opens org.glassfish.jersey.server.wadl.config;
+ opens org.glassfish.jersey.server.wadl.internal;
+ opens org.glassfish.jersey.server.wadl.internal.generators;
+ opens org.glassfish.jersey.server.wadl.internal.generators.resourcedoc;
+ opens org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model;
+ opens org.glassfish.jersey.server.wadl.processor;
+
+ uses org.glassfish.jersey.server.spi.ComponentProvider;
+ uses org.glassfish.jersey.server.spi.ExternalRequestScope;
+ uses org.glassfish.jersey.server.spi.WebServerProvider;
+
+ provides jakarta.ws.rs.ext.RuntimeDelegate
+ with org.glassfish.jersey.server.internal.RuntimeDelegateImpl;
+ provides org.glassfish.jersey.internal.spi.AutoDiscoverable
+ with org.glassfish.jersey.server.filter.internal.ServerFiltersAutoDiscoverable;
+ provides org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable
+ with org.glassfish.jersey.server.wadl.internal.WadlAutoDiscoverable,
+ org.glassfish.jersey.server.internal.monitoring.MonitoringAutodiscoverable;
+ provides org.glassfish.jersey.model.internal.spi.ParameterServiceProvider
+ with org.glassfish.jersey.server.model.Parameter.ServerParameterService;
+ provides org.glassfish.jersey.innate.BootstrapPreinitialization with
+ org.glassfish.jersey.server.ServerBootstrapPreinitialization;
+}
\ No newline at end of file
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/scanning/PackageNamesScanner.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/scanning/PackageNamesScanner.java
index d482dde..9751937 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/internal/scanning/PackageNamesScanner.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/scanning/PackageNamesScanner.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 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
@@ -213,7 +213,12 @@
@Override
public Enumeration<URL> getResources(final String name, final ClassLoader cl)
throws IOException {
- return cl.getResources(name);
+ Enumeration<URL> ret = cl.getResources(name);
+ if (!ret.hasMoreElements()) {
+ // Module
+ ret = cl.getResources(name + "/");
+ }
+ return ret;
}
};
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/wadl/internal/generators/WadlGeneratorJAXBGrammarGenerator.java b/core-server/src/main/java/org/glassfish/jersey/server/wadl/internal/generators/WadlGeneratorJAXBGrammarGenerator.java
index aeb1f46..058f223 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/wadl/internal/generators/WadlGeneratorJAXBGrammarGenerator.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/wadl/internal/generators/WadlGeneratorJAXBGrammarGenerator.java
@@ -19,6 +19,7 @@
import java.io.CharArrayWriter;
import java.io.IOException;
import java.lang.reflect.Constructor;
+import java.lang.reflect.InaccessibleObjectException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
@@ -403,7 +404,7 @@
});
parameterClassInstance = defaultConstructor.newInstance();
} catch (final InstantiationException | SecurityException | IllegalAccessException
- | IllegalArgumentException | InvocationTargetException ex) {
+ | IllegalArgumentException | InvocationTargetException | InaccessibleObjectException ex) {
LOGGER.log(Level.FINE, null, ex);
} catch (final PrivilegedActionException ex) {
LOGGER.log(Level.FINE, null, ex.getCause());
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/core-server/src/test/java/org/glassfish/jersey/server/internal/RuntimeDelegateImplTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/RuntimeDelegateImplTest.java
index 9aa7419..dfd0d64 100644
--- a/core-server/src/test/java/org/glassfish/jersey/server/internal/RuntimeDelegateImplTest.java
+++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/RuntimeDelegateImplTest.java
@@ -54,6 +54,11 @@
*/
@Test
public void testRuntimeDelegateInstance() {
+ try {
+ RuntimeDelegate.getInstance().createEndpoint((Application) null, com.sun.net.httpserver.HttpHandler.class);
+ } catch (Exception e) {
+ // does not matter, this just makes sure the correct RuntimeDelegate is set
+ }
assertSame(RuntimeDelegateImpl.class, RuntimeDelegate.getInstance().getClass());
}
@@ -104,7 +109,6 @@
// when
final SeBootstrap.Configuration configuration = configurationBuilder.property("property", "value").build();
- // then
assertThat(configuration, is(notNullValue()));
assertTrue(configuration.hasProperty("property"));
assertThat(configuration.property("property"), is("value"));
diff --git a/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/AbstractFinderTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/AbstractFinderTest.java
new file mode 100644
index 0000000..42417f3
--- /dev/null
+++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/AbstractFinderTest.java
@@ -0,0 +1,54 @@
+/*
+ * 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.server.internal.scanning;
+
+public abstract class AbstractFinderTest {
+
+ private static final String SEPARATOR = System.getProperty("path.separator");
+
+ String setUpJaxRsApiPath() {
+
+ final String oldClassPath = System.getProperty("java.class.path");
+ final String sureFireClassPath = System.getProperty("surefire.test.class.path");
+ final String modulePath = System.getProperty("jdk.module.path");
+ final StringBuilder classPath = new StringBuilder();
+ if (oldClassPath != null) {
+ classPath.append(oldClassPath);
+ classPath.append(SEPARATOR);
+ }
+ if (sureFireClassPath != null) {
+ classPath.append(sureFireClassPath);
+ classPath.append(SEPARATOR);
+ }
+ if (modulePath != null) {
+ classPath.append(modulePath);
+ }
+
+ return parseEntries(classPath.toString());
+ }
+
+ private static String parseEntries(String fullPath) {
+ final String[] entries = fullPath.split(SEPARATOR);
+ for (final String entry : entries) {
+ if (entry.contains("jakarta.ws.rs-api")) {
+ return entry;
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.java
index d76efcd..76875b9 100644
--- a/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.java
+++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 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
@@ -37,21 +37,13 @@
/**
* @author Martin Snyder
*/
-public class JarFileScannerTest {
+public class JarFileScannerTest extends AbstractFinderTest {
private String jaxRsApiPath;
@BeforeEach
public void setUp() throws Exception {
- final String classPath = System.getProperty("java.class.path");
- final String[] entries = classPath.split(System.getProperty("path.separator"));
-
- for (final String entry : entries) {
- if (entry.contains("jakarta.ws.rs-api")) {
- jaxRsApiPath = entry;
- break;
- }
- }
+ jaxRsApiPath = setUpJaxRsApiPath();
if (jaxRsApiPath == null) {
fail("Could not find jakarta.ws.rs-api.");
diff --git a/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/VFSSchemeResourceFinderTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/VFSSchemeResourceFinderTest.java
index 903f150..8beb6f7 100644
--- a/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/VFSSchemeResourceFinderTest.java
+++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/VFSSchemeResourceFinderTest.java
@@ -40,21 +40,13 @@
* @author Martin Snyder
* @author Jason T. Greene
*/
-public class VFSSchemeResourceFinderTest {
+public class VFSSchemeResourceFinderTest extends AbstractFinderTest {
private String jaxRsApiPath;
@BeforeEach
public void setUp() throws Exception {
- final String classPath = System.getProperty("java.class.path");
- final String[] entries = classPath.split(System.getProperty("path.separator"));
-
- for (final String entry : entries) {
- if (entry.contains("jakarta.ws.rs-api")) {
- jaxRsApiPath = entry;
- break;
- }
- }
+ jaxRsApiPath = setUpJaxRsApiPath();
if (jaxRsApiPath == null) {
fail("Could not find jakarta.ws.rs-api.");
diff --git a/core-server/src/test/resources/META-INF/services/org.glassfish.jersey.internal.spi.AutoDiscoverable b/core-server/src/test/resources/META-INF/services/org.glassfish.jersey.internal.spi.AutoDiscoverable
index 7f80709..4dde7b3 100644
--- a/core-server/src/test/resources/META-INF/services/org.glassfish.jersey.internal.spi.AutoDiscoverable
+++ b/core-server/src/test/resources/META-INF/services/org.glassfish.jersey.internal.spi.AutoDiscoverable
@@ -1 +1,2 @@
-org.glassfish.jersey.server.AutoDiscoverableServerTest$CommonAutoDiscoverable
\ No newline at end of file
+org.glassfish.jersey.server.AutoDiscoverableServerTest$CommonAutoDiscoverable
+org.glassfish.jersey.server.filter.internal.ServerFiltersAutoDiscoverable
\ No newline at end of file
diff --git a/etc/jenkins/Jenkinsfile_ci_build b/etc/jenkins/Jenkinsfile_ci_build
index 349f04d..a32966c 100644
--- a/etc/jenkins/Jenkinsfile_ci_build
+++ b/etc/jenkins/Jenkinsfile_ci_build
@@ -24,12 +24,12 @@
// '''
// }
// }
- stage('JDK 21') {
+ stage('JDK 25') {
agent {
label 'centos-7'
}
tools {
- jdk 'openjdk-jdk21-latest'
+ jdk 'openjdk-jdk25-latest'
maven 'apache-maven-latest'
}
steps {
diff --git a/examples/extended-wadl-webapp/pom.xml b/examples/extended-wadl-webapp/pom.xml
index 4786228..0860d67 100644
--- a/examples/extended-wadl-webapp/pom.xml
+++ b/examples/extended-wadl-webapp/pom.xml
@@ -132,7 +132,6 @@
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-osgi</artifactId>
-<!-- <scope>test</scope>-->
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
@@ -192,7 +191,6 @@
</dependencies>
</plugin>
-
<!-- Extended Wadl Config: javadoc plugin generates resourcedoc.xml during the compilation using doclet.
Generated file is then used during runtime to attach javadoc information to wadl. -->
<plugin>
@@ -396,4 +394,4 @@
</build>
</profile>
</profiles>
-</project>
+</project>
\ No newline at end of file
diff --git a/examples/groovy/pom.xml b/examples/groovy/pom.xml
index ce84fc6..edb8e60 100644
--- a/examples/groovy/pom.xml
+++ b/examples/groovy/pom.xml
@@ -31,6 +31,18 @@
<version>${groovy.version}</version>
<exclusions>
<exclusion>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-commons</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-tree</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
diff --git a/examples/http-patch/pom.xml b/examples/http-patch/pom.xml
index fbf7fa6..b4b04dc 100644
--- a/examples/http-patch/pom.xml
+++ b/examples/http-patch/pom.xml
@@ -74,6 +74,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 23e651f..db8204c 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 468498e..efc54aa 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/bean-validation/src/main/java/module-info.java b/ext/bean-validation/src/main/java/module-info.java
new file mode 100644
index 0000000..4404399
--- /dev/null
+++ b/ext/bean-validation/src/main/java/module-info.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.bean.validation {
+
+ requires java.logging;
+
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.validation;
+ requires jakarta.ws.rs;
+ requires static jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+
+ requires static org.glassfish.jersey.ext.cdi1x;
+ requires static jakarta.cdi;
+
+ exports org.glassfish.jersey.server.validation;
+ exports org.glassfish.jersey.server.validation.internal to
+ org.glassfish.hk2.locator,
+ org.glassfish.hk2.utilities,
+ org.glassfish.jersey.core.client,
+ org.glassfish.jersey.ext.mvc.bean.validation;
+ exports org.glassfish.jersey.server.validation.internal.l10n;
+ exports org.glassfish.jersey.server.validation.internal.hibernate to
+ org.glassfish.hk2.locator,
+ org.glassfish.hk2.utilities,
+ org.glassfish.jersey.core.client;
+ opens org.glassfish.jersey.server.validation;
+ opens org.glassfish.jersey.server.validation.internal to
+ org.glassfish.hk2.locator,
+ org.glassfish.hk2.utilities,
+ org.glassfish.jersey.core.client,
+ org.glassfish.jersey.ext.mvc.bean.validation;
+ opens org.glassfish.jersey.server.validation.internal.hibernate to
+ org.glassfish.hk2.locator,
+ org.glassfish.hk2.utilities,
+ org.glassfish.jersey.core.client;
+ opens org.glassfish.jersey.server.validation.internal.l10n;
+
+ provides org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable with
+ org.glassfish.jersey.server.validation.internal.ValidationAutoDiscoverable;
+}
\ No newline at end of file
diff --git a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidateOnExecutionHandler.java b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidateOnExecutionHandler.java
index be62308..62c3575 100644
--- a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidateOnExecutionHandler.java
+++ b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidateOnExecutionHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2025 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
@@ -40,6 +40,7 @@
import org.glassfish.jersey.internal.guava.Multimap;
import org.glassfish.jersey.internal.guava.Multimaps;
import org.glassfish.jersey.internal.util.ReflectionHelper;
+import org.glassfish.jersey.server.validation.internal.l10n.LocalizationMessages;
/**
* Handler providing methods to determine whether an executable should be validated during the validation process based on the
diff --git a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationBinder.java b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationBinder.java
index 510860b..a8ed39d 100644
--- a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationBinder.java
+++ b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationBinder.java
@@ -57,6 +57,7 @@
import org.glassfish.jersey.server.internal.inject.ConfiguredValidator;
import org.glassfish.jersey.server.spi.ValidationInterceptor;
import org.glassfish.jersey.server.validation.ValidationConfig;
+import org.glassfish.jersey.server.validation.internal.l10n.LocalizationMessages;
/**
* Bean Validation provider injection binder.
diff --git a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationExceptionMapper.java b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationExceptionMapper.java
index 3e7c03c..9380cde 100644
--- a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationExceptionMapper.java
+++ b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationExceptionMapper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 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
@@ -36,6 +36,7 @@
import org.glassfish.jersey.server.ServerProperties;
import org.glassfish.jersey.server.validation.ValidationErrorData;
+import org.glassfish.jersey.server.validation.internal.l10n.LocalizationMessages;
/**
* {@link ExceptionMapper} for {@link ValidationException}.
diff --git a/ext/bean-validation/src/main/resources/org/glassfish/jersey/server/validation/internal/localization.properties b/ext/bean-validation/src/main/resources/org/glassfish/jersey/server/validation/internal/l10n/localization.properties
similarity index 93%
rename from ext/bean-validation/src/main/resources/org/glassfish/jersey/server/validation/internal/localization.properties
rename to ext/bean-validation/src/main/resources/org/glassfish/jersey/server/validation/internal/l10n/localization.properties
index 97018fa..ba2d30e 100644
--- a/ext/bean-validation/src/main/resources/org/glassfish/jersey/server/validation/internal/localization.properties
+++ b/ext/bean-validation/src/main/resources/org/glassfish/jersey/server/validation/internal/l10n/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/ext/cdi/jersey-cdi-rs-inject/pom.xml b/ext/cdi/jersey-cdi-rs-inject/pom.xml
index 42473df..fd68197 100644
--- a/ext/cdi/jersey-cdi-rs-inject/pom.xml
+++ b/ext/cdi/jersey-cdi-rs-inject/pom.xml
@@ -41,6 +41,18 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-server</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.inject</groupId>
+ <artifactId>jersey-hk2</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<scope>provided</scope>
@@ -61,7 +73,10 @@
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<show>package</show>
- <detectJavaApiLink>false</detectJavaApiLink>
+ <detectJavaApiLink>false</detectJavaApiLink>
+ <detectLinks>false</detectLinks>
+ <detectOfflineLinks>false</detectOfflineLinks>
+ <source>8</source>
</configuration>
</plugin>
<plugin>
diff --git a/ext/cdi/jersey-cdi-rs-inject/src/main/java/module-info.java b/ext/cdi/jersey-cdi-rs-inject/src/main/java/module-info.java
new file mode 100644
index 0000000..95c786f
--- /dev/null
+++ b/ext/cdi/jersey-cdi-rs-inject/src/main/java/module-info.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.cdi.rs.inject {
+ requires jakarta.ws.rs;
+ requires jakarta.cdi;
+ requires jakarta.servlet;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.ext.cdi1x;
+
+ opens org.glassfish.jersey.ext.cdi1x.inject.internal; // @JerseyContext
+ exports org.glassfish.jersey.ext.cdi1x.inject.internal;
+
+ provides jakarta.enterprise.inject.spi.Extension with
+ org.glassfish.jersey.ext.cdi1x.inject.internal.InjectExtension;
+}
\ No newline at end of file
diff --git a/ext/cdi/jersey-cdi-rs-inject/src/main/java/org/glassfish/jersey/ext/cdi1x/inject/internal/InjectExtension.java b/ext/cdi/jersey-cdi-rs-inject/src/main/java/org/glassfish/jersey/ext/cdi1x/inject/internal/InjectExtension.java
index 22fef89..3d9eb63 100644
--- a/ext/cdi/jersey-cdi-rs-inject/src/main/java/org/glassfish/jersey/ext/cdi1x/inject/internal/InjectExtension.java
+++ b/ext/cdi/jersey-cdi-rs-inject/src/main/java/org/glassfish/jersey/ext/cdi1x/inject/internal/InjectExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025 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
@@ -71,7 +71,7 @@
* </p>
*/
@SuppressWarnings("unused")
-class InjectExtension implements Extension {
+public class InjectExtension implements Extension {
private static final Class<?> WEB_CONFIG_CLASS =
AccessController.doPrivileged(ReflectionHelper.classForNamePA("org.glassfish.jersey.servlet.WebConfig"));
private AnnotatedType<ServletReferenceProducer> interceptorAnnotatedType;
diff --git a/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml b/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml
index f492653..290637f 100644
--- a/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml
+++ b/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml
@@ -43,7 +43,17 @@
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>${project.version}</version>
- <scope>test</scope>
+<!-- <scope>test</scope>-->
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-server</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.inject</groupId>
+ <artifactId>jersey-hk2</artifactId>
+ <version>${project.version}</version>
</dependency>
<dependency>
@@ -51,6 +61,12 @@
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>jakarta.enterprise</groupId>
+ <artifactId>jakarta.enterprise.cdi-api</artifactId>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
</dependencies>
<build>
@@ -73,4 +89,4 @@
</plugin>
</plugins>
</build>
-</project>
+</project>
\ No newline at end of file
diff --git a/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/src/main/java/module-info.java b/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/src/main/java/module-info.java
new file mode 100644
index 0000000..24a882f
--- /dev/null
+++ b/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/src/main/java/module-info.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.cdi1x.ban.custom.hk2.binding {
+ requires org.glassfish.jersey.ext.cdi1x;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+
+ exports org.glassfish.jersey.ext.cdi1x.hk2ban;
+ opens org.glassfish.jersey.ext.cdi1x.hk2ban;
+
+ provides org.glassfish.jersey.ext.cdi1x.spi.Hk2CustomBoundTypesProvider with
+ org.glassfish.jersey.ext.cdi1x.hk2ban.EmptyHk2CustomInjectionTypeProvider;
+}
\ No newline at end of file
diff --git a/ext/cdi/jersey-cdi1x-servlet/pom.xml b/ext/cdi/jersey-cdi1x-servlet/pom.xml
index 7a7e3a1..fd02392 100644
--- a/ext/cdi/jersey-cdi1x-servlet/pom.xml
+++ b/ext/cdi/jersey-cdi1x-servlet/pom.xml
@@ -49,6 +49,11 @@
<artifactId>jersey-server</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.inject</groupId>
+ <artifactId>jersey-hk2</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
<build>
@@ -97,4 +102,4 @@
</plugins>
</build>
-</project>
+</project>
\ No newline at end of file
diff --git a/ext/cdi/jersey-cdi1x-servlet/src/main/java/module-info.java b/ext/cdi/jersey-cdi1x-servlet/src/main/java/module-info.java
new file mode 100644
index 0000000..04040bf
--- /dev/null
+++ b/ext/cdi/jersey-cdi1x-servlet/src/main/java/module-info.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.cdi1x.servlet {
+ requires jakarta.cdi;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+
+ requires org.glassfish.jersey.ext.cdi1x;
+
+ exports org.glassfish.jersey.ext.cdi1x.servlet.internal to weld.core.impl;
+ opens org.glassfish.jersey.ext.cdi1x.servlet.internal to weld.core.impl;
+
+ provides jakarta.enterprise.inject.spi.Extension with
+ org.glassfish.jersey.ext.cdi1x.servlet.internal.CdiExternalRequestScopeExtension;
+ provides org.glassfish.jersey.ext.cdi1x.internal.spi.InjectionManagerStore with
+ org.glassfish.jersey.ext.cdi1x.servlet.internal.ServletInjectionManagerStore;
+ provides org.glassfish.jersey.server.spi.ExternalRequestScope with
+ org.glassfish.jersey.ext.cdi1x.servlet.internal.CdiExternalRequestScope;
+}
\ No newline at end of file
diff --git a/ext/cdi/jersey-cdi1x-transaction/pom.xml b/ext/cdi/jersey-cdi1x-transaction/pom.xml
index 35173ff..d7b469a 100644
--- a/ext/cdi/jersey-cdi1x-transaction/pom.xml
+++ b/ext/cdi/jersey-cdi1x-transaction/pom.xml
@@ -33,14 +33,6 @@
<description>Jersey CDI 1.x Transactional Support</description>
<dependencies>
-
- <dependency>
- <groupId>jakarta.platform</groupId>
- <artifactId>jakarta.jakartaee-api</artifactId>
- <version>10.0.0</version>
- <scope>provided</scope>
- </dependency>
-
<dependency>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
<artifactId>jersey-cdi1x</artifactId>
@@ -54,6 +46,38 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.glassfish.jersey.inject</groupId>
+ <artifactId>jersey-hk2</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>jakarta.enterprise</groupId>
+ <artifactId>jakarta.enterprise.cdi-api</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>jakarta.annotation</groupId>
+ <artifactId>jakarta.annotation-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jakarta.el</groupId>
+ <artifactId>jakarta.el-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>jakarta.inject</groupId>
+ <artifactId>jakarta.inject-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>jakarta.transaction</groupId>
+ <artifactId>jakarta.transaction-api</artifactId>
+ </dependency>
</dependencies>
<build>
@@ -103,4 +127,4 @@
</plugin>
</plugins>
</build>
-</project>
+</project>
\ No newline at end of file
diff --git a/ext/cdi/jersey-cdi1x-transaction/src/main/java/module-info.java b/ext/cdi/jersey-cdi1x-transaction/src/main/java/module-info.java
new file mode 100644
index 0000000..8351e0b
--- /dev/null
+++ b/ext/cdi/jersey-cdi1x-transaction/src/main/java/module-info.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.cdi1x.transaction {
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.interceptor;
+ requires jakarta.transaction;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.ext.cdi1x;
+
+ exports org.glassfish.jersey.ext.cdi1x.transaction.internal to weld.core.impl;
+ opens org.glassfish.jersey.ext.cdi1x.transaction.internal to weld.core.impl;
+
+ provides jakarta.enterprise.inject.spi.Extension with
+ org.glassfish.jersey.ext.cdi1x.transaction.internal.TransactionalExceptionInterceptorProvider;
+ provides org.glassfish.jersey.server.spi.ComponentProvider with
+ org.glassfish.jersey.ext.cdi1x.transaction.internal.TransactionalExceptionInterceptorProvider;
+}
\ No newline at end of file
diff --git a/ext/cdi/jersey-cdi1x-validation/pom.xml b/ext/cdi/jersey-cdi1x-validation/pom.xml
index 4a3f851..1f44482 100644
--- a/ext/cdi/jersey-cdi1x-validation/pom.xml
+++ b/ext/cdi/jersey-cdi1x-validation/pom.xml
@@ -41,6 +41,13 @@
</dependency>
<dependency>
+ <groupId>org.glassfish.jersey.inject</groupId>
+ <artifactId>jersey-hk2</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator-cdi</artifactId>
<scope>provided</scope>
@@ -115,4 +122,4 @@
</plugins>
</build>
-</project>
+</project>
\ No newline at end of file
diff --git a/ext/cdi/jersey-cdi1x-validation/src/main/java/module-info.java b/ext/cdi/jersey-cdi1x-validation/src/main/java/module-info.java
new file mode 100644
index 0000000..efe0bd6
--- /dev/null
+++ b/ext/cdi/jersey-cdi1x-validation/src/main/java/module-info.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.cdi1x.validation {
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.interceptor;
+
+ requires jakarta.cdi;
+
+ requires org.hibernate.validator.cdi;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.ext.cdi1x;
+
+ exports org.glassfish.jersey.ext.cdi1x.validation.internal to weld.core.impl;
+ opens org.glassfish.jersey.ext.cdi1x.validation.internal to weld.core.impl;
+
+ provides jakarta.enterprise.inject.spi.Extension with
+ org.glassfish.jersey.ext.cdi1x.validation.internal.CdiInterceptorWrapperExtension;
+}
\ No newline at end of file
diff --git a/ext/cdi/jersey-cdi1x/pom.xml b/ext/cdi/jersey-cdi1x/pom.xml
index 555cb5a..f0a2100 100644
--- a/ext/cdi/jersey-cdi1x/pom.xml
+++ b/ext/cdi/jersey-cdi1x/pom.xml
@@ -79,6 +79,7 @@
<artifactId>build-helper-maven-plugin</artifactId>
<inherited>true</inherited>
</plugin>
+ <!-- Felix plugin -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
diff --git a/ext/cdi/jersey-cdi1x/src/main/java/module-info.java b/ext/cdi/jersey-cdi1x/src/main/java/module-info.java
new file mode 100644
index 0000000..5ffdfbe
--- /dev/null
+++ b/ext/cdi/jersey-cdi1x/src/main/java/module-info.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.cdi1x {
+
+ requires java.naming;
+ requires java.logging;
+
+ requires jakarta.cdi;
+ requires jakarta.inject;
+ requires jakarta.annotation;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.hk2.api;
+
+ requires static org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.inject.hk2;
+
+ exports org.glassfish.jersey.ext.cdi1x.internal; // @JerseyVetoed
+ exports org.glassfish.jersey.ext.cdi1x.internal.spi;
+ exports org.glassfish.jersey.ext.cdi1x.spi;
+
+ opens org.glassfish.jersey.ext.cdi1x.internal;
+ opens org.glassfish.jersey.ext.cdi1x.internal.spi;
+ opens org.glassfish.jersey.ext.cdi1x.spi;
+
+ uses org.glassfish.jersey.ext.cdi1x.spi.Hk2CustomBoundTypesProvider;
+ uses org.glassfish.jersey.ext.cdi1x.internal.spi.BeanManagerProvider;
+ uses org.glassfish.jersey.ext.cdi1x.internal.spi.InjectionManagerInjectedTarget;
+ uses org.glassfish.jersey.ext.cdi1x.internal.spi.InjectionManagerStore;
+ uses org.glassfish.jersey.ext.cdi1x.internal.spi.InjectionTargetListener;
+
+ provides jakarta.enterprise.inject.spi.Extension with
+ org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider,
+ org.glassfish.jersey.ext.cdi1x.internal.ProcessAllAnnotatedTypes;
+// TODO Cannot do with requires static
+// provides org.glassfish.jersey.server.spi.ComponentProvider with
+// org.glassfish.jersey.ext.cdi1x.internal.CdiServerComponentProvider;
+ provides org.glassfish.jersey.spi.ComponentProvider with
+ org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider;
+}
\ No newline at end of file
diff --git a/ext/cdi/jersey-weld2-se/pom.xml b/ext/cdi/jersey-weld2-se/pom.xml
index 060ec5d..a342a87 100644
--- a/ext/cdi/jersey-weld2-se/pom.xml
+++ b/ext/cdi/jersey-weld2-se/pom.xml
@@ -55,6 +55,11 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.glassfish.jersey.inject</groupId>
+ <artifactId>jersey-hk2</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<exclusions>
@@ -76,6 +81,12 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>jakarta.interceptor</groupId>
+ <artifactId>jakarta.interceptor-api</artifactId>
+ <version>${jakarta.interceptor.version}</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
diff --git a/ext/cdi/jersey-weld2-se/src/main/java/module-info.java b/ext/cdi/jersey-weld2-se/src/main/java/module-info.java
new file mode 100644
index 0000000..165bf0c
--- /dev/null
+++ b/ext/cdi/jersey-weld2-se/src/main/java/module-info.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.weld2.se {
+ requires jakarta.inject;
+ requires jakarta.cdi;
+
+ requires weld.api;
+
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.ext.cdi1x;
+ requires org.glassfish.jersey.inject.hk2;
+
+ exports org.glassfish.jersey.weld.se to
+ org.glassfish.jersey.core.common,
+ weld.core.impl;
+ opens org.glassfish.jersey.weld.se to
+ org.glassfish.jersey.core.common,
+ weld.core.impl;
+
+ provides org.glassfish.jersey.ext.cdi1x.internal.spi.InjectionManagerStore with
+ org.glassfish.jersey.weld.se.WeldInjectionManagerStore;
+ provides org.glassfish.jersey.server.spi.ExternalRequestScope with
+ org.glassfish.jersey.weld.se.WeldRequestScope;
+}
\ No newline at end of file
diff --git a/ext/entity-filtering/src/main/java/module-info.java b/ext/entity-filtering/src/main/java/module-info.java
new file mode 100644
index 0000000..9d8853d
--- /dev/null
+++ b/ext/entity-filtering/src/main/java/module-info.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.entity.filtering {
+ requires java.logging;
+
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+
+ exports org.glassfish.jersey.message.filtering;
+ exports org.glassfish.jersey.message.filtering.internal; // localization
+ exports org.glassfish.jersey.message.filtering.spi;
+
+ opens org.glassfish.jersey.message.filtering;
+ opens org.glassfish.jersey.message.filtering.internal;
+ opens org.glassfish.jersey.message.filtering.spi;
+}
\ No newline at end of file
diff --git a/ext/metainf-services/pom.xml b/ext/metainf-services/pom.xml
index 2472186..69e100c 100644
--- a/ext/metainf-services/pom.xml
+++ b/ext/metainf-services/pom.xml
@@ -61,6 +61,9 @@
<!-- Do not warn about using sun.misc.Unsafe -->
<XDignore.symbol.file />
</compilerArguments>
+ <compilerArgs>
+ <arg>-Xdiags:verbose</arg>
+ </compilerArgs>
<showWarnings>false</showWarnings>
<fork>false</fork>
</configuration>
diff --git a/ext/metainf-services/src/main/java/module-info.java b/ext/metainf-services/src/main/java/module-info.java
new file mode 100644
index 0000000..dfdfa2c
--- /dev/null
+++ b/ext/metainf-services/src/main/java/module-info.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.metainf.services {
+ requires jakarta.annotation;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.common;
+ exports org.glassfish.jersey.spidiscovery.internal to
+ org.glassfish.hk2.locator,
+ weld.core.impl;
+
+ provides org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable with
+ org.glassfish.jersey.spidiscovery.internal.MetaInfServicesAutoDiscoverable;
+}
\ No newline at end of file
diff --git a/ext/metainf-services/src/main/java/org/glassfish/jersey/spidiscovery/internal/MetaInfServicesAutoDiscoverable.java b/ext/metainf-services/src/main/java/org/glassfish/jersey/spidiscovery/internal/MetaInfServicesAutoDiscoverable.java
index 152c7c2..437ebbf 100644
--- a/ext/metainf-services/src/main/java/org/glassfish/jersey/spidiscovery/internal/MetaInfServicesAutoDiscoverable.java
+++ b/ext/metainf-services/src/main/java/org/glassfish/jersey/spidiscovery/internal/MetaInfServicesAutoDiscoverable.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2025 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,7 +27,7 @@
import jakarta.annotation.Priority;
import org.glassfish.jersey.innate.inject.InternalBinder;
-import org.glassfish.jersey.innate.inject.ServiceFinderBinder;
+import org.glassfish.jersey.internal.ServiceFinderBinder;
import org.glassfish.jersey.internal.spi.AutoDiscoverable;
import org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable;
diff --git a/ext/metainf-services/src/test/java/module-info.java b/ext/metainf-services/src/test/java/module-info.java
new file mode 100644
index 0000000..6ca4d9b
--- /dev/null
+++ b/ext/metainf-services/src/test/java/module-info.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2025 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.ext.metainf.services.test {
+ requires org.glassfish.jersey.ext.metainf.services;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.tests.framework.core;
+ requires org.hamcrest;
+ requires org.junit.jupiter.api;
+
+ exports org.glassfish.jersey.spidiscovery.test;
+ opens org.glassfish.jersey.spidiscovery.test;
+}
\ No newline at end of file
diff --git a/ext/metainf-services/src/test/java/module-info.txt b/ext/metainf-services/src/test/java/module-info.txt
new file mode 100644
index 0000000..e07ac6e
--- /dev/null
+++ b/ext/metainf-services/src/test/java/module-info.txt
@@ -0,0 +1,23 @@
+/*
+ * 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
+ */
+
+open module org.glassfish.jersey.ext.metainf.services {
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.server;
+// requires org.glassfish.jersey.ext.metainf.services;
+ requires junit;
+}
\ No newline at end of file
diff --git a/ext/metainf-services/src/test/java/org/glassfish/jersey/message/MetaInfServicesTest.java b/ext/metainf-services/src/test/java/org/glassfish/jersey/spidiscovery/test/MetaInfServicesTest.java
similarity index 97%
rename from ext/metainf-services/src/test/java/org/glassfish/jersey/message/MetaInfServicesTest.java
rename to ext/metainf-services/src/test/java/org/glassfish/jersey/spidiscovery/test/MetaInfServicesTest.java
index 7dbad12..8b98409 100644
--- a/ext/metainf-services/src/test/java/org/glassfish/jersey/message/MetaInfServicesTest.java
+++ b/ext/metainf-services/src/test/java/org/glassfish/jersey/spidiscovery/test/MetaInfServicesTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2025 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.message;
+package org.glassfish.jersey.spidiscovery.test;
import java.io.IOException;
import java.io.InputStream;
diff --git a/ext/metainf-services/src/test/resources/META-INF/services/jakarta.ws.rs.ext.MessageBodyReader b/ext/metainf-services/src/test/resources/META-INF/services/jakarta.ws.rs.ext.MessageBodyReader
index 5be0cee..a201739 100644
--- a/ext/metainf-services/src/test/resources/META-INF/services/jakarta.ws.rs.ext.MessageBodyReader
+++ b/ext/metainf-services/src/test/resources/META-INF/services/jakarta.ws.rs.ext.MessageBodyReader
@@ -1 +1 @@
-org.glassfish.jersey.message.MetaInfServicesTest$MessageProvider
\ No newline at end of file
+org.glassfish.jersey.spidiscovery.test.MetaInfServicesTest$MessageProvider
\ No newline at end of file
diff --git a/ext/metainf-services/src/test/resources/META-INF/services/jakarta.ws.rs.ext.MessageBodyWriter b/ext/metainf-services/src/test/resources/META-INF/services/jakarta.ws.rs.ext.MessageBodyWriter
index 5be0cee..a201739 100644
--- a/ext/metainf-services/src/test/resources/META-INF/services/jakarta.ws.rs.ext.MessageBodyWriter
+++ b/ext/metainf-services/src/test/resources/META-INF/services/jakarta.ws.rs.ext.MessageBodyWriter
@@ -1 +1 @@
-org.glassfish.jersey.message.MetaInfServicesTest$MessageProvider
\ No newline at end of file
+org.glassfish.jersey.spidiscovery.test.MetaInfServicesTest$MessageProvider
\ No newline at end of file
diff --git a/ext/micrometer/pom.xml b/ext/micrometer/pom.xml
index 32f8f3a..7071652 100644
--- a/ext/micrometer/pom.xml
+++ b/ext/micrometer/pom.xml
@@ -106,6 +106,14 @@
<unpackBundle>true</unpackBundle>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <useModulePath>false</useModulePath>
+ </configuration>
+ </plugin>
</plugins>
</build>
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java b/ext/micrometer/src/main/java/module-info.java
similarity index 60%
copy from tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
copy to ext/micrometer/src/main/java/module-info.java
index e389cff..a0f90cc 100644
--- a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
+++ b/ext/micrometer/src/main/java/module-info.java
@@ -14,22 +14,16 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.e2e.inject.cdi.se.j6000;
+module org.glassfish.jersey.ext.micrometer {
+ requires java.logging;
-import jakarta.inject.Inject;
-import jakarta.ws.rs.GET;
-import jakarta.ws.rs.Path;
-import jakarta.ws.rs.Produces;
-import jakarta.ws.rs.core.MediaType;
-import jakarta.ws.rs.core.Response;
+ requires jakarta.ws.rs;
+ requires micrometer.commons;
+ requires micrometer.core;
+ requires micrometer.observation;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
-@Path("/ping")
-public class PingApi {
- private @Inject PingService delegate;
-
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response ping() {
- return this.delegate.ping();
- }
+ exports org.glassfish.jersey.micrometer.server;
+ opens org.glassfish.jersey.micrometer.server;
}
\ No newline at end of file
diff --git a/ext/microprofile/mp-config/pom.xml b/ext/microprofile/mp-config/pom.xml
index 4250936..351a7a6 100644
--- a/ext/microprofile/mp-config/pom.xml
+++ b/ext/microprofile/mp-config/pom.xml
@@ -30,6 +30,15 @@
<artifactId>jersey-mp-config</artifactId>
<name>jersey-ext-mp-config</name>
+ <properties>
+ <surefire.coverage.argline>
+ --add-opens org.glassfish.jersey.core.common/org.glassfish.jersey.innate=ALL-UNNAMED
+ --add-opens org.glassfish.jersey.core.common/org.glassfish.jersey.innate.inject=ALL-UNNAMED
+ --add-opens org.glassfish.jersey.core.common/org.glassfish.jersey.innate.virtual=ALL-UNNAMED
+ --add-modules=ALL-MODULE-PATH
+ </surefire.coverage.argline>
+ </properties>
+
<dependencies>
<dependency>
@@ -50,6 +59,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
new file mode 100644
index 0000000..7f292cd
--- /dev/null
+++ b/ext/microprofile/mp-config/src/main/java/module-info.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.mp.config {
+ requires jakarta.ws.rs;
+ requires microprofile.config.api;
+
+ requires org.glassfish.jersey.core.common;
+ requires static org.glassfish.jersey.core.server;
+
+ exports org.glassfish.jersey.microprofile.config;
+ opens org.glassfish.jersey.microprofile.config;
+
+ provides org.glassfish.jersey.spi.ExternalConfigurationProvider with
+ org.glassfish.jersey.microprofile.config.ConfigurationProvider;
+}
\ No newline at end of file
diff --git a/ext/microprofile/mp-config/src/test/java/module-info.test b/ext/microprofile/mp-config/src/test/java/module-info.test
new file mode 100644
index 0000000..ddeb8cf
--- /dev/null
+++ b/ext/microprofile/mp-config/src/test/java/module-info.test
@@ -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.ext.mp.config {
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires microprofile.config.api;
+
+ 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.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/microprofile/mp-rest-client/pom.xml b/ext/microprofile/mp-rest-client/pom.xml
index 940b85f..623c056 100644
--- a/ext/microprofile/mp-rest-client/pom.xml
+++ b/ext/microprofile/mp-rest-client/pom.xml
@@ -66,11 +66,6 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.glassfish.jersey.ext.cdi</groupId>
- <artifactId>jersey-weld2-se</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
</dependency>
@@ -107,6 +102,7 @@
<artifactId>istack-commons-maven-plugin</artifactId>
<inherited>true</inherited>
</plugin>
+ <!-- Felix plugin -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
diff --git a/ext/microprofile/mp-rest-client/src/main/java/module-info.java b/ext/microprofile/mp-rest-client/src/main/java/module-info.java
new file mode 100644
index 0000000..76d2ddc
--- /dev/null
+++ b/ext/microprofile/mp-rest-client/src/main/java/module-info.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.mp.rest.client {
+ requires java.logging;
+
+ requires jakarta.annotation;
+ requires jakarta.cdi;
+ requires jakarta.inject;
+ requires jakarta.interceptor;
+ requires jakarta.json;
+ requires jakarta.ws.rs;
+
+ requires microprofile.rest.client.api;
+ requires microprofile.config.api;
+ requires org.reactivestreams;
+
+ requires org.glassfish.jersey.ext.cdi1x;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.media.sse;
+
+ exports org.glassfish.jersey.microprofile.restclient;
+ exports org.glassfish.jersey.microprofile.restclient.internal; // localization
+
+ opens org.glassfish.jersey.microprofile.restclient;
+ opens org.glassfish.jersey.microprofile.restclient.internal;
+
+ provides jakarta.enterprise.inject.spi.Extension with
+ org.glassfish.jersey.microprofile.restclient.RestClientExtension;
+ provides org.eclipse.microprofile.rest.client.spi.RestClientBuilderResolver with
+ org.glassfish.jersey.microprofile.restclient.JerseyRestClientBuilderResolver;
+ provides org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable with
+ org.glassfish.jersey.microprofile.restclient.RequestHeaderAutoDiscoverable;
+}
\ No newline at end of file
diff --git a/ext/mvc-bean-validation/pom.xml b/ext/mvc-bean-validation/pom.xml
index 5425e11..c3e5cd2 100644
--- a/ext/mvc-bean-validation/pom.xml
+++ b/ext/mvc-bean-validation/pom.xml
@@ -88,4 +88,4 @@
</dependency>
</dependencies>
-</project>
+</project>
\ No newline at end of file
diff --git a/ext/mvc-bean-validation/src/main/java/module-info.java b/ext/mvc-bean-validation/src/main/java/module-info.java
new file mode 100644
index 0000000..71f6214
--- /dev/null
+++ b/ext/mvc-bean-validation/src/main/java/module-info.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.mvc.bean.validation {
+ requires jakarta.inject;
+ requires jakarta.validation;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.ext.mvc;
+ requires org.glassfish.jersey.ext.bean.validation;
+
+ exports org.glassfish.jersey.server.mvc.beanvalidation;
+
+ opens org.glassfish.jersey.server.mvc.beanvalidation;
+}
\ No newline at end of file
diff --git a/ext/mvc-bean-validation/src/main/java/org/glassfish/jersey/server/mvc/beanvalidation/ValidationErrorTemplateExceptionMapper.java b/ext/mvc-bean-validation/src/main/java/org/glassfish/jersey/server/mvc/beanvalidation/ValidationErrorTemplateExceptionMapper.java
index 9b46cde..6ef16aa 100644
--- a/ext/mvc-bean-validation/src/main/java/org/glassfish/jersey/server/mvc/beanvalidation/ValidationErrorTemplateExceptionMapper.java
+++ b/ext/mvc-bean-validation/src/main/java/org/glassfish/jersey/server/mvc/beanvalidation/ValidationErrorTemplateExceptionMapper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -17,7 +17,6 @@
package org.glassfish.jersey.server.mvc.beanvalidation;
import jakarta.ws.rs.core.Response;
-import jakarta.ws.rs.ext.Provider;
import jakarta.inject.Singleton;
import jakarta.validation.ConstraintViolationException;
diff --git a/ext/mvc-freemarker/pom.xml b/ext/mvc-freemarker/pom.xml
index 81d1a43..0241680 100644
--- a/ext/mvc-freemarker/pom.xml
+++ b/ext/mvc-freemarker/pom.xml
@@ -68,6 +68,18 @@
</dependency>
<dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-server</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-mvc</artifactId>
<version>${project.version}</version>
@@ -80,4 +92,4 @@
</dependency>
</dependencies>
-</project>
+</project>
\ No newline at end of file
diff --git a/ext/mvc-freemarker/src/main/java/module-info.java b/ext/mvc-freemarker/src/main/java/module-info.java
new file mode 100644
index 0000000..0651b1d
--- /dev/null
+++ b/ext/mvc-freemarker/src/main/java/module-info.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.mvc.freemarker {
+ requires jakarta.inject;
+ requires jakarta.servlet;
+ requires jakarta.ws.rs;
+
+ requires freemarker;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.ext.mvc;
+
+ exports org.glassfish.jersey.server.mvc.freemarker;
+
+ opens org.glassfish.jersey.server.mvc.freemarker;
+}
\ No newline at end of file
diff --git a/ext/mvc-freemarker/src/main/java/org/glassfish/jersey/server/mvc/freemarker/FreemarkerDefaultConfigurationFactory.java b/ext/mvc-freemarker/src/main/java/org/glassfish/jersey/server/mvc/freemarker/FreemarkerDefaultConfigurationFactory.java
index 75e736a..6d03fd3 100644
--- a/ext/mvc-freemarker/src/main/java/org/glassfish/jersey/server/mvc/freemarker/FreemarkerDefaultConfigurationFactory.java
+++ b/ext/mvc-freemarker/src/main/java/org/glassfish/jersey/server/mvc/freemarker/FreemarkerDefaultConfigurationFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -18,6 +18,7 @@
import java.io.File;
import java.io.IOException;
+import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@@ -27,7 +28,6 @@
import freemarker.cache.FileTemplateLoader;
import freemarker.cache.MultiTemplateLoader;
import freemarker.cache.TemplateLoader;
-import freemarker.cache.WebappTemplateLoader;
import freemarker.template.Configuration;
/**
@@ -55,6 +55,13 @@
//todo fix after jakartification
//loaders.add(new WebappTemplateLoader(servletContext));
}
+ // in Module
+ loaders.add(new ClassTemplateLoader(FreemarkerDefaultConfigurationFactory.class, "") {
+ @Override
+ protected URL getURL(String fullPath) {
+ return getResourceLoaderClass().getClassLoader().getResource(fullPath);
+ }
+ });
loaders.add(new ClassTemplateLoader(FreemarkerDefaultConfigurationFactory.class, "/"));
try {
loaders.add(new FileTemplateLoader(new File("/")));
diff --git a/ext/mvc-jsp/pom.xml b/ext/mvc-jsp/pom.xml
index 0e5dc4a..942f92c 100644
--- a/ext/mvc-jsp/pom.xml
+++ b/ext/mvc-jsp/pom.xml
@@ -72,6 +72,10 @@
<artifactId>jakarta.inject-api</artifactId>
</dependency>
<dependency>
+ <groupId>jakarta.el</groupId>
+ <artifactId>jakarta.el-api</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>${project.version}</version>
diff --git a/ext/mvc-jsp/src/main/java/module-info.java b/ext/mvc-jsp/src/main/java/module-info.java
new file mode 100644
index 0000000..8a0eb4b
--- /dev/null
+++ b/ext/mvc-jsp/src/main/java/module-info.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.mvc.jsp {
+ requires jakarta.inject;
+ requires jakarta.servlet;
+ requires jakarta.servlet.jsp;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.ext.mvc;
+
+ exports org.glassfish.jersey.server.mvc.jsp;
+ exports org.glassfish.jersey.server.mvc.jsp.internal; // localization
+
+ opens org.glassfish.jersey.server.mvc.jsp;
+ opens org.glassfish.jersey.server.mvc.jsp.internal;
+}
\ No newline at end of file
diff --git a/ext/mvc-mustache/pom.xml b/ext/mvc-mustache/pom.xml
index c97d886..55bbf4e 100644
--- a/ext/mvc-mustache/pom.xml
+++ b/ext/mvc-mustache/pom.xml
@@ -61,6 +61,20 @@
<dependencies>
<dependency>
+ <groupId>jakarta.servlet</groupId>
+ <artifactId>jakarta.servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-server</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-mvc</artifactId>
<version>${project.version}</version>
@@ -84,4 +98,4 @@
</dependency>
</dependencies>
-</project>
+</project>
\ No newline at end of file
diff --git a/ext/mvc-mustache/src/main/java/module-info.java b/ext/mvc-mustache/src/main/java/module-info.java
new file mode 100644
index 0000000..0e5bf96
--- /dev/null
+++ b/ext/mvc-mustache/src/main/java/module-info.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.mvc.mustache {
+ requires jakarta.inject;
+ requires jakarta.servlet;
+ requires jakarta.ws.rs;
+
+ requires jdk.compiler;
+
+ requires com.github.mustachejava;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.ext.mvc;
+
+ exports org.glassfish.jersey.server.mvc.mustache;
+
+ opens org.glassfish.jersey.server.mvc.mustache;
+}
\ No newline at end of file
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java b/ext/mvc-thymeleaf/src/main/java/module-info.java
similarity index 60%
copy from tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
copy to ext/mvc-thymeleaf/src/main/java/module-info.java
index e389cff..ff0bb29 100644
--- a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
+++ b/ext/mvc-thymeleaf/src/main/java/module-info.java
@@ -14,22 +14,17 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.e2e.inject.cdi.se.j6000;
+module org.glassfish.jersey.ext.mvc.jersey.mvc.thymeleaf {
+ requires jakarta.inject;
+ requires jakarta.servlet;
+ requires jakarta.ws.rs;
-import jakarta.inject.Inject;
-import jakarta.ws.rs.GET;
-import jakarta.ws.rs.Path;
-import jakarta.ws.rs.Produces;
-import jakarta.ws.rs.core.MediaType;
-import jakarta.ws.rs.core.Response;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.ext.mvc;
-@Path("/ping")
-public class PingApi {
- private @Inject PingService delegate;
+ requires thymeleaf;
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response ping() {
- return this.delegate.ping();
- }
+ exports org.glassfish.jersey.server.mvc.thymeleaf;
+
+ opens org.glassfish.jersey.server.mvc.thymeleaf;
}
\ No newline at end of file
diff --git a/ext/mvc/src/main/java/module-info.java b/ext/mvc/src/main/java/module-info.java
new file mode 100644
index 0000000..411575d
--- /dev/null
+++ b/ext/mvc/src/main/java/module-info.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.mvc {
+ requires java.logging;
+
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.servlet;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.core.common;
+
+ exports org.glassfish.jersey.server.mvc;
+ exports org.glassfish.jersey.server.mvc.internal;
+ exports org.glassfish.jersey.server.mvc.internal.l10n;
+ exports org.glassfish.jersey.server.mvc.spi;
+
+ opens org.glassfish.jersey.server.mvc;
+ opens org.glassfish.jersey.server.mvc.internal;
+ opens org.glassfish.jersey.server.mvc.internal.l10n;
+ opens org.glassfish.jersey.server.mvc.spi;
+}
\ No newline at end of file
diff --git a/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/Viewable.java b/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/Viewable.java
index 56703a4..3fadb73 100644
--- a/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/Viewable.java
+++ b/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/Viewable.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,7 +16,7 @@
package org.glassfish.jersey.server.mvc;
-import org.glassfish.jersey.server.mvc.internal.LocalizationMessages;
+import org.glassfish.jersey.server.mvc.internal.l10n.LocalizationMessages;
/**
* A viewable type referencing a template by name and a model to be passed
diff --git a/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/internal/ResolvingViewableContext.java b/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/internal/ResolvingViewableContext.java
index c3bf23a..695cf12 100644
--- a/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/internal/ResolvingViewableContext.java
+++ b/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/internal/ResolvingViewableContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2025 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,7 @@
import jakarta.ws.rs.core.MediaType;
import org.glassfish.jersey.server.mvc.Viewable;
+import org.glassfish.jersey.server.mvc.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.server.mvc.spi.ResolvedViewable;
import org.glassfish.jersey.server.mvc.spi.TemplateProcessor;
import org.glassfish.jersey.server.mvc.spi.ViewableContext;
diff --git a/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/internal/TemplateModelProcessor.java b/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/internal/TemplateModelProcessor.java
index 7787d7c..60dd4fd 100644
--- a/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/internal/TemplateModelProcessor.java
+++ b/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/internal/TemplateModelProcessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2025 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
@@ -49,6 +49,7 @@
import org.glassfish.jersey.server.model.internal.ModelProcessorUtil;
import org.glassfish.jersey.server.mvc.Template;
import org.glassfish.jersey.server.mvc.Viewable;
+import org.glassfish.jersey.server.mvc.internal.l10n.LocalizationMessages;
/**
* {@link ModelProcessor Model processor} enhancing (sub-)resources with {@value HttpMethod#GET} methods responsible of producing
diff --git a/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/internal/ViewableMessageBodyWriter.java b/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/internal/ViewableMessageBodyWriter.java
index 8305f8d..b519251 100644
--- a/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/internal/ViewableMessageBodyWriter.java
+++ b/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/internal/ViewableMessageBodyWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2025 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
@@ -45,6 +45,7 @@
import org.glassfish.jersey.server.ContainerRequest;
import org.glassfish.jersey.server.ExtendedUriInfo;
import org.glassfish.jersey.server.mvc.Viewable;
+import org.glassfish.jersey.server.mvc.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.server.mvc.spi.ResolvedViewable;
import org.glassfish.jersey.server.mvc.spi.TemplateProcessor;
import org.glassfish.jersey.server.mvc.spi.ViewableContext;
diff --git a/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/spi/AbstractTemplateProcessor.java b/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/spi/AbstractTemplateProcessor.java
index b375afe..c7b53db 100644
--- a/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/spi/AbstractTemplateProcessor.java
+++ b/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/spi/AbstractTemplateProcessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2025 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
@@ -49,7 +49,7 @@
import org.glassfish.jersey.internal.util.ReflectionHelper;
import org.glassfish.jersey.internal.util.collection.Value;
import org.glassfish.jersey.server.mvc.MvcFeature;
-import org.glassfish.jersey.server.mvc.internal.LocalizationMessages;
+import org.glassfish.jersey.server.mvc.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.server.mvc.internal.TemplateHelper;
/**
@@ -176,6 +176,10 @@
if (stream == null) {
stream = getClass().getClassLoader().getResourceAsStream(template);
}
+ if (stream == null && template.startsWith("/") && template.length() > 1) {
+ // Module.getResourceAsStream() replaces first "/" with "."
+ stream = getClass().getClassLoader().getResourceAsStream(template.substring(1));
+ }
reader = stream != null ? new InputStreamReader(stream) : null;
}
diff --git a/ext/mvc/src/main/resources/org/glassfish/jersey/server/mvc/internal/localization.properties b/ext/mvc/src/main/resources/org/glassfish/jersey/server/mvc/internal/l10n/localization.properties
similarity index 96%
rename from ext/mvc/src/main/resources/org/glassfish/jersey/server/mvc/internal/localization.properties
rename to ext/mvc/src/main/resources/org/glassfish/jersey/server/mvc/internal/l10n/localization.properties
index 5b0eaa2..7a58bfe 100644
--- a/ext/mvc/src/main/resources/org/glassfish/jersey/server/mvc/internal/localization.properties
+++ b/ext/mvc/src/main/resources/org/glassfish/jersey/server/mvc/internal/l10n/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/ext/proxy-client/pom.xml b/ext/proxy-client/pom.xml
index 98f3ad6..f7cefaf 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>
@@ -65,10 +71,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/ext/proxy-client/src/main/java/module-info.java b/ext/proxy-client/src/main/java/module-info.java
new file mode 100644
index 0000000..0bb2091
--- /dev/null
+++ b/ext/proxy-client/src/main/java/module-info.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
+ */
+
+module org.glassfish.jersey.ext.proxy.client {
+ requires static java.desktop;
+
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.common;
+
+ exports org.glassfish.jersey.client.proxy;
+ opens org.glassfish.jersey.client.proxy;
+}
\ No newline at end of file
diff --git a/ext/proxy-client/src/test/java/module-info.java b/ext/proxy-client/src/test/java/module-info.java
new file mode 100644
index 0000000..3796a82
--- /dev/null
+++ b/ext/proxy-client/src/test/java/module-info.java
@@ -0,0 +1,35 @@
+/*
+ * 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.ext.proxy.client {
+ requires static java.desktop;
+
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.common;
+ 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.client.proxy;
+ opens org.glassfish.jersey.client.proxy;
+
+}
\ No newline at end of file
diff --git a/ext/rx/rx-client-guava/pom.xml b/ext/rx/rx-client-guava/pom.xml
index 5a7d866..c001705 100644
--- a/ext/rx/rx-client-guava/pom.xml
+++ b/ext/rx/rx-client-guava/pom.xml
@@ -44,4 +44,4 @@
<version>${guava.version}</version>
</dependency>
</dependencies>
-</project>
+</project>
\ No newline at end of file
diff --git a/ext/rx/rx-client-guava/src/main/java/module-info.java b/ext/rx/rx-client-guava/src/main/java/module-info.java
new file mode 100644
index 0000000..ccf5a91
--- /dev/null
+++ b/ext/rx/rx-client-guava/src/main/java/module-info.java
@@ -0,0 +1,27 @@
+/*
+ * 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
+ * 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.ext.rx.client.guava {
+ requires jakarta.ws.rs;
+
+ requires com.google.common;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+
+ exports org.glassfish.jersey.client.rx.guava;
+ opens org.glassfish.jersey.client.rx.guava;
+}
\ No newline at end of file
diff --git a/ext/rx/rx-client-rxjava/pom.xml b/ext/rx/rx-client-rxjava/pom.xml
index 0d71b26..0437fad 100644
--- a/ext/rx/rx-client-rxjava/pom.xml
+++ b/ext/rx/rx-client-rxjava/pom.xml
@@ -44,4 +44,5 @@
<version>${rxjava.version}</version>
</dependency>
</dependencies>
-</project>
+
+</project>
\ No newline at end of file
diff --git a/ext/rx/rx-client-rxjava/src/main/java/module-info.java b/ext/rx/rx-client-rxjava/src/main/java/module-info.java
new file mode 100644
index 0000000..1f7f9e6
--- /dev/null
+++ b/ext/rx/rx-client-rxjava/src/main/java/module-info.java
@@ -0,0 +1,27 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.ext.rx.client.rxjava {
+ requires jakarta.ws.rs;
+
+ requires rxjava;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+
+ exports org.glassfish.jersey.client.rx.rxjava;
+ opens org.glassfish.jersey.client.rx.rxjava;
+}
\ No newline at end of file
diff --git a/ext/rx/rx-client-rxjava2/pom.xml b/ext/rx/rx-client-rxjava2/pom.xml
index b8dd1cc..31e0b78 100644
--- a/ext/rx/rx-client-rxjava2/pom.xml
+++ b/ext/rx/rx-client-rxjava2/pom.xml
@@ -55,4 +55,5 @@
<version>${reactive.streams.version}</version>
</dependency>
</dependencies>
-</project>
+
+</project>
\ No newline at end of file
diff --git a/ext/rx/rx-client-rxjava2/src/main/java/module-info.java b/ext/rx/rx-client-rxjava2/src/main/java/module-info.java
new file mode 100644
index 0000000..70af086
--- /dev/null
+++ b/ext/rx/rx-client-rxjava2/src/main/java/module-info.java
@@ -0,0 +1,27 @@
+/*
+ * 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
+ * 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.ext.rx.client.rxjava2 {
+ requires jakarta.ws.rs;
+
+ requires io.reactivex.rxjava2;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+
+ exports org.glassfish.jersey.client.rx.rxjava2;
+ opens org.glassfish.jersey.client.rx.rxjava2;
+}
\ No newline at end of file
diff --git a/ext/spring6/pom.xml b/ext/spring6/pom.xml
index dff50b8..2f4b5bc 100644
--- a/ext/spring6/pom.xml
+++ b/ext/spring6/pom.xml
@@ -220,6 +220,16 @@
<artifactId>build-helper-maven-plugin</artifactId>
<inherited>true</inherited>
</plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <instructions>
+ <Automatic-Module-Name>org.glassfish.jersey.ext.spring6</Automatic-Module-Name>
+ </instructions>
+ </configuration>
+ </plugin>
</plugins>
</build>
diff --git a/ext/wadl-doclet/pom.xml b/ext/wadl-doclet/pom.xml
index d0ca366..9f3b17e 100644
--- a/ext/wadl-doclet/pom.xml
+++ b/ext/wadl-doclet/pom.xml
@@ -49,10 +49,6 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- </dependency>
- <dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>${project.version}</version>
@@ -72,4 +68,4 @@
</resource>
</resources>
</build>
-</project>
+</project>
\ No newline at end of file
diff --git a/ext/wadl-doclet/src/main/java/module-info.java b/ext/wadl-doclet/src/main/java/module-info.java
new file mode 100644
index 0000000..0380148
--- /dev/null
+++ b/ext/wadl-doclet/src/main/java/module-info.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2022, 2025 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.ext.wadl.doclet {
+ requires java.compiler;
+ requires java.logging;
+ requires java.xml;
+
+ requires jdk.compiler;
+ requires jdk.javadoc;
+
+ requires static jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.server;
+
+ exports org.glassfish.jersey.wadl.doclet;
+ opens org.glassfish.jersey.wadl.doclet;
+}
\ No newline at end of file
diff --git a/incubator/cdi-inject-weld/pom.xml b/incubator/cdi-inject-weld/pom.xml
index a7e217a..bcd67ca 100644
--- a/incubator/cdi-inject-weld/pom.xml
+++ b/incubator/cdi-inject-weld/pom.xml
@@ -32,6 +32,17 @@
<description>CDI InjectionManager implementation</description>
+ <properties>
+ <!-- test packages -->
+ <surefire.security.argline>
+ --add-exports org.glassfish.jersey.incubator.cdi.inject.weld/org.glassfish.jersey.inject.weld.binder.client=org.glassfish.jersey.core.common
+ --add-exports org.glassfish.jersey.incubator.cdi.inject.weld/org.glassfish.jersey.inject.weld.binder.client=weld.core.impl
+ --add-exports org.glassfish.jersey.incubator.cdi.inject.weld/org.glassfish.jersey.inject.weld=weld.core.impl
+ --add-opens org.glassfish.jersey.incubator.cdi.inject.weld/org.glassfish.jersey.inject.weld.binder.client=weld.core.impl
+ --add-opens org.glassfish.jersey.incubator.cdi.inject.weld/org.glassfish.jersey.inject.weld.internal.bean=weld.core.impl
+ </surefire.security.argline>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
@@ -73,7 +84,7 @@
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-http</artifactId>
<version>${project.version}</version>
- <scope>provided</scope>
+ <scope>test</scope>
</dependency>
<dependency>
@@ -82,11 +93,27 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.weld.se</groupId>
- <artifactId>weld-se-core</artifactId>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-api</artifactId>
<scope>provided</scope>
</dependency>
-
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-spi</artifactId>
+ <version>${weld.api.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-core-impl</artifactId>
+ <version>${weld.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld.se</groupId>
+ <artifactId>weld-se-core</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
@@ -128,6 +155,7 @@
<artifactId>build-helper-maven-plugin</artifactId>
<inherited>true</inherited>
</plugin>
+ <!-- Felix plugin -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
@@ -139,7 +167,6 @@
org.glassfish.jersey.inject.weld.managed.*;version=${project.version}
</Export-Package>
<Import-Package>
- jakarta.servlet.*;version="[6.0,7.0)",
sun.misc.*;resolution:=optional,
${jakarta.annotation.osgi.version},
${cdi.osgi.version},
diff --git a/incubator/cdi-inject-weld/src/main/java/module-info.java b/incubator/cdi-inject-weld/src/main/java/module-info.java
new file mode 100644
index 0000000..19f4ba9
--- /dev/null
+++ b/incubator/cdi-inject-weld/src/main/java/module-info.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2022, 2025 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.cdi.inject.weld {
+ requires jakarta.annotation;
+ requires jakarta.cdi;
+ requires jakarta.inject;
+ requires jakarta.interceptor;
+ requires jakarta.ws.rs;
+
+ requires java.logging;
+
+ requires weld.api;
+ requires weld.core.impl;
+ requires weld.spi;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.server;
+
+ exports org.glassfish.jersey.inject.weld.internal.managed to
+ org.glassfish.jersey.core.common,
+ weld.core.impl;
+ exports org.glassfish.jersey.inject.weld.managed to org.glassfish.jersey.core.common;
+
+ opens org.glassfish.jersey.inject.weld.internal.bean to weld.core.impl;
+ opens org.glassfish.jersey.inject.weld.internal.managed to weld.core.impl;
+ opens org.glassfish.jersey.inject.weld.internal.scope to weld.core.impl;
+ opens org.glassfish.jersey.inject.weld.managed to weld.core.impl;
+ opens org.glassfish.jersey.inject.weld.internal.injector to weld.core.impl;
+
+ uses org.glassfish.jersey.innate.BootstrapPreinitialization;
+
+ provides jakarta.enterprise.inject.spi.Extension with
+ org.glassfish.jersey.inject.weld.internal.managed.BinderRegisterExtension;
+
+ provides org.glassfish.jersey.internal.inject.InjectionManagerFactory with
+ org.glassfish.jersey.inject.weld.managed.CdiInjectionManagerFactory;
+}
\ No newline at end of file
diff --git a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/JerseyBean.java b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/JerseyBean.java
index 0b1fae8..fe4f2e8 100644
--- a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/JerseyBean.java
+++ b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/JerseyBean.java
@@ -41,7 +41,7 @@
import org.glassfish.jersey.internal.inject.PerLookup;
import org.glassfish.jersey.internal.inject.PerThread;
-import org.jboss.weld.environment.se.contexts.ThreadScoped;
+//import org.jboss.weld.environment.se.contexts.ThreadScoped;
/**
* Jersey-specific abstract class which implements {@link Bean} interface. Class particularly contains default implementations
@@ -88,7 +88,7 @@
if (scope == PerLookup.class) {
return Dependent.class;
} else if (scope == PerThread.class) {
- return ThreadScoped.class;
+ return RequestScoped.class; // ThreadScoped.class;
} else if (scope == org.glassfish.jersey.process.internal.RequestScoped.class) {
return RequestScoped.class;
}
diff --git a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/injector/JerseyInjectionTarget.java b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/injector/JerseyInjectionTarget.java
index be93ad6..0e791b1 100644
--- a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/injector/JerseyInjectionTarget.java
+++ b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/injector/JerseyInjectionTarget.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025 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,10 @@
import java.lang.reflect.Modifier;
import java.util.Collection;
import java.util.List;
+import java.util.logging.Logger;
import jakarta.enterprise.context.Dependent;
+import jakarta.enterprise.inject.spi.DeploymentException;
import jakarta.ws.rs.WebApplicationException;
import jakarta.enterprise.context.spi.CreationalContext;
@@ -32,9 +34,9 @@
import org.glassfish.jersey.inject.weld.internal.bean.BeanHelper;
import org.glassfish.jersey.inject.weld.internal.bean.JerseyBean;
+import org.glassfish.jersey.inject.weld.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.inject.weld.managed.CdiInjectionManagerFactory;
import org.glassfish.jersey.internal.inject.InjectionManager;
-import org.glassfish.jersey.internal.inject.InjectionManagerFactory;
import org.glassfish.jersey.internal.inject.InjectionResolver;
import org.glassfish.jersey.internal.util.collection.LazyValue;
import org.glassfish.jersey.internal.util.collection.Value;
@@ -56,13 +58,12 @@
import org.jboss.weld.injection.producer.SubclassDecoratorApplyingInstantiator;
import org.jboss.weld.injection.producer.SubclassedComponentInstantiator;
import org.jboss.weld.interceptor.spi.model.InterceptionModel;
-import org.jboss.weld.logging.BeanLogger;
import org.jboss.weld.resources.ClassTransformer;
import org.jboss.weld.util.reflection.Formats;
/**
* Wrapper for {@link InjectionTarget} that implements the functionality of injecting using JAX-RS annotations into provided
- * instances. {@code Delegate} is a original {@code InjectionTarget} which is able to inject other fields/parameters which
+ * instances. {@code Delegate} is an original {@code InjectionTarget} which is able to inject other fields/parameters which
* are managed by CDI.
* <p>
* Implementation is also able to create with custom {@code jerseyConstructor} if it is provided. This functionality allows override
@@ -70,6 +71,8 @@
*/
public class JerseyInjectionTarget<T> extends BasicInjectionTarget<T> {
+ private static final Logger LOGGER = Logger.getLogger(JerseyInjectionTarget.class.getName());
+
private final Bean<T> bean;
private final Class<T> clazz;
private final LazyValue<JerseyInstanceInjector<T>> injector;
@@ -78,6 +81,7 @@
private BasicInjectionTarget delegate; // for managed beans the initializeAfterBeanDiscovery is called for it
private final Instantiator<T> instantiator;
+
/**
* Creates a new injection target which is able to delegate an injection to {@code delegate injection target} and inject
* the fields that are Jersey-specific. The resolvers must be set later on. CDI will select its own constructor.
@@ -156,8 +160,7 @@
} catch (WebApplicationException wae) {
throw wae;
} catch (Throwable cause) {
- throw new InjectionException(
- "Exception occurred during Jersey/JAX-RS annotations processing in the class: " + clazz, cause);
+ throw injectionException(LocalizationMessages.IT_PROCESSING_ANNOTATION_EXCEPTION(clazz.getName()), cause);
}
/*
@@ -194,7 +197,7 @@
if (hasNonConstructorInterceptors || hasDecorators) {
if (!(getInstantiator() instanceof DefaultInstantiator<?>)) {
- throw new IllegalStateException("Unexpected instantiator " + getInstantiator());
+ throw illegalStateException(LocalizationMessages.IT_UNEXPECTED_INSTANTIATOR(getInstantiator()));
}
/*
@@ -232,16 +235,16 @@
}
EnhancedAnnotatedConstructor<T> constructor = type.getNoArgsEnhancedConstructor();
if (constructor == null) {
- throw BeanLogger.LOG.decoratedHasNoNoargsConstructor(this);
+ throw deploymentException(LocalizationMessages.IT_DECORATED_HAS_NO_NOARGS_CONSTRUCTOR(type));
} else if (constructor.isPrivate()) {
- throw BeanLogger.LOG
- .decoratedNoargsConstructorIsPrivate(this, Formats.formatAsStackTraceElement(constructor.getJavaMember()));
+ String stackTraceElement = Formats.formatAsStackTraceElement(constructor.getJavaMember());
+ throw deploymentException(LocalizationMessages.IT_DECORATED_NOARGS_CONSTRUCTOR_PRIVATE(type, stackTraceElement));
}
}
private void checkDecoratedMethods(EnhancedAnnotatedType<T> type, List<Decorator<?>> decorators) {
if (type.isFinal()) {
- throw BeanLogger.LOG.finalBeanClassWithDecoratorsNotAllowed(this);
+ throw deploymentException(LocalizationMessages.IT_FINAL_BEAN_CLASS_WITH_DECORATORS_NOT_ALLOWED(type));
}
checkNoArgsConstructor(type);
for (Decorator<?> decorator : decorators) {
@@ -253,13 +256,13 @@
} else if (decorator instanceof CustomDecoratorWrapper<?>) {
decoratorClass = ((CustomDecoratorWrapper<?>) decorator).getEnhancedAnnotated();
} else {
- throw BeanLogger.LOG.nonContainerDecorator(decorator);
+ throw illegalStateException(LocalizationMessages.IT_NON_CONTAINER_DECORATOR(decorator));
}
for (EnhancedAnnotatedMethod<?, ?> decoratorMethod : decoratorClass.getEnhancedMethods()) {
EnhancedAnnotatedMethod<?, ?> method = type.getEnhancedMethod(decoratorMethod.getSignature());
if (method != null && !method.isStatic() && !method.isPrivate() && method.isFinal()) {
- throw BeanLogger.LOG.finalBeanClassWithInterceptorsNotAllowed(this);
+ throw deploymentException(LocalizationMessages.IT_FINAL_BEAN_CLASS_WITH_INTERCEPTORS_NOT_ALLOWED(type));
}
}
}
@@ -292,6 +295,21 @@
return !isInterceptor() && !isDecorator() && !Modifier.isAbstract(getType().getJavaClass().getModifiers());
}
+ private static IllegalStateException illegalStateException(String message) {
+ LOGGER.warning(message);
+ return new IllegalStateException(message);
+ }
+
+ private static DeploymentException deploymentException(String message) {
+ LOGGER.warning(message);
+ return new DeploymentException(message);
+ }
+
+ private static InjectionException injectionException(String message, Throwable cause) {
+ LOGGER.warning(message);
+ return new InjectionException(message, cause);
+ }
+
@Override
public T produce(CreationalContext<T> ctx) {
T instance;
diff --git a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/managed/BinderRegisterExtension.java b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/managed/BinderRegisterExtension.java
index a8692e4..505bd73 100644
--- a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/managed/BinderRegisterExtension.java
+++ b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/managed/BinderRegisterExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -33,6 +33,7 @@
import java.util.TreeMap;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Supplier;
+import java.util.logging.Logger;
import java.util.stream.Collectors;
import jakarta.annotation.Priority;
@@ -105,7 +106,9 @@
* CDI extension that handles CDI bootstrap events and registers Jersey's internally used components and components registered
* using {@link Application}.
*/
-class BinderRegisterExtension implements Extension {
+public class BinderRegisterExtension implements Extension {
+
+ private static final Logger LOGGER = Logger.getLogger(BinderRegisterExtension.class.getName());
private final AtomicBoolean registrationDone = new AtomicBoolean(false);
private Supplier<BeanManager> beanManagerSupplier;
@@ -679,6 +682,7 @@
Constructor<T> constructor = createMe.getConstructor();
return constructor.newInstance();
} catch (NoSuchMethodException | IllegalAccessException | InstantiationException | InvocationTargetException e) {
+ LOGGER.warning(e.getMessage());
return null;
}
}
diff --git a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/managed/CdiInjectionManager.java b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/managed/CdiInjectionManager.java
index c0a31f6..522533f 100644
--- a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/managed/CdiInjectionManager.java
+++ b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/managed/CdiInjectionManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -44,6 +44,7 @@
import org.glassfish.jersey.inject.weld.internal.inject.InitializableSupplierInstanceBinding;
import org.glassfish.jersey.inject.weld.internal.bean.JerseyBean;
import org.glassfish.jersey.inject.weld.internal.inject.MatchableBinding;
+import org.glassfish.jersey.inject.weld.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.inject.weld.managed.CdiInjectionManagerFactory;
import org.glassfish.jersey.innate.inject.InternalBinding;
import org.glassfish.jersey.innate.inject.Bindings;
diff --git a/incubator/cdi-inject-weld/src/main/resources/org/glassfish/jersey/inject/weld/internal/l10n/localization.properties b/incubator/cdi-inject-weld/src/main/resources/org/glassfish/jersey/inject/weld/internal/l10n/localization.properties
new file mode 100644
index 0000000..47ea08c
--- /dev/null
+++ b/incubator/cdi-inject-weld/src/main/resources/org/glassfish/jersey/inject/weld/internal/l10n/localization.properties
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2021, 2025 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
+#
+
+# {0} - full classname
+cdi2.provider.not.registrable=Provider registered to CdiInjectionManager cannot be process because of incompatible type: {0}.
+it.processing.annotation.exception=Exception occurred during Jersey/JAX-RS annotations processing in the class: {0}.
+it.unexpected.instantiator=Unexpected instantiator {0}.
+it.decorated.has.no.noargs.constructor=Bean class which has decorators must have a public constructor without parameters: {0}
+it.decorated.noargs.constructor.private=Constructor without parameters cannot be private in bean class which has decorators: {0} at {1} StackTrace.
+it.final.bean.class.with.decorators.not.allowed=Bean class which has decorators cannot be declared final: {0}.
+it.non.container.decorator=Cannot operate on non container provided decorator {0}.
+it.final.bean.class.with.interceptors.not.allowed=Bean class which has interceptors cannot be declared final: {0}.
+
+
diff --git a/incubator/cdi-inject-weld/src/main/resources/org/glassfish/jersey/inject/weld/internal/managed/localization.properties b/incubator/cdi-inject-weld/src/main/resources/org/glassfish/jersey/inject/weld/internal/managed/localization.properties
deleted file mode 100644
index 8716ee6..0000000
--- a/incubator/cdi-inject-weld/src/main/resources/org/glassfish/jersey/inject/weld/internal/managed/localization.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0, which is available at
-# http://www.eclipse.org/legal/epl-2.0.
-#
-# This Source Code may also be made available under the following Secondary
-# Licenses when the conditions for such availability set forth in the
-# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
-# version 2 with the GNU Classpath Exception, which is available at
-# https://www.gnu.org/software/classpath/license.html.
-#
-# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-#
-
-# {0} - full classname
-cdi2.provider.not.registrable=Provider registered to CdiInjectionManager cannot be process because of incompatible type: {0}.
diff --git a/incubator/cdi-inject-weld/src/test/java/module-info.java.txt b/incubator/cdi-inject-weld/src/test/java/module-info.java.txt
new file mode 100644
index 0000000..b1b05eb
--- /dev/null
+++ b/incubator/cdi-inject-weld/src/test/java/module-info.java.txt
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2022, 2025 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
+ */
+
+open module org.glassfish.jersey.incubator.cdi.inject.weld.test {
+ requires jakarta.annotation;
+ requires jakarta.cdi;
+ requires jakarta.cdi.el;
+ requires jakarta.el;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires java.logging;
+ requires org.jboss.logging;
+ requires org.junit.jupiter.api;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.incubator.cdi.inject.weld;
+ requires org.hamcrest;
+
+ exports org.glassfish.jersey.inject.weld.binder.client to org.glassfish.jersey.core.common;
+}
\ No newline at end of file
diff --git a/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/ClientTestParent.java b/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/ClientTestParent.java
index beb75bd..32df345 100644
--- a/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/ClientTestParent.java
+++ b/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/ClientTestParent.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2024, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/SingleArchiveDiscoveryStrategy.java b/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/SingleArchiveDiscoveryStrategy.java
new file mode 100644
index 0000000..52e9d86
--- /dev/null
+++ b/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/SingleArchiveDiscoveryStrategy.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2025 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.inject.weld;
+
+import org.jboss.weld.bootstrap.api.Bootstrap;
+import org.jboss.weld.bootstrap.spi.BeanDiscoveryMode;
+import org.jboss.weld.environment.deployment.WeldBeanDeploymentArchive;
+import org.jboss.weld.environment.deployment.discovery.DiscoveryStrategy;
+import org.jboss.weld.environment.deployment.discovery.ReflectionDiscoveryStrategy;
+import org.jboss.weld.resources.spi.ResourceLoader;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+/**
+ * Prevent loading the archives multiple times, once from the classpath, once from the module path.
+ * Done by Thread.currentThread().getContextClassLoader().getResource("META-INF/beans.xml")
+ */
+public class SingleArchiveDiscoveryStrategy extends ReflectionDiscoveryStrategy implements DiscoveryStrategy {
+
+ public SingleArchiveDiscoveryStrategy(){
+ super(null, null, null, null);
+ }
+
+ public SingleArchiveDiscoveryStrategy(ResourceLoader resourceLoader,
+ Bootstrap bootstrap,
+ Set<Class<? extends Annotation>> initialBeanDefiningAnnotations,
+ BeanDiscoveryMode emptyBeansXmlDiscoveryMode) {
+ super(resourceLoader, bootstrap, initialBeanDefiningAnnotations, emptyBeansXmlDiscoveryMode);
+ }
+
+ @Override
+ public Set<WeldBeanDeploymentArchive> performDiscovery() {
+ if (scanner == null) {
+ scanner = new SingleArchiveScanner(resourceLoader, bootstrap, BeanDiscoveryMode.ANNOTATED);
+ }
+ return super.performDiscovery();
+ }
+}
diff --git a/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/SingleArchiveScanner.java b/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/SingleArchiveScanner.java
new file mode 100644
index 0000000..29816a2
--- /dev/null
+++ b/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/SingleArchiveScanner.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2025 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.inject.weld;
+
+import org.jboss.weld.bootstrap.api.Bootstrap;
+import org.jboss.weld.bootstrap.spi.BeanDiscoveryMode;
+import org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner;
+import org.jboss.weld.resources.spi.ResourceLoader;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Locale;
+
+class SingleArchiveScanner extends DefaultBeanArchiveScanner {
+ /**
+ *
+ * @param resourceLoader
+ * @param bootstrap
+ * @param emptyBeansXmlDiscoveryMode
+ */
+ public SingleArchiveScanner(ResourceLoader resourceLoader,
+ Bootstrap bootstrap,
+ BeanDiscoveryMode emptyBeansXmlDiscoveryMode) {
+ super(resourceLoader, bootstrap, emptyBeansXmlDiscoveryMode);
+ }
+
+ @Override
+ public List<ScanResult> scan() {
+ HashSet<String> beanArchives = new HashSet<>();
+ return super.scan().stream()
+ .filter(scanResult -> !beanArchives.contains(scanResult.getBeanArchiveRef().toLowerCase(Locale.ROOT)))
+ .peek(scanResult -> beanArchives.add(scanResult.getBeanArchiveRef().toLowerCase(Locale.ROOT)))
+ .toList();
+ }
+}
diff --git a/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/internal/managed/TestParent.java b/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/internal/managed/TestParent.java
deleted file mode 100644
index e69de29..0000000
--- a/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/internal/managed/TestParent.java
+++ /dev/null
diff --git a/incubator/cdi-inject-weld/src/test/resources/META-INF/beans.xml b/incubator/cdi-inject-weld/src/test/resources/META-INF/beans.xml
index 678e3dc..89484ca 100644
--- a/incubator/cdi-inject-weld/src/test/resources/META-INF/beans.xml
+++ b/incubator/cdi-inject-weld/src/test/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,5 +16,9 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
-<beans bean-discovery-mode="annotated" />
+<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
+ version="4.0"
+ bean-discovery-mode="annotated">
+</beans>
\ No newline at end of file
diff --git a/incubator/cdi-inject-weld/src/test/resources/META-INF/services/org.jboss.weld.environment.deployment.discovery.DiscoveryStrategy b/incubator/cdi-inject-weld/src/test/resources/META-INF/services/org.jboss.weld.environment.deployment.discovery.DiscoveryStrategy
new file mode 100644
index 0000000..1d2ac45
--- /dev/null
+++ b/incubator/cdi-inject-weld/src/test/resources/META-INF/services/org.jboss.weld.environment.deployment.discovery.DiscoveryStrategy
@@ -0,0 +1 @@
+org.glassfish.jersey.inject.weld.SingleArchiveDiscoveryStrategy
\ No newline at end of file
diff --git a/incubator/declarative-linking/pom.xml b/incubator/declarative-linking/pom.xml
index ab8e796..76bef4d 100644
--- a/incubator/declarative-linking/pom.xml
+++ b/incubator/declarative-linking/pom.xml
@@ -37,8 +37,8 @@
<properties>
<surefire.coverage.argline>
- --add-opens java.base/java.util.zip=ALL-UNNAMED
- --add-opens java.base/java.util=ALL-UNNAMED
+ --add-opens java.base/java.util=org.glassfish.jersey.incubator.declarative.linking
+ --add-opens java.base/java.util.zip=org.glassfish.jersey.incubator.declarative.linking
</surefire.coverage.argline>
</properties>
@@ -95,7 +95,7 @@
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
- <version>1.5.1</version>
+ <version>2.0-rc1</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/incubator/declarative-linking/src/main/java/module-info.java b/incubator/declarative-linking/src/main/java/module-info.java
new file mode 100644
index 0000000..a362c42
--- /dev/null
+++ b/incubator/declarative-linking/src/main/java/module-info.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2022, 2025 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.declarative.linking {
+ requires jakarta.el;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires jakarta.xml.bind;
+
+ requires java.logging;
+ requires java.desktop;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+
+ exports org.glassfish.jersey.linking;
+ exports org.glassfish.jersey.linking.contributing;
+ exports org.glassfish.jersey.linking.mapping;
+
+ opens org.glassfish.jersey.linking;
+ opens org.glassfish.jersey.linking.contributing;
+ opens org.glassfish.jersey.linking.mapping;
+}
\ No newline at end of file
diff --git a/incubator/declarative-linking/src/test/java/module-info.java b/incubator/declarative-linking/src/test/java/module-info.java
new file mode 100644
index 0000000..c3eb32e
--- /dev/null
+++ b/incubator/declarative-linking/src/test/java/module-info.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2022, 2025 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
+ */
+
+open module org.glassfish.jersey.incubator.declarative.linking {
+ requires jakarta.el;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires jakarta.xml.bind;
+
+ requires java.logging;
+ requires java.desktop;
+
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.tests.framework.core;
+
+ exports org.glassfish.jersey.linking;
+
+ requires org.json;
+ requires com.fasterxml.jackson.databind;
+ requires org.junit.jupiter.api;
+ requires jsonassert;
+
+}
\ No newline at end of file
diff --git a/incubator/gae-integration/pom.xml b/incubator/gae-integration/pom.xml
index 95e7f1f..abd7f9c 100644
--- a/incubator/gae-integration/pom.xml
+++ b/incubator/gae-integration/pom.xml
@@ -55,5 +55,35 @@
<directory>${project.build.directory}/legal</directory>
</resource>
</resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-compile</id>
+ <configuration>
+ <!-- compile everything to ensure module-info contains right entries -->
+ <release>11</release>
+ <compilerArgs>
+ <arg>--add-reads</arg>
+ <arg>org.glassfish.jersey.incubator.gae.integration=ALL-UNNAMED</arg>
+ <arg>-Xdiags:verbose</arg>
+ </compilerArgs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <instructions>
+ <Automatic-Module-Name>org.glassfish.jersey.incubator.gae.integration</Automatic-Module-Name>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
</build>
</project>
diff --git a/incubator/gae-integration/src/main/java/module-info.java.txt b/incubator/gae-integration/src/main/java/module-info.java.txt
new file mode 100644
index 0000000..eb398d8
--- /dev/null
+++ b/incubator/gae-integration/src/main/java/module-info.java.txt
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2022, 2025 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.gae.integration {
+ requires jakarta.ws.rs;
+
+// requires com.google.appengine.api;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+
+ exports org.glassfish.jersey.server.gae;
+}
\ No newline at end of file
diff --git a/incubator/html-json/pom.xml b/incubator/html-json/pom.xml
index 5a5df64..4b7b302 100644
--- a/incubator/html-json/pom.xml
+++ b/incubator/html-json/pom.xml
@@ -41,6 +41,17 @@
<properties>
<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-exports org.glassfish.jersey.core.common/org.glassfish.jersey.innate=ALL-UNNAMED
+ --add-exports org.glassfish.jersey.core.common/org.glassfish.jersey.innate.virtual=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 +67,7 @@
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util-lookup</artifactId>
- <version>RELEASE110</version>
+ <version>RELEASE160</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -82,11 +93,16 @@
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
- <artifactId>jersey-test-framework-provider-bundle</artifactId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<version>${project.version}</version>
- <type>pom</type>
<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.netbeans.html</groupId>
<artifactId>ko-ws-tyrus</artifactId>
@@ -121,5 +137,35 @@
<directory>${project.build.directory}/legal</directory>
</resource>
</resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-compile</id>
+ <configuration>
+ <!-- compile everything to ensure module-info contains right entries -->
+ <release>11</release>
+ <compilerArgs>
+ <arg>--add-reads</arg>
+ <arg>org.glassfish.jersey.incubator.html.json=ALL-UNNAMED</arg>
+ <arg>-Xdiags:verbose</arg>
+ </compilerArgs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <instructions>
+ <Automatic-Module-Name>org.glassfish.jersey.incubator.html.json</Automatic-Module-Name>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
</build>
</project>
diff --git a/incubator/html-json/src/main/java/module-info.txt b/incubator/html-json/src/main/java/module-info.txt
new file mode 100644
index 0000000..29656d9
--- /dev/null
+++ b/incubator/html-json/src/main/java/module-info.txt
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2022, 2025 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 org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.openide.util.lookup.RELEASE240;
+ requires net.java.html.json;
+ requires net.java.html;
+
+ 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.txt b/incubator/html-json/src/test/java/module-info.txt
new file mode 100644
index 0000000..d1e14d0
--- /dev/null
+++ b/incubator/html-json/src/test/java/module-info.txt
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2023, 2025 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 org.openide.util.lookup.RELEASE240;
+
+ 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/injectless-client/src/main/java/module-info.java b/incubator/injectless-client/src/main/java/module-info.java
new file mode 100644
index 0000000..91e0582
--- /dev/null
+++ b/incubator/injectless-client/src/main/java/module-info.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2024, 2025 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.injectless.client {
+
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+
+ exports org.glassfish.jersey.inject.injectless;
+ opens org.glassfish.jersey.inject.injectless;
+
+ provides org.glassfish.jersey.internal.inject.InjectionManagerFactory
+ with org.glassfish.jersey.inject.injectless.NonInjectionManagerFactory;
+}
\ No newline at end of file
diff --git a/incubator/kryo/pom.xml b/incubator/kryo/pom.xml
index 67eeb36..bc73752 100644
--- a/incubator/kryo/pom.xml
+++ b/incubator/kryo/pom.xml
@@ -34,6 +34,17 @@
Jersey/JAX-RS Message Body Writer and Reader using Kryo serialization framework
</description>
+ <properties>
+ <surefire.coverage.argline>
+ --add-exports org.glassfish.jersey.core.common/org.glassfish.jersey.innate=ALL-UNNAMED
+ --add-exports org.glassfish.jersey.core.common/org.glassfish.jersey.innate.inject=ALL-UNNAMED
+ --add-exports org.glassfish.jersey.core.common/org.glassfish.jersey.innate.virtual=ALL-UNNAMED
+ --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>
@@ -93,6 +104,24 @@
</instructions>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-compile</id>
+ <configuration>
+ <!-- compile everything to ensure module-info contains right entries -->
+ <release>11</release>
+ <compilerArgs>
+ <arg>--add-opens</arg>
+ <arg>org.glassfish.jersey.incubator.media.kryo=ALL-UNNAMED</arg>
+ <arg>-Xdiags:verbose</arg>
+ </compilerArgs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
diff --git a/incubator/kryo/src/main/java/module-info.java b/incubator/kryo/src/main/java/module-info.java
new file mode 100644
index 0000000..1bed528
--- /dev/null
+++ b/incubator/kryo/src/main/java/module-info.java
@@ -0,0 +1,30 @@
+/*
+ * 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
+ * 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.inject;
+ requires jakarta.ws.rs;
+
+ requires kryo;
+
+ requires org.glassfish.jersey.core.common;
+
+ 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/incubator/open-tracing/pom.xml b/incubator/open-tracing/pom.xml
index 8421239..464f9aa 100644
--- a/incubator/open-tracing/pom.xml
+++ b/incubator/open-tracing/pom.xml
@@ -85,6 +85,7 @@
<artifactId>build-helper-maven-plugin</artifactId>
<inherited>true</inherited>
</plugin>
+ <!-- Felix plugin -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
diff --git a/incubator/open-tracing/src/main/java/module-info.java b/incubator/open-tracing/src/main/java/module-info.java
new file mode 100644
index 0000000..98696d7
--- /dev/null
+++ b/incubator/open-tracing/src/main/java/module-info.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2022, 2025 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.open.tracing {
+ requires java.logging;
+
+ requires jakarta.ws.rs;
+
+ requires io.opentracing.api;
+ requires io.opentracing.util;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+
+ exports org.glassfish.jersey.opentracing;
+ opens org.glassfish.jersey.opentracing;
+}
\ No newline at end of file
diff --git a/inject/cdi2-se/pom.xml b/inject/cdi2-se/pom.xml
index 21096b0..7aa76f3 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/inject/cdi2-se/src/main/java/module-info.java b/inject/cdi2-se/src/main/java/module-info.java
new file mode 100644
index 0000000..23918e3
--- /dev/null
+++ b/inject/cdi2-se/src/main/java/module-info.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2022, 2025 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.inject.cdi2.se {
+ requires java.logging;
+
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.interceptor;
+ requires jakarta.ws.rs;
+
+ requires jakarta.cdi;
+ requires weld.api;
+ requires weld.spi;
+
+ requires weld.core.impl;
+ requires weld.se.core;
+
+ requires org.glassfish.jersey.core.common;
+
+ exports org.glassfish.jersey.inject.cdi.se;
+ exports org.glassfish.jersey.inject.cdi.se.injector;
+ exports org.glassfish.jersey.inject.cdi.se.bean;
+
+ opens org.glassfish.jersey.inject.cdi.se;
+ opens org.glassfish.jersey.inject.cdi.se.injector;
+ opens org.glassfish.jersey.inject.cdi.se.bean;
+
+ provides org.glassfish.jersey.internal.inject.InjectionManagerFactory with
+ org.glassfish.jersey.inject.cdi.se.CdiSeInjectionManagerFactory;
+}
\ No newline at end of file
diff --git a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/injector/JerseyInjectionTarget.java b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/injector/JerseyInjectionTarget.java
index 8073f4c..79d48d2 100644
--- a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/injector/JerseyInjectionTarget.java
+++ b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/injector/JerseyInjectionTarget.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2025 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,9 @@
import java.lang.reflect.Modifier;
import java.util.Collection;
import java.util.List;
+import java.util.logging.Logger;
+import jakarta.enterprise.inject.spi.DeploymentException;
import jakarta.ws.rs.WebApplicationException;
import jakarta.enterprise.context.spi.CreationalContext;
@@ -29,6 +31,7 @@
import jakarta.enterprise.inject.spi.InjectionTarget;
import jakarta.enterprise.inject.spi.Interceptor;
+import org.glassfish.jersey.inject.cdi.se.LocalizationMessages;
import org.glassfish.jersey.inject.cdi.se.bean.BeanHelper;
import org.glassfish.jersey.internal.inject.InjectionResolver;
import org.glassfish.jersey.internal.util.collection.LazyValue;
@@ -51,22 +54,23 @@
import org.jboss.weld.injection.producer.SubclassDecoratorApplyingInstantiator;
import org.jboss.weld.injection.producer.SubclassedComponentInstantiator;
import org.jboss.weld.interceptor.spi.model.InterceptionModel;
-import org.jboss.weld.logging.BeanLogger;
import org.jboss.weld.resources.ClassTransformer;
import org.jboss.weld.util.reflection.Formats;
/**
* Wrapper for {@link InjectionTarget} that implements the functionality of injecting using JAX-RS annotations into provided
- * instances. {@code Delegate} is a original {@code InjectionTarget} which is able to inject other fields/parameters which
+ * instances. {@code Delegate} is an original {@code InjectionTarget} which is able to inject other fields/parameters which
* are managed by CDI.
* <p>
- * Implementation is also able create with custom {@code jerseyConstructor} if it is provided. This functionality allows override
+ * Implementation is also able to create with custom {@code jerseyConstructor} if it is provided. This functionality allows override
* default instantiator and use the Jersey-specific one.
*
* @author Petr Bouda
*/
public class JerseyInjectionTarget<T> extends BasicInjectionTarget<T> {
+ private static final Logger LOGGER = Logger.getLogger(JerseyInjectionTarget.class.getName());
+
private final Bean<T> bean;
private final Class<T> clazz;
private final LazyValue<JerseyInstanceInjector<T>> injector;
@@ -220,16 +224,16 @@
}
EnhancedAnnotatedConstructor<T> constructor = type.getNoArgsEnhancedConstructor();
if (constructor == null) {
- throw BeanLogger.LOG.decoratedHasNoNoargsConstructor(this);
+ throw deploymentException(LocalizationMessages.IT_DECORATED_HAS_NO_NOARGS_CONSTRUCTOR(type));
} else if (constructor.isPrivate()) {
- throw BeanLogger.LOG
- .decoratedNoargsConstructorIsPrivate(this, Formats.formatAsStackTraceElement(constructor.getJavaMember()));
+ String stackTraceElement = Formats.formatAsStackTraceElement(constructor.getJavaMember());
+ throw deploymentException(LocalizationMessages.IT_DECORATED_NOARGS_CONSTRUCTOR_PRIVATE(type, stackTraceElement));
}
}
private void checkDecoratedMethods(EnhancedAnnotatedType<T> type, List<Decorator<?>> decorators) {
if (type.isFinal()) {
- throw BeanLogger.LOG.finalBeanClassWithDecoratorsNotAllowed(this);
+ throw deploymentException(LocalizationMessages.IT_FINAL_BEAN_CLASS_WITH_DECORATORS_NOT_ALLOWED(type));
}
checkNoArgsConstructor(type);
for (Decorator<?> decorator : decorators) {
@@ -241,13 +245,13 @@
} else if (decorator instanceof CustomDecoratorWrapper<?>) {
decoratorClass = ((CustomDecoratorWrapper<?>) decorator).getEnhancedAnnotated();
} else {
- throw BeanLogger.LOG.nonContainerDecorator(decorator);
+ throw illegalStateException(LocalizationMessages.IT_NON_CONTAINER_DECORATOR(decorator));
}
for (EnhancedAnnotatedMethod<?, ?> decoratorMethod : decoratorClass.getEnhancedMethods()) {
EnhancedAnnotatedMethod<?, ?> method = type.getEnhancedMethod(decoratorMethod.getSignature());
if (method != null && !method.isStatic() && !method.isPrivate() && method.isFinal()) {
- throw BeanLogger.LOG.finalBeanClassWithInterceptorsNotAllowed(this);
+ throw deploymentException(LocalizationMessages.IT_FINAL_BEAN_CLASS_WITH_INTERCEPTORS_NOT_ALLOWED(type));
}
}
}
@@ -280,6 +284,21 @@
return !isInterceptor() && !isDecorator() && !Modifier.isAbstract(getType().getJavaClass().getModifiers());
}
+ private static IllegalStateException illegalStateException(String message) {
+ LOGGER.warning(message);
+ return new IllegalStateException(message);
+ }
+
+ private static DeploymentException deploymentException(String message) {
+ LOGGER.warning(message);
+ return new DeploymentException(message);
+ }
+
+ private static InjectionException injectionException(String message, Throwable cause) {
+ LOGGER.warning(message);
+ return new InjectionException(message, cause);
+ }
+
@Override
public Bean<T> getBean() {
return this.bean;
diff --git a/inject/cdi2-se/src/main/resources/org/glassfish/jersey/inject/cdi/se/localization.properties b/inject/cdi2-se/src/main/resources/org/glassfish/jersey/inject/cdi/se/localization.properties
index 2422697..5078c31 100644
--- a/inject/cdi2-se/src/main/resources/org/glassfish/jersey/inject/cdi/se/localization.properties
+++ b/inject/cdi2-se/src/main/resources/org/glassfish/jersey/inject/cdi/se/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,3 +16,11 @@
# {0} - full classname
cdi2.provider.not.registrable=Provider registered to CdiInjectionManager cannot be process because of incompatible type: {0}.
+it.processing.annotation.exception=Exception occurred during Jersey/JAX-RS annotations processing in the class: {0}.
+it.unexpected.instantiator=Unexpected instantiator {0}.
+it.decorated.has.no.noargs.constructor=Bean class which has decorators must have a public constructor without parameters: {0}
+it.decorated.noargs.constructor.private=Constructor without parameters cannot be private in bean class which has decorators: {0} at {1} StackTrace.
+it.final.bean.class.with.decorators.not.allowed=Bean class which has decorators cannot be declared final: {0}.
+it.non.container.decorator=Cannot operate on non container provided decorator {0}.
+it.final.bean.class.with.interceptors.not.allowed=Bean class which has interceptors cannot be declared final: {0}.
+
diff --git a/inject/hk2/pom.xml b/inject/hk2/pom.xml
index f128650..e3fb11d 100644
--- a/inject/hk2/pom.xml
+++ b/inject/hk2/pom.xml
@@ -73,6 +73,18 @@
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>jakarta.xml.bind</groupId>
+ <artifactId>jakarta.xml.bind-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jakarta.annotation</groupId>
+ <artifactId>jakarta.annotation-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jakarta.activation</groupId>
+ <artifactId>jakarta.activation-api</artifactId>
+ </dependency>
</dependencies>
<build>
@@ -94,6 +106,7 @@
<artifactId>build-helper-maven-plugin</artifactId>
<inherited>true</inherited>
</plugin>
+ <!-- Felix plugin -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
diff --git a/inject/hk2/src/main/java/module-info.java b/inject/hk2/src/main/java/module-info.java
new file mode 100644
index 0000000..bb79c18
--- /dev/null
+++ b/inject/hk2/src/main/java/module-info.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2022, 2025 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.inject.hk2 {
+
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires java.logging;
+
+ //HK2 is not yet modularized
+ requires org.glassfish.hk2.api;
+ requires org.glassfish.hk2.locator;
+ requires org.glassfish.hk2.utilities;
+
+ requires org.glassfish.jersey.core.common;
+
+ exports org.glassfish.jersey.inject.hk2;
+ opens org.glassfish.jersey.inject.hk2;
+
+ provides org.glassfish.jersey.innate.inject.spi.ExternalRegistrables with
+ org.glassfish.jersey.inject.hk2.Hk2Registrables;
+ provides org.glassfish.jersey.internal.inject.InjectionManagerFactory with
+ org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory;
+}
\ No newline at end of file
diff --git a/inject/hk2/src/main/java/org/glassfish/jersey/inject/hk2/AbstractBinder.java b/inject/hk2/src/main/java/org/glassfish/jersey/inject/hk2/AbstractBinder.java
index ff0fa27..02c2de5 100644
--- a/inject/hk2/src/main/java/org/glassfish/jersey/inject/hk2/AbstractBinder.java
+++ b/inject/hk2/src/main/java/org/glassfish/jersey/inject/hk2/AbstractBinder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2024, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,8 +16,18 @@
package org.glassfish.jersey.inject.hk2;
+import jakarta.inject.Provider;
+import jakarta.ws.rs.core.GenericType;
import org.glassfish.jersey.innate.inject.BlindBinder;
import org.glassfish.jersey.internal.inject.Binder;
+import org.glassfish.jersey.internal.inject.Binding;
+import org.glassfish.jersey.internal.inject.InjectionManager;
+import org.glassfish.jersey.internal.inject.InjectionResolver;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Collection;
+import java.util.function.Supplier;
/**
* Implementation of {@link Binder} interface dedicated to keep some level of code compatibility between previous HK2
@@ -25,6 +35,174 @@
* <p>
* Currently, there are supported only bind method and more complicated method where HK2 interfaces are required were omitted.
*/
-public abstract class AbstractBinder extends BlindBinder {
+public abstract class AbstractBinder implements Binder {
+ private class XBinder extends BlindBinder {
+ protected <T> Provider<T> createManagedInstanceProvider(Class<T> clazz) {
+ return super.createManagedInstanceProvider(clazz);
+ }
+ protected void configure() {
+ AbstractBinder.this.configure();
+ }
+ }
+ private XBinder binder = new XBinder();
+
+ /**
+ * Implement to provide binding definitions using the exposed binding methods.
+ */
+ protected abstract void configure();
+
+ /**
+ * Creates a new instance of {@link Provider} which is able to retrieve a managed instance registered in
+ * {@link InjectionManager}. If {@code InjectionManager} is {@code null} at the time of calling {@link Provider#get()} then
+ * {@link IllegalStateException} is thrown.
+ *
+ * @param clazz class of managed instance.
+ * @param <T> type of the managed instance returned using provider.
+ * @return provider with instance of managed instance.
+ */
+ protected final <T> Provider<T> createManagedInstanceProvider(Class<T> clazz) {
+ return binder.createManagedInstanceProvider(clazz);
+ }
+
+ /**
+ * Start building a new class-based service binding.
+ * <p>
+ * Does NOT bind the service type itself as a contract type.
+ *
+ * @param <T> service type.
+ * @param serviceType service class.
+ * @return initialized binding builder.
+ */
+ public <T> Binding<T, ?> bind(Class<T> serviceType) {
+ return binder.bind(serviceType);
+ }
+
+ /**
+ * Binds the provided binding and return the same instance.
+ *
+ * @param binding binding.
+ * @return the same provided binding.
+ */
+ public Binding bind(Binding binding) {
+ return binder.bind(binding);
+ }
+
+ /**
+ * Start building a new class-based service binding.
+ * <p>
+ * Binds the service type itself as a contract type.
+ *
+ * @param <T> service type.
+ * @param serviceType service class.
+ * @return initialized binding builder.
+ */
+ public <T> Binding<T, ?> bindAsContract(Class<T> serviceType) {
+ return binder.bindAsContract(serviceType);
+ }
+
+ /**
+ * Start building a new generic type-based service binding.
+ * <p>
+ * Binds the generic service type itself as a contract type.
+ *
+ * @param <T> service type.
+ * @param serviceType generic service type information.
+ * @return initialized binding builder.
+ */
+ public <T> Binding<T, ?> bindAsContract(GenericType<T> serviceType) {
+ return binder.bindAsContract(serviceType);
+ }
+
+ /**
+ * Start building a new generic type-based service binding.
+ * <p>
+ * Binds the generic service type itself as a contract type.
+ *
+ * @param serviceType generic service type information.
+ * @return initialized binding builder.
+ */
+ public Binding<Object, ?> bindAsContract(Type serviceType) {
+ return binder.bindAsContract(serviceType);
+ }
+
+ /**
+ * Start building a new instance-based service binding. The binding is naturally
+ * considered to be a {@link jakarta.inject.Singleton singleton-scoped}.
+ * <p>
+ * Does NOT bind the service type itself as a contract type.
+ *
+ * @param <T> service type.
+ * @param service service instance.
+ * @return initialized binding builder.
+ */
+ public <T> Binding<T, ?> bind(T service) {
+ return binder.bind(service);
+ }
+
+ /**
+ * Start building a new supplier class-based service binding.
+ *
+ * @param <T> service type.
+ * @param supplierType service supplier class.
+ * @param supplierScope factory scope.
+ * @return initialized binding builder.
+ */
+ public <T> Binding<Supplier<T>, ?> bindFactory(
+ Class<? extends Supplier<T>> supplierType, Class<? extends Annotation> supplierScope) {
+ return binder.bindFactory(supplierType, supplierScope);
+ }
+
+ /**
+ * Start building a new supplier class-based service binding.
+ * <p>
+ * The supplier itself is bound in a per-lookup scope.
+ *
+ * @param <T> service type.
+ * @param supplierType service supplier class.
+ * @return initialized binding builder.
+ */
+ public <T> Binding<Supplier<T>, ?> bindFactory(Class<? extends Supplier<T>> supplierType) {
+ return binder.bindFactory(supplierType);
+ }
+
+ /**
+ * Start building a new supplier instance-based service binding.
+ *
+ * @param <T> service type.
+ * @param factory service instance.
+ * @return initialized binding builder.
+ */
+ public <T> Binding<Supplier<T>, ?> bindFactory(Supplier<T> factory) {
+ return binder.bindFactory(factory);
+ }
+
+ /**
+ * Start building a new injection resolver binding. The injection resolver is naturally
+ * considered to be a {@link jakarta.inject.Singleton singleton-scoped}.
+ * <p>
+ * There is no need to provide any additional information. Other method on {@link Binding}
+ * will be ignored.
+ *
+ * @param <T> type of the injection resolver.
+ * @param resolver injection resolver instance.
+ * @return initialized binding builder.
+ */
+ public <T extends InjectionResolver> Binding<T, ?> bind(T resolver) {
+ return binder.bind(resolver);
+ }
+
+ /**
+ * Adds all binding definitions from the binders to the binding configuration.
+ *
+ * @param binders binders whose binding definitions should be configured.
+ */
+ public final void install(Binder... binders) {
+ binder.install(binders);
+ }
+
+ @Override
+ public Collection<Binding> getBindings() {
+ return binder.getBindings();
+ }
}
diff --git a/media/jaxb/pom.xml b/media/jaxb/pom.xml
index e24de1f..a748c3b 100644
--- a/media/jaxb/pom.xml
+++ b/media/jaxb/pom.xml
@@ -30,6 +30,12 @@
<packaging>jar</packaging>
<name>jersey-media-jaxb</name>
+ <properties>
+ <surefire.security.argline>
+ --add-reads org.glassfish.jersey.media.jaxb=org.glassfish.jersey.inject.hk2 --add-opens org.glassfish.jersey.media.jaxb/org.glassfish.jersey.jaxb.internal=jakarta.xml.bind
+ </surefire.security.argline>
+ </properties>
+
<description>
JAX-RS features based upon JAX-B.
</description>
diff --git a/media/jaxb/src/main/java/module-info.java b/media/jaxb/src/main/java/module-info.java
new file mode 100644
index 0000000..2f614ad
--- /dev/null
+++ b/media/jaxb/src/main/java/module-info.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2022, 2025 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.media.jaxb {
+ requires java.logging;
+
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.common;
+
+ exports org.glassfish.jersey.jaxb;
+ exports org.glassfish.jersey.jaxb.internal;
+ exports org.glassfish.jersey.jaxb.internal.l10n;
+
+ opens org.glassfish.jersey.jaxb;
+ opens org.glassfish.jersey.jaxb.internal;
+ opens org.glassfish.jersey.jaxb.internal.l10n;
+
+ provides org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable
+ with org.glassfish.jersey.jaxb.internal.JaxbAutoDiscoverable;
+}
\ No newline at end of file
diff --git a/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/AbstractCollectionJaxbProvider.java b/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/AbstractCollectionJaxbProvider.java
index eb8fe7b..377a931 100644
--- a/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/AbstractCollectionJaxbProvider.java
+++ b/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/AbstractCollectionJaxbProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2025 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
@@ -56,6 +56,7 @@
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
+import org.glassfish.jersey.jaxb.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.message.internal.EntityInputStream;
import org.glassfish.jersey.message.internal.ReaderWriter;
diff --git a/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/JaxbFeatureUtil.java b/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/JaxbFeatureUtil.java
index 3cf9c6e..f2b991c 100644
--- a/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/JaxbFeatureUtil.java
+++ b/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/JaxbFeatureUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -20,6 +20,7 @@
import org.glassfish.jersey.internal.inject.Providers;
import org.glassfish.jersey.jaxb.FeatureSupplier;
import org.glassfish.jersey.jaxb.PropertySupplier;
+import org.glassfish.jersey.jaxb.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.model.internal.RankedComparator;
import java.util.Map;
diff --git a/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/JaxbStringReaderProvider.java b/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/JaxbStringReaderProvider.java
index 7065c43..e679dca 100644
--- a/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/JaxbStringReaderProvider.java
+++ b/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/JaxbStringReaderProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -44,6 +44,7 @@
import org.glassfish.jersey.internal.util.collection.Value;
import org.glassfish.jersey.internal.util.collection.Values;
+import org.glassfish.jersey.jaxb.internal.l10n.LocalizationMessages;
import org.xml.sax.InputSource;
/**
diff --git a/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/SecureSaxParserFactory.java b/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/SecureSaxParserFactory.java
index 0c5e60c..5de664c 100644
--- a/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/SecureSaxParserFactory.java
+++ b/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/SecureSaxParserFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 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
@@ -36,6 +36,7 @@
import org.glassfish.jersey.internal.util.SaxHelper;
+import org.glassfish.jersey.jaxb.internal.l10n.LocalizationMessages;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
diff --git a/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/TransformerFactoryInjectionProvider.java b/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/TransformerFactoryInjectionProvider.java
index 43acbb3..8481513 100644
--- a/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/TransformerFactoryInjectionProvider.java
+++ b/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/TransformerFactoryInjectionProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -25,6 +25,8 @@
import jakarta.inject.Inject;
import jakarta.ws.rs.core.Context;
+import org.glassfish.jersey.jaxb.internal.l10n.LocalizationMessages;
+
import javax.xml.XMLConstants;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerFactory;
diff --git a/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/XmlRootObjectJaxbProvider.java b/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/XmlRootObjectJaxbProvider.java
index d0f1bd3..be01ee5 100644
--- a/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/XmlRootObjectJaxbProvider.java
+++ b/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/XmlRootObjectJaxbProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2025 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
@@ -43,6 +43,7 @@
import jakarta.xml.bind.Unmarshaller;
import javax.xml.parsers.SAXParserFactory;
+import org.glassfish.jersey.jaxb.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.message.internal.EntityInputStream;
/**
diff --git a/media/jaxb/src/main/resources/org/glassfish/jersey/jaxb/internal/localization.properties b/media/jaxb/src/main/resources/org/glassfish/jersey/jaxb/internal/l10n/localization.properties
similarity index 96%
rename from media/jaxb/src/main/resources/org/glassfish/jersey/jaxb/internal/localization.properties
rename to media/jaxb/src/main/resources/org/glassfish/jersey/jaxb/internal/l10n/localization.properties
index 9cb460f..ab29e6d 100644
--- a/media/jaxb/src/main/resources/org/glassfish/jersey/jaxb/internal/localization.properties
+++ b/media/jaxb/src/main/resources/org/glassfish/jersey/jaxb/internal/l10n/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/media/json-binding/pom.xml b/media/json-binding/pom.xml
index f629747..e21b7cb 100644
--- a/media/json-binding/pom.xml
+++ b/media/json-binding/pom.xml
@@ -115,4 +115,12 @@
<scope>test</scope>
</dependency>
</dependencies>
+
+ <properties>
+ <!-- JPMS relatest test config -->
+ <surefire.coverage.argline>
+ --add-reads org.glassfish.jersey.media.jsonb=org.glassfish.jersey.inject.hk2
+ --add-modules=ALL-MODULE-PATH
+ </surefire.coverage.argline>
+ </properties>
</project>
diff --git a/media/json-binding/src/main/java/module-info.java b/media/json-binding/src/main/java/module-info.java
new file mode 100644
index 0000000..ca53be1
--- /dev/null
+++ b/media/json-binding/src/main/java/module-info.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2022, 2025 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.media.jsonb {
+ requires java.logging;
+
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.json.bind;
+ requires jakarta.ws.rs;
+
+ requires static osgi.resource.locator;
+
+ requires org.glassfish.jersey.core.common;
+
+ exports org.glassfish.jersey.jsonb;
+ exports org.glassfish.jersey.jsonb.internal;
+ opens org.glassfish.jersey.jsonb;
+ opens org.glassfish.jersey.jsonb.internal;
+
+ provides org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable with
+ org.glassfish.jersey.jsonb.internal.JsonBindingAutoDiscoverable;
+}
\ No newline at end of file
diff --git a/media/json-gson/src/main/java/module-info.java b/media/json-gson/src/main/java/module-info.java
new file mode 100644
index 0000000..ac7f400
--- /dev/null
+++ b/media/json-gson/src/main/java/module-info.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2025 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.media.json.gson {
+ requires com.google.gson;
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires org.glassfish.jersey.core.common;
+
+ exports org.glassfish.jersey.gson;
+ exports org.glassfish.jersey.gson.internal;
+ opens org.glassfish.jersey.gson;
+ opens org.glassfish.jersey.gson.internal;
+
+ provides org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable with
+ org.glassfish.jersey.gson.internal.JsonGsonAutoDiscoverable;
+}
\ No newline at end of file
diff --git a/media/json-jackson/pom.xml b/media/json-jackson/pom.xml
index 49e0845..44552d6 100644
--- a/media/json-jackson/pom.xml
+++ b/media/json-jackson/pom.xml
@@ -57,6 +57,16 @@
</license>
</licenses>
+ <properties>
+ <surefire.security.argline>
+ --add-reads org.glassfish.jersey.media.json.jackson=org.glassfish.jersey.core.server
+ --add-reads org.glassfish.jersey.media.json.jackson=org.glassfish.jersey.core.client
+ --add-exports org.glassfish.jersey.media.json.jackson/org.glassfish.jersey.jackson.internal.model=org.glassfish.jersey.core.server
+ --add-opens org.glassfish.jersey.media.json.jackson/org.glassfish.jersey.jackson.internal.model=org.glassfish.hk2.locator
+ --add-opens org.glassfish.jersey.media.json.jackson/org.glassfish.jersey.jackson.internal.model=com.fasterxml.jackson.databind
+ </surefire.security.argline>
+ </properties>
+
<build>
<plugins>
<plugin>
@@ -107,14 +117,6 @@
<version>${project.version}</version>
</dependency>
- <!--<dependency>-->
- <!--<groupId>com.fasterxml.jackson.jaxrs</groupId>-->
- <!--<artifactId>jackson-jaxrs-base</artifactId>-->
- <!--</dependency>-->
- <!--<dependency>-->
- <!--<groupId>com.fasterxml.jackson.jaxrs</groupId>-->
- <!--<artifactId>jackson-jaxrs-json-provider</artifactId>-->
- <!--</dependency>-->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
diff --git a/media/json-jackson/src/main/java/module-info.java b/media/json-jackson/src/main/java/module-info.java
new file mode 100644
index 0000000..a513cbd
--- /dev/null
+++ b/media/json-jackson/src/main/java/module-info.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2022, 2025 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.media.json.jackson {
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires java.logging;
+
+ requires com.fasterxml.jackson.core;
+ requires com.fasterxml.jackson.annotation;
+ requires com.fasterxml.jackson.databind;
+ requires static com.fasterxml.jackson.module.jaxb;
+ requires static com.fasterxml.jackson.module.jakarta.xmlbind;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.ext.entity.filtering;
+
+ exports org.glassfish.jersey.jackson;
+ exports org.glassfish.jersey.jackson.internal;
+ exports org.glassfish.jersey.jackson.internal.jackson.jaxrs.annotation;
+ exports org.glassfish.jersey.jackson.internal.jackson.jaxrs.base;
+ exports org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg;
+ exports org.glassfish.jersey.jackson.internal.jackson.jaxrs.json;
+ exports org.glassfish.jersey.jackson.internal.jackson.jaxrs.json.annotation;
+ exports org.glassfish.jersey.jackson.internal.jackson.jaxrs.util;
+
+ opens org.glassfish.jersey.jackson;
+ opens org.glassfish.jersey.jackson.internal;
+ opens org.glassfish.jersey.jackson.internal.jackson.jaxrs.annotation;
+ opens org.glassfish.jersey.jackson.internal.jackson.jaxrs.base;
+ opens org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg;
+ opens org.glassfish.jersey.jackson.internal.jackson.jaxrs.json;
+ opens org.glassfish.jersey.jackson.internal.jackson.jaxrs.json.annotation;
+ opens org.glassfish.jersey.jackson.internal.jackson.jaxrs.util;
+
+ provides org.glassfish.jersey.internal.spi.AutoDiscoverable with
+ org.glassfish.jersey.jackson.internal.JacksonAutoDiscoverable;
+
+}
\ No newline at end of file
diff --git a/media/json-jettison/pom.xml b/media/json-jettison/pom.xml
index 35a33bf..2d10e95 100644
--- a/media/json-jettison/pom.xml
+++ b/media/json-jettison/pom.xml
@@ -61,10 +61,7 @@
</Import-Package>
<Export-Package>org.glassfish.jersey.jettison.*</Export-Package>
-
- <!--<Import-Package>
- com.sun.xml.bind.annotation;resolution:=optional,com.sun.xml.bind.v2.*;resolution:=optional, *
- </Import-Package>-->
+
</instructions>
<unpackBundle>true</unpackBundle>
</configuration>
diff --git a/media/json-jettison/src/main/java/module-info.java b/media/json-jettison/src/main/java/module-info.java
new file mode 100644
index 0000000..671ce68
--- /dev/null
+++ b/media/json-jettison/src/main/java/module-info.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2022, 2025 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.media.json.jettison {
+ requires java.logging;
+ requires java.xml;
+
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires static jakarta.xml.bind;
+
+ requires jettison;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.media.jaxb;
+
+ exports org.glassfish.jersey.jettison;
+ exports org.glassfish.jersey.jettison.internal;
+ exports org.glassfish.jersey.jettison.internal.entity;
+ exports org.glassfish.jersey.jettison.internal.l10n;
+
+ opens org.glassfish.jersey.jettison;
+ opens org.glassfish.jersey.jettison.internal;
+ opens org.glassfish.jersey.jettison.internal.entity;
+ opens org.glassfish.jersey.jettison.internal.l10n;
+}
\ No newline at end of file
diff --git a/media/json-jettison/src/main/java/org/glassfish/jersey/jettison/internal/entity/JettisonArrayProvider.java b/media/json-jettison/src/main/java/org/glassfish/jersey/jettison/internal/entity/JettisonArrayProvider.java
index 1a15641..a0ddb99 100644
--- a/media/json-jettison/src/main/java/org/glassfish/jersey/jettison/internal/entity/JettisonArrayProvider.java
+++ b/media/json-jettison/src/main/java/org/glassfish/jersey/jettison/internal/entity/JettisonArrayProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2025 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
@@ -29,7 +29,7 @@
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.MultivaluedMap;
-import org.glassfish.jersey.jettison.internal.LocalizationMessages;
+import org.glassfish.jersey.jettison.internal.l10n.LocalizationMessages;
import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONException;
diff --git a/media/json-jettison/src/main/java/org/glassfish/jersey/jettison/internal/entity/JettisonObjectProvider.java b/media/json-jettison/src/main/java/org/glassfish/jersey/jettison/internal/entity/JettisonObjectProvider.java
index 2f4eaec..cf96a98 100644
--- a/media/json-jettison/src/main/java/org/glassfish/jersey/jettison/internal/entity/JettisonObjectProvider.java
+++ b/media/json-jettison/src/main/java/org/glassfish/jersey/jettison/internal/entity/JettisonObjectProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2025 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
@@ -29,7 +29,7 @@
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.MultivaluedMap;
-import org.glassfish.jersey.jettison.internal.LocalizationMessages;
+import org.glassfish.jersey.jettison.internal.l10n.LocalizationMessages;
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
diff --git a/media/json-jettison/src/main/resources/org/glassfish/jersey/jettison/internal/localization.properties b/media/json-jettison/src/main/resources/org/glassfish/jersey/jettison/internal/l10n/localization.properties
similarity index 92%
rename from media/json-jettison/src/main/resources/org/glassfish/jersey/jettison/internal/localization.properties
rename to media/json-jettison/src/main/resources/org/glassfish/jersey/jettison/internal/l10n/localization.properties
index 9e5e3cf..259796d 100644
--- a/media/json-jettison/src/main/resources/org/glassfish/jersey/jettison/internal/localization.properties
+++ b/media/json-jettison/src/main/resources/org/glassfish/jersey/jettison/internal/l10n/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/media/json-processing/pom.xml b/media/json-processing/pom.xml
index 5d8299c..c15f8fa 100644
--- a/media/json-processing/pom.xml
+++ b/media/json-processing/pom.xml
@@ -112,4 +112,7 @@
<scope>test</scope>
</dependency>
</dependencies>
+ <properties>
+ <surefire.coverage.argline>--add-modules=ALL-MODULE-PATH</surefire.coverage.argline>
+ </properties>
</project>
diff --git a/media/json-processing/src/main/java/module-info.java b/media/json-processing/src/main/java/module-info.java
new file mode 100644
index 0000000..40a9958
--- /dev/null
+++ b/media/json-processing/src/main/java/module-info.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2022, 2025 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.media.json.processing {
+ requires jakarta.annotation;
+ requires jakarta.ws.rs;
+
+ requires org.eclipse.parsson.media;
+
+ requires org.glassfish.jersey.core.common;
+
+ exports org.glassfish.jersey.jsonp;
+ exports org.glassfish.jersey.jsonp.internal to
+ org.glassfish.hk2.locator,
+ org.glassfish.hk2.utilities;
+
+ opens org.glassfish.jersey.jsonp.internal to
+ org.glassfish.hk2.locator,
+ org.glassfish.hk2.utilities,
+ org.glassfish.jersey.core.client, // NonInjectionManager
+ org.glassfish.jersey.incubator.cdi.inject.weld,
+ org.glassfish.jersey.inject.cdi2.se,
+ weld.core.impl;
+
+
+ provides org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable with
+ org.glassfish.jersey.jsonp.internal.JsonProcessingAutoDiscoverable;
+}
\ No newline at end of file
diff --git a/media/json-processing/src/test/java/module-info.java b/media/json-processing/src/test/java/module-info.java
new file mode 100644
index 0000000..47b248e
--- /dev/null
+++ b/media/json-processing/src/test/java/module-info.java
@@ -0,0 +1,32 @@
+/*
+ * 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
+ */
+
+open module org.glassfish.jersey.media.json.processing.test {
+ requires jakarta.annotation;
+ requires jakarta.ws.rs;
+
+ 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.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 95%
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..0cbe9e3 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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.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 96%
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..254f33c 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
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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.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/pom.xml b/media/moxy/pom.xml
index 5794b11..eefd442 100644
--- a/media/moxy/pom.xml
+++ b/media/moxy/pom.xml
@@ -47,7 +47,7 @@
<artifactId>build-helper-maven-plugin</artifactId>
<inherited>true</inherited>
</plugin>
-
+ <!-- Felix plugin -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
@@ -133,6 +133,12 @@
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>jakarta.activation</groupId>
+ <artifactId>jakarta.activation-api</artifactId>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
diff --git a/media/moxy/src/main/java/module-info.java b/media/moxy/src/main/java/module-info.java
new file mode 100644
index 0000000..2fc7daa
--- /dev/null
+++ b/media/moxy/src/main/java/module-info.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2022, 2025 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.media.moxy {
+ requires java.logging;
+
+ requires jakarta.ws.rs;
+ requires jakarta.annotation;
+ requires jakarta.inject;
+
+ requires static jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.ext.entity.filtering;
+
+ requires org.eclipse.persistence.core;
+ requires org.eclipse.persistence.moxy;
+
+ exports org.glassfish.jersey.moxy.internal;
+ exports org.glassfish.jersey.moxy.json;
+ exports org.glassfish.jersey.moxy.xml;
+
+ opens org.glassfish.jersey.moxy.internal;
+ opens org.glassfish.jersey.moxy.json;
+ opens org.glassfish.jersey.moxy.json.internal to
+ org.glassfish.hk2.locator,
+ org.glassfish.hk2.utilities,
+ org.glassfish.jersey.core.client,
+ org.glassfish.jersey.incubator.cdi.inject.weld,
+ org.glassfish.jersey.inject.cdi2.se,
+ weld.core.impl;
+ opens org.glassfish.jersey.moxy.xml;
+
+ provides org.glassfish.jersey.internal.spi.AutoDiscoverable with
+ org.glassfish.jersey.moxy.json.internal.MoxyJsonAutoDiscoverable;
+}
\ No newline at end of file
diff --git a/media/multipart/pom.xml b/media/multipart/pom.xml
index d80e102..9aa2cd3 100644
--- a/media/multipart/pom.xml
+++ b/media/multipart/pom.xml
@@ -34,6 +34,14 @@
Jersey Multipart entity providers support module.
</description>
+ <properties>
+ <surefire.coverage.argline>
+ --add-exports org.glassfish.jersey.core.common/org.glassfish.jersey.innate.io=ALL-UNNAMED
+ --add-exports org.glassfish.jersey.core.client/org.glassfish.jersey.client.innate=ALL-UNNAMED
+ --add-reads org.glassfish.jersey.media.multipart=jakarta.json
+ </surefire.coverage.argline>
+ </properties>
+
<build>
<plugins>
<plugin>
@@ -107,6 +115,7 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
+
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
diff --git a/media/multipart/src/main/java/module-info.java b/media/multipart/src/main/java/module-info.java
new file mode 100644
index 0000000..755dbdf
--- /dev/null
+++ b/media/multipart/src/main/java/module-info.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2022, 2025 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.media.multipart {
+
+ requires java.logging;
+
+ requires jakarta.ws.rs;
+ requires jakarta.inject;
+
+ requires org.jvnet.mimepull;
+
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.common;
+
+ exports org.glassfish.jersey.media.multipart;
+ exports org.glassfish.jersey.media.multipart.file;
+ exports org.glassfish.jersey.media.multipart.internal;
+// org.glassfish.hk2.locator,
+// org.glassfish.hk2.utilities,
+// org.glassfish.jersey.core.server,
+// org.glassfish.jersey.core.client;
+ exports org.glassfish.jersey.media.multipart.internal.l10n;
+
+ opens org.glassfish.jersey.media.multipart;
+ opens org.glassfish.jersey.media.multipart.file;
+ opens org.glassfish.jersey.media.multipart.internal;
+// org.glassfish.hk2.locator,
+// org.glassfish.hk2.utilities,
+// org.glassfish.jersey.core.server,
+// org.glassfish.jersey.core.client,
+// org.glassfish.jersey.incubator.cdi.inject.weld,
+// org.glassfish.jersey.inject.cdi2.se,
+// weld.core.impl;
+
+ opens org.glassfish.jersey.media.multipart.internal.l10n;
+
+ provides org.glassfish.jersey.innate.spi.EntityPartBuilderProvider with
+ org.glassfish.jersey.media.multipart.JerseyEntityPartBuilderProvider;
+ provides org.glassfish.jersey.internal.spi.AutoDiscoverable with
+ org.glassfish.jersey.media.multipart.MultiPartFeatureAutodiscoverable;
+}
\ No newline at end of file
diff --git a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/BodyPart.java b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/BodyPart.java
index d672e1c..d38df8d 100644
--- a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/BodyPart.java
+++ b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/BodyPart.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 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,6 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.text.ParseException;
-import java.util.Arrays;
import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.core.GenericType;
@@ -33,7 +32,7 @@
import org.glassfish.jersey.innate.spi.MessageBodyWorkersSettable;
import org.glassfish.jersey.internal.util.collection.ImmutableMultivaluedMap;
-import org.glassfish.jersey.media.multipart.internal.LocalizationMessages;
+import org.glassfish.jersey.media.multipart.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.message.MessageBodyWorkers;
import org.glassfish.jersey.message.internal.HeaderUtils;
import org.glassfish.jersey.message.internal.ParameterizedHeader;
diff --git a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/BodyPartEntity.java b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/BodyPartEntity.java
index 31349bb..6d2c488 100644
--- a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/BodyPartEntity.java
+++ b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/BodyPartEntity.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 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,7 +23,7 @@
import java.util.logging.Level;
import java.util.logging.Logger;
-import org.glassfish.jersey.media.multipart.internal.LocalizationMessages;
+import org.glassfish.jersey.media.multipart.internal.l10n.LocalizationMessages;
import org.jvnet.mimepull.MIMEPart;
diff --git a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/ContentDisposition.java b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/ContentDisposition.java
index f6c7165..89c5171 100644
--- a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/ContentDisposition.java
+++ b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/ContentDisposition.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2025 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,7 +23,7 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.glassfish.jersey.media.multipart.internal.LocalizationMessages;
+import org.glassfish.jersey.media.multipart.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.message.internal.HttpDateFormat;
import org.glassfish.jersey.message.internal.HttpHeaderReader;
import org.glassfish.jersey.uri.UriComponent;
diff --git a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/FormDataBodyPart.java b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/FormDataBodyPart.java
index 802cc02..5b79032 100644
--- a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/FormDataBodyPart.java
+++ b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/FormDataBodyPart.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 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
@@ -26,7 +26,7 @@
import jakarta.ws.rs.core.GenericType;
import jakarta.ws.rs.core.MediaType;
-import org.glassfish.jersey.media.multipart.internal.LocalizationMessages;
+import org.glassfish.jersey.media.multipart.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.message.internal.MediaTypes;
/**
diff --git a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/FormDataMultiPart.java b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/FormDataMultiPart.java
index 9a5edc4..4587b8f 100644
--- a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/FormDataMultiPart.java
+++ b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/FormDataMultiPart.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 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,7 +23,7 @@
import jakarta.ws.rs.core.MediaType;
-import org.glassfish.jersey.media.multipart.internal.LocalizationMessages;
+import org.glassfish.jersey.media.multipart.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.message.internal.MediaTypes;
/**
diff --git a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/JerseyEntityPartBuilderProvider.java b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/JerseyEntityPartBuilderProvider.java
index 307eb97..d9e6db1 100644
--- a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/JerseyEntityPartBuilderProvider.java
+++ b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/JerseyEntityPartBuilderProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025 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
@@ -26,7 +26,7 @@
import org.glassfish.jersey.innate.spi.EntityPartBuilderProvider;
import org.glassfish.jersey.media.multipart.file.FileDataBodyPart;
import org.glassfish.jersey.media.multipart.file.StreamDataBodyPart;
-import org.glassfish.jersey.media.multipart.internal.LocalizationMessages;
+import org.glassfish.jersey.media.multipart.internal.l10n.LocalizationMessages;
import java.io.File;
import java.io.IOException;
diff --git a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/internal/FormDataParamValueParamProvider.java b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/internal/FormDataParamValueParamProvider.java
index 3943065..17c9590 100644
--- a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/internal/FormDataParamValueParamProvider.java
+++ b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/internal/FormDataParamValueParamProvider.java
@@ -50,6 +50,7 @@
import org.glassfish.jersey.media.multipart.FormDataMultiPart;
import org.glassfish.jersey.media.multipart.FormDataParam;
import org.glassfish.jersey.media.multipart.FormDataParamException;
+import org.glassfish.jersey.media.multipart.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.message.MessageBodyWorkers;
import org.glassfish.jersey.message.MessageUtils;
import org.glassfish.jersey.message.internal.Utils;
diff --git a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/internal/MultiPartReaderClientSide.java b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/internal/MultiPartReaderClientSide.java
index edb80bd..ae9683b 100644
--- a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/internal/MultiPartReaderClientSide.java
+++ b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/internal/MultiPartReaderClientSide.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 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
@@ -52,6 +52,7 @@
import org.glassfish.jersey.media.multipart.FormDataMultiPart;
import org.glassfish.jersey.media.multipart.MultiPart;
import org.glassfish.jersey.media.multipart.MultiPartProperties;
+import org.glassfish.jersey.media.multipart.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.message.MessageBodyWorkers;
import org.glassfish.jersey.message.internal.MediaTypes;
diff --git a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/internal/MultiPartWriter.java b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/internal/MultiPartWriter.java
index db5fbc7..a199b50 100644
--- a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/internal/MultiPartWriter.java
+++ b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/internal/MultiPartWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 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
@@ -45,6 +45,7 @@
import org.glassfish.jersey.media.multipart.BodyPartEntity;
import org.glassfish.jersey.media.multipart.Boundary;
import org.glassfish.jersey.media.multipart.MultiPart;
+import org.glassfish.jersey.media.multipart.internal.l10n.LocalizationMessages;
import org.glassfish.jersey.message.MessageUtils;
/**
diff --git a/media/multipart/src/main/resources/org/glassfish/jersey/media/multipart/internal/localization.properties b/media/multipart/src/main/resources/org/glassfish/jersey/media/multipart/internal/l10n/localization.properties
similarity index 96%
rename from media/multipart/src/main/resources/org/glassfish/jersey/media/multipart/internal/localization.properties
rename to media/multipart/src/main/resources/org/glassfish/jersey/media/multipart/internal/l10n/localization.properties
index 13e7136..3fd91aa 100644
--- a/media/multipart/src/main/resources/org/glassfish/jersey/media/multipart/internal/localization.properties
+++ b/media/multipart/src/main/resources/org/glassfish/jersey/media/multipart/internal/l10n/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/media/sse/pom.xml b/media/sse/pom.xml
index fa15818..bcf856d 100644
--- a/media/sse/pom.xml
+++ b/media/sse/pom.xml
@@ -56,6 +56,12 @@
<type>pom</type>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>jakarta.xml.bind</groupId>
+ <artifactId>jakarta.xml.bind-api</artifactId>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
</dependencies>
<build>
@@ -86,5 +92,14 @@
</plugin>
</plugins>
</build>
-
+ <properties>
+ <surefire.coverage.argline>
+ --add-opens org.glassfish.jersey.core.common/org.glassfish.jersey.innate=ALL-UNNAMED
+ --add-opens org.glassfish.jersey.core.common/org.glassfish.jersey.innate.virtual=ALL-UNNAMED
+ --add-reads org.glassfish.jersey.media.sse=org.glassfish.jersey.inject.hk2
+ --add-opens org.glassfish.jersey.core.common/org.glassfish.jersey.innate.inject=ALL-UNNAMED
+ --add-exports org.glassfish.jersey.core.common/org.glassfish.jersey.innate.inject=ALL-UNNAMED
+ --add-modules=ALL-MODULE-PATH
+ </surefire.coverage.argline>
+ </properties>
</project>
diff --git a/media/sse/src/main/java/module-info.java b/media/sse/src/main/java/module-info.java
new file mode 100644
index 0000000..bf1a5fb
--- /dev/null
+++ b/media/sse/src/main/java/module-info.java
@@ -0,0 +1,38 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.media.sse {
+ requires java.logging;
+
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires static jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.server;
+
+ exports org.glassfish.jersey.media.sse;
+ exports org.glassfish.jersey.media.sse.internal;
+
+ opens org.glassfish.jersey.media.sse;
+ opens org.glassfish.jersey.media.sse.internal;
+
+ provides jakarta.ws.rs.sse.SseEventSource.Builder with
+ org.glassfish.jersey.media.sse.internal.JerseySseEventSource.Builder;
+}
\ No newline at end of file
diff --git a/media/sse/src/test/java/module-info.txt b/media/sse/src/test/java/module-info.txt
new file mode 100644
index 0000000..6d13930
--- /dev/null
+++ b/media/sse/src/test/java/module-info.txt
@@ -0,0 +1,38 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.media.sse {
+ requires java.logging;
+
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires jakarta.xml.bind; //it's test
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.server;
+
+ requires junit;
+ requires org.junit.jupiter.api;
+ requires org.junit.jupiter.engine;
+
+ requires org.glassfish.jersey.tests.framework.core;
+
+ exports org.glassfish.jersey.media.sse;
+ exports org.glassfish.jersey.media.sse.internal;
+ opens org.glassfish.jersey.media.sse;
+}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index bb570bc..889be49 100644
--- a/pom.xml
+++ b/pom.xml
@@ -316,9 +316,9 @@
<version>${compiler.mvn.plugin.version}</version>
<inherited>true</inherited>
<configuration>
- <source>${java.version}</source>
- <target>${java.version}</target>
+ <release>${java.version}</release>
<compilerArguments>
+
<!--<Werror />-->
<!-- TODO work towards eliminating all warnings in order to be able to enable the -Xlint option -->
<!--Xlint/-->
@@ -579,6 +579,7 @@
<configLocation>etc/config/checkstyle.xml</configLocation>
<suppressionsLocation>etc/config/checkstyle-suppressions.xml</suppressionsLocation>
<outputFile>${project.build.directory}/checkstyle/checkstyle-result.xml</outputFile>
+ <excludes>**/module-info.java</excludes>
</configuration>
<dependencies>
<dependency>
@@ -694,6 +695,7 @@
<configuration>
<instructions>
<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
+ <_noimportjava>true</_noimportjava>
<_nodefaultversion>false</_nodefaultversion>
<_noimportjava>true</_noimportjava>
<Include-Resource>{maven-resources},${project.build.directory}/legal</Include-Resource>
@@ -904,6 +906,20 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${compiler.mvn.plugin.version}</version>
+ <configuration>
+ <release>${java.version}</release>
+ <compilerArguments>
+ <!-- Do not warn about using sun.misc.Unsafe -->
+ <XDignore.symbol.file />
+ </compilerArguments>
+ <showWarnings>false</showWarnings>
+ <fork>false</fork>
+ </configuration>
+ </plugin>
</plugins>
<extensions>
<extension>
@@ -1918,6 +1934,11 @@
<!-- Weld -->
<dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-api</artifactId>
+ <version>${weld.api.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-core</artifactId>
<version>${weld.version}</version>
@@ -2127,14 +2148,7 @@
<checkstyle.mvn.plugin.version>3.6.0</checkstyle.mvn.plugin.version>
<checkstyle.version>10.21.4</checkstyle.version>
<compiler.mvn.plugin.version>3.14.0</compiler.mvn.plugin.version>
- <!--
- Special version of the compiler plugin just for the jersey-common. All versions above
- generate too much for OSGi manifest.mf imports (awt etc). The version 3.11.0 however
- introduces the fix for the excludeTests issue. Which makes it preferable for the whole project
- but the jersey-common module which has to have the separate version for OSGi reasons.
- -->
- <compiler.common.mvn.plugin.version>3.14.0</compiler.common.mvn.plugin.version>
- <cyclonedx.mvn.plugin.version>2.9.1</cyclonedx.mvn.plugin.version>
+ <cyclonedx.mvn.plugin.version>2.8.1</cyclonedx.mvn.plugin.version>
<dependency.mvn.plugin.version>3.8.1</dependency.mvn.plugin.version>
<deploy.mvn.plugin.version>3.1.4</deploy.mvn.plugin.version>
<ear.mvn.plugin.version>3.4.0</ear.mvn.plugin.version>
@@ -2248,6 +2262,7 @@
<testng6.version>6.14.3</testng6.version>
<thymeleaf.version>3.1.3.RELEASE</thymeleaf.version>
<!-- Jakartified, eligible for CQ -->
+ <weld.api.version>6.0.Final</weld.api.version>
<weld.version>6.0.3.Final</weld.version>
<validation.impl.version>8.0.2.Final</validation.impl.version>
<!-- END of Jakartified, eligible for CQ -->
@@ -2298,6 +2313,7 @@
<jetty.osgi.version>org.eclipse.jetty.*;version="[11,15)"</jetty.osgi.version>
<jetty.version>12.0.27</jetty.version>
<jetty9.version>9.4.58.v20250814</jetty9.version>
+ <jetty.servlet.api.version>5.0.2</jetty.servlet.api.version>
<jetty11.version>11.0.26</jetty11.version>
<jetty.plugin.version>12.0.22</jetty.plugin.version>
<jsonb.api.version>3.0.1</jsonb.api.version>
diff --git a/security/oauth1-client/src/main/java/module-info.java b/security/oauth1-client/src/main/java/module-info.java
new file mode 100644
index 0000000..20a6724
--- /dev/null
+++ b/security/oauth1-client/src/main/java/module-info.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2022, 2025 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.security.oauth1.client {
+ requires java.logging;
+
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.security.oauth1.signature;
+
+ exports org.glassfish.jersey.client.oauth1;
+ exports org.glassfish.jersey.client.oauth1.internal;
+
+ opens org.glassfish.jersey.client.oauth1;
+ opens org.glassfish.jersey.client.oauth1.internal;
+}
\ No newline at end of file
diff --git a/security/oauth1-server/src/main/java/module-info.java b/security/oauth1-server/src/main/java/module-info.java
new file mode 100644
index 0000000..22a59e3
--- /dev/null
+++ b/security/oauth1-server/src/main/java/module-info.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2022, 2025 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.security.oauth1.server {
+ requires java.logging;
+
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.security.oauth1.signature;
+
+ exports org.glassfish.jersey.server.oauth1;
+ exports org.glassfish.jersey.server.oauth1.internal;
+
+ opens org.glassfish.jersey.server.oauth1;
+ opens org.glassfish.jersey.server.oauth1.internal;
+}
\ No newline at end of file
diff --git a/security/oauth1-signature/src/main/java/module-info.java b/security/oauth1-signature/src/main/java/module-info.java
new file mode 100644
index 0000000..a3232d9
--- /dev/null
+++ b/security/oauth1-signature/src/main/java/module-info.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2022, 2025 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.security.oauth1.signature {
+ requires java.logging;
+
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.common;
+
+ exports org.glassfish.jersey.oauth1.signature;
+ exports org.glassfish.jersey.oauth1.signature.internal; // localization
+
+ opens org.glassfish.jersey.oauth1.signature;
+ opens org.glassfish.jersey.oauth1.signature.internal;
+}
\ No newline at end of file
diff --git a/security/oauth2-client/src/main/java/module-info.java b/security/oauth2-client/src/main/java/module-info.java
new file mode 100644
index 0000000..672264e
--- /dev/null
+++ b/security/oauth2-client/src/main/java/module-info.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2022, 2025 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.security.oauth2.client {
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.common;
+
+ exports org.glassfish.jersey.client.oauth2;
+ exports org.glassfish.jersey.client.oauth2.internal; // localization
+
+ opens org.glassfish.jersey.client.oauth2;
+ opens org.glassfish.jersey.client.oauth2.internal;
+}
\ No newline at end of file
diff --git a/test-framework/core/pom.xml b/test-framework/core/pom.xml
index c4aebc5..41fd6f8 100644
--- a/test-framework/core/pom.xml
+++ b/test-framework/core/pom.xml
@@ -38,6 +38,10 @@
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
+ <groupId>jakarta.persistence</groupId>
+ <artifactId>jakarta.persistence-api</artifactId>
+ </dependency>
+ <dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
@@ -77,6 +81,35 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-compile</id>
+ <configuration>
+ <compilerArgs>
+ <arg>--add-exports</arg>
+ <arg>org.junit.platform.commons/org.junit.platform.commons.util=org.glassfish.jersey.tests.framework.core</arg>
+ </compilerArgs>
+ <release>11</release>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <properties>
+ <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-modules=ALL-MODULE-PATH
+ </surefire.coverage.argline>
+ </properties>
+
<profiles>
<profile>
<id>sonar</id>
diff --git a/test-framework/core/src/main/java/module-info.java b/test-framework/core/src/main/java/module-info.java
new file mode 100644
index 0000000..a7e32ab
--- /dev/null
+++ b/test-framework/core/src/main/java/module-info.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2022, 2025 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.framework.core {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ requires static jakarta.servlet;
+ requires static jakarta.persistence;
+
+ requires java.logging;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.container.servlet;
+
+
+ requires static junit;
+ requires static org.junit.jupiter.api;
+
+ requires static testng;
+
+ exports org.glassfish.jersey.test;
+ exports org.glassfish.jersey.test.spi;
+ opens org.glassfish.jersey.test;
+ opens org.glassfish.jersey.test.spi;
+}
diff --git a/test-framework/core/src/main/java/org/glassfish/jersey/test/spi/TestHelper.java b/test-framework/core/src/main/java/org/glassfish/jersey/test/spi/TestHelper.java
index 0aabca5..38faa7a 100644
--- a/test-framework/core/src/main/java/org/glassfish/jersey/test/spi/TestHelper.java
+++ b/test-framework/core/src/main/java/org/glassfish/jersey/test/spi/TestHelper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -24,7 +24,8 @@
import org.junit.jupiter.api.DynamicContainer;
import org.junit.jupiter.api.DynamicTest;
-import org.junit.platform.commons.util.ReflectionUtils;
+import org.junit.platform.commons.support.HierarchyTraversalMode;
+import org.junit.platform.commons.support.ReflectionSupport;
/**
* Helper class for Jersey Test Framework.
@@ -54,13 +55,16 @@
public static DynamicContainer toTestContainer(Object test, String displayName) {
Class<?> klass = test.getClass();
- List<Method> testMethods = ReflectionUtils.findMethods(klass,
+ List<Method> testMethods = ReflectionSupport.findMethods(klass,
method -> method.isAnnotationPresent(org.junit.jupiter.api.Test.class)
- && !method.isAnnotationPresent(org.junit.jupiter.api.Disabled.class));
- List<Method> beforeEachMethods = ReflectionUtils.findMethods(klass,
- method -> method.isAnnotationPresent(org.junit.jupiter.api.BeforeEach.class));
- List<Method> afterEachMethods = ReflectionUtils.findMethods(klass,
- method -> method.isAnnotationPresent(org.junit.jupiter.api.AfterEach.class));
+ && !method.isAnnotationPresent(org.junit.jupiter.api.Disabled.class),
+ HierarchyTraversalMode.TOP_DOWN);
+ List<Method> beforeEachMethods = ReflectionSupport.findMethods(klass,
+ method -> method.isAnnotationPresent(org.junit.jupiter.api.BeforeEach.class),
+ HierarchyTraversalMode.TOP_DOWN);
+ List<Method> afterEachMethods = ReflectionSupport.findMethods(klass,
+ method -> method.isAnnotationPresent(org.junit.jupiter.api.AfterEach.class),
+ HierarchyTraversalMode.TOP_DOWN);
Collection<DynamicTest> children = new ArrayList<>();
for (Method method : testMethods) {
children.add(DynamicTest.dynamicTest(method.getName(), () -> {
diff --git a/test-framework/maven/container-runner-maven-plugin/pom.xml b/test-framework/maven/container-runner-maven-plugin/pom.xml
index b191e43..ed43163 100644
--- a/test-framework/maven/container-runner-maven-plugin/pom.xml
+++ b/test-framework/maven/container-runner-maven-plugin/pom.xml
@@ -36,10 +36,10 @@
</description>
<properties>
- <groovy-eclipse-compiler.version>3.7.0</groovy-eclipse-compiler.version>
- <groovy-eclipse-batch.version>3.0.8-01</groovy-eclipse-batch.version>
- <maven.version>3.9.2</maven.version>
- <maven-plugin.version>3.9.0</maven-plugin.version>
+ <groovy-eclipse-compiler.version>3.9.0</groovy-eclipse-compiler.version>
+ <groovy-eclipse-batch.version>4.0.26-01</groovy-eclipse-batch.version>
+ <maven.version>3.9.9</maven.version>
+ <maven-plugin.version>3.15.1</maven-plugin.version>
</properties>
<dependencies>
@@ -284,6 +284,13 @@
</pluginManagement>
</build>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>groovy-plugins-release</id>
+ <url>https://groovy.jfrog.io/artifactory/plugins-release</url>
+ </pluginRepository>
+ </pluginRepositories>
+
<profiles>
<profile>
<id>doesnt-work-on-windows</id>
diff --git a/test-framework/providers/external/src/main/java/module-info.java b/test-framework/providers/external/src/main/java/module-info.java
new file mode 100644
index 0000000..f175989
--- /dev/null
+++ b/test-framework/providers/external/src/main/java/module-info.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2022, 2025 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
+ */
+
+open module org.glassfish.jersey.tests.framework.provider.external {
+ requires jakarta.ws.rs;
+ requires java.logging;
+
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.tests.framework.core;
+
+ exports org.glassfish.jersey.test.external;
+}
\ No newline at end of file
diff --git a/test-framework/providers/grizzly2/pom.xml b/test-framework/providers/grizzly2/pom.xml
index 30cb8e1..962eea9 100644
--- a/test-framework/providers/grizzly2/pom.xml
+++ b/test-framework/providers/grizzly2/pom.xml
@@ -53,5 +53,10 @@
<artifactId>jersey-container-grizzly2-servlet</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/test-framework/providers/grizzly2/src/main/java/module-info.java b/test-framework/providers/grizzly2/src/main/java/module-info.java
new file mode 100644
index 0000000..4dd0ccc
--- /dev/null
+++ b/test-framework/providers/grizzly2/src/main/java/module-info.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2022, 2025 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
+ */
+
+open module org.glassfish.jersey.tests.framework.provider.grizzly {
+ requires java.logging;
+
+ requires jakarta.servlet;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.grizzly;
+ requires org.glassfish.grizzly.http.server;
+ requires org.glassfish.grizzly.servlet;
+
+ requires org.glassfish.jersey.tests.framework.core;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.container.grizzly2.http;
+ requires org.glassfish.jersey.container.grizzly2.servlet;
+
+ exports org.glassfish.jersey.test.grizzly;
+
+ provides org.glassfish.jersey.test.spi.TestContainerFactory with
+ org.glassfish.jersey.test.grizzly.GrizzlyTestContainerFactory;
+}
\ No newline at end of file
diff --git a/test-framework/providers/grizzly2/src/test/java/module-info.java b/test-framework/providers/grizzly2/src/test/java/module-info.java
new file mode 100644
index 0000000..1d5708e
--- /dev/null
+++ b/test-framework/providers/grizzly2/src/test/java/module-info.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2022, 2025 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
+ */
+
+open module org.glassfish.jersey.tests.framework.provider.grizzly {
+ requires java.logging;
+
+ requires jakarta.inject;
+ requires jakarta.servlet;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.grizzly;
+ requires org.glassfish.grizzly.servlet;
+ requires org.glassfish.grizzly.http.server;
+
+ 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;
+ requires org.glassfish.jersey.container.grizzly2.http;
+ requires org.glassfish.jersey.container.grizzly2.servlet;
+ requires org.glassfish.jersey.container.servlet;
+
+ exports org.glassfish.jersey.test.grizzly;
+ exports org.glassfish.jersey.test.grizzly.pckg;
+ exports org.glassfish.jersey.test.grizzly.web;
+ exports org.glassfish.jersey.test.grizzly.web.context;
+ exports org.glassfish.jersey.test.grizzly.web.ssl;
+
+ requires org.junit.jupiter.api;
+ requires org.junit.jupiter.engine;
+ requires org.hamcrest;
+}
\ No newline at end of file
diff --git a/test-framework/providers/helidon-http/pom.xml b/test-framework/providers/helidon-http/pom.xml
index 42edacd..bdc45fc 100644
--- a/test-framework/providers/helidon-http/pom.xml
+++ b/test-framework/providers/helidon-http/pom.xml
@@ -56,4 +56,19 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <instructions>
+ <Automatic-Module-Name>org.glassfish.jersey.test.framework.provider.helidon</Automatic-Module-Name>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
diff --git a/test-framework/providers/inmemory/pom.xml b/test-framework/providers/inmemory/pom.xml
index 9d7d448..7fe628f 100644
--- a/test-framework/providers/inmemory/pom.xml
+++ b/test-framework/providers/inmemory/pom.xml
@@ -48,5 +48,10 @@
<artifactId>jersey-client</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/test-framework/providers/inmemory/src/main/java/module-info.java b/test-framework/providers/inmemory/src/main/java/module-info.java
new file mode 100644
index 0000000..74e8c8a
--- /dev/null
+++ b/test-framework/providers/inmemory/src/main/java/module-info.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2025 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
+ */
+
+open module org.glassfish.jersey.test.framework.provider.inmemory {
+ requires jakarta.ws.rs;
+ requires java.logging;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.tests.framework.core;
+
+ exports org.glassfish.jersey.test.inmemory;
+
+ provides org.glassfish.jersey.test.spi.TestContainerFactory with
+ org.glassfish.jersey.test.inmemory.InMemoryTestContainerFactory;
+}
\ No newline at end of file
diff --git a/test-framework/providers/inmemory/src/test/java/module-info.java b/test-framework/providers/inmemory/src/test/java/module-info.java
new file mode 100644
index 0000000..6842fc7
--- /dev/null
+++ b/test-framework/providers/inmemory/src/test/java/module-info.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2025 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
+ */
+
+open module org.glassfish.jersey.test.framework.provider.inmemory {
+ requires java.logging;
+ requires jakarta.ws.rs;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.tests.framework.core;
+
+ requires org.junit.jupiter.api;
+ requires org.junit.jupiter.engine;
+ requires org.hamcrest;
+
+ exports org.glassfish.jersey.test.inmemory;
+ exports org.glassfish.jersey.test.inmemory.internal;
+}
\ No newline at end of file
diff --git a/test-framework/providers/inmemory/src/test/java/org/glassfish/jersey/test/inmemory/internal/FollowRedirectsTest.java b/test-framework/providers/inmemory/src/test/java/org/glassfish/jersey/test/inmemory/internal/FollowRedirectsTest.java
index 98b5e21..938739d 100644
--- a/test-framework/providers/inmemory/src/test/java/org/glassfish/jersey/test/inmemory/internal/FollowRedirectsTest.java
+++ b/test-framework/providers/inmemory/src/test/java/org/glassfish/jersey/test/inmemory/internal/FollowRedirectsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -33,6 +33,9 @@
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.test.inmemory.InMemoryTestContainerFactory;
+import org.glassfish.jersey.test.spi.TestContainerException;
+import org.glassfish.jersey.test.spi.TestContainerFactory;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -70,6 +73,10 @@
return new ResourceConfig(RedirectResource.class);
}
+ @Override
+ protected TestContainerFactory getTestContainerFactory() throws TestContainerException {
+ return new InMemoryTestContainerFactory();
+ }
private static class RedirectTestFilter implements ClientResponseFilter {
public static final String RESOLVED_URI_HEADER = "resolved-uri";
diff --git a/test-framework/providers/jdk-http/pom.xml b/test-framework/providers/jdk-http/pom.xml
index 5253d8e..7ee4fee 100644
--- a/test-framework/providers/jdk-http/pom.xml
+++ b/test-framework/providers/jdk-http/pom.xml
@@ -53,6 +53,10 @@
<artifactId>jersey-client</artifactId>
<version>${project.version}</version>
</dependency>
-
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/test-framework/providers/jdk-http/src/main/java/module-info.java b/test-framework/providers/jdk-http/src/main/java/module-info.java
new file mode 100644
index 0000000..7be5f48
--- /dev/null
+++ b/test-framework/providers/jdk-http/src/main/java/module-info.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2025 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
+ */
+
+open module org.glassfish.jersey.test.framework.provider.jdk.http {
+ requires jakarta.ws.rs;
+ requires java.logging;
+ requires jdk.httpserver;
+ requires org.glassfish.jersey.container.jdk.http;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.tests.framework.core;
+
+ exports org.glassfish.jersey.test.jdkhttp;
+
+ provides org.glassfish.jersey.test.spi.TestContainerFactory with
+ org.glassfish.jersey.test.jdkhttp.JdkHttpServerTestContainerFactory;
+}
\ No newline at end of file
diff --git a/test-framework/providers/jdk-http/src/test/java/module-info.java b/test-framework/providers/jdk-http/src/test/java/module-info.java
new file mode 100644
index 0000000..4d72955
--- /dev/null
+++ b/test-framework/providers/jdk-http/src/test/java/module-info.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2025 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
+ */
+
+open module org.glassfish.jersey.test.framework.provider.jdk.http {
+ requires jakarta.ws.rs;
+ requires java.logging;
+ requires jdk.httpserver;
+ requires org.glassfish.jersey.container.jdk.http;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.tests.framework.core;
+
+ requires org.junit.jupiter.api;
+ requires org.junit.jupiter.engine;
+ requires org.hamcrest;
+
+ exports org.glassfish.jersey.test.jdkhttp;
+}
\ No newline at end of file
diff --git a/test-framework/providers/jetty-http2/pom.xml b/test-framework/providers/jetty-http2/pom.xml
index eefc7e6..7d88580 100644
--- a/test-framework/providers/jetty-http2/pom.xml
+++ b/test-framework/providers/jetty-http2/pom.xml
@@ -42,6 +42,11 @@
<artifactId>jersey-container-jetty-http2</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
diff --git a/test-framework/providers/jetty-http2/src/main/java/module-info.java b/test-framework/providers/jetty-http2/src/main/java/module-info.java
new file mode 100644
index 0000000..b7413ed
--- /dev/null
+++ b/test-framework/providers/jetty-http2/src/main/java/module-info.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2023, 2025 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
+ */
+
+open module org.glassfish.jersey.tests.framework.provider.jetty.http2 {
+ requires java.logging;
+
+ requires jakarta.servlet;
+ requires jakarta.ws.rs;
+
+ requires org.eclipse.jetty.server;
+
+ requires org.glassfish.jersey.tests.framework.core;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.container.jetty.http2;
+
+ exports org.glassfish.jersey.test.jetty.http2;
+
+ provides org.glassfish.jersey.test.spi.TestContainerFactory with
+ org.glassfish.jersey.test.jetty.http2.JettyHttp2TestContainerFactory;
+}
\ No newline at end of file
diff --git a/test-framework/providers/jetty-http2/src/test/java/module-info.java b/test-framework/providers/jetty-http2/src/test/java/module-info.java
new file mode 100644
index 0000000..1173ec5
--- /dev/null
+++ b/test-framework/providers/jetty-http2/src/test/java/module-info.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2023, 2025 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
+ */
+
+open module org.glassfish.jersey.tests.framework.provider.jetty.http2 {
+ requires java.logging;
+
+ requires jakarta.ws.rs;
+
+ requires org.eclipse.jetty.server;
+
+ 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;
+ requires org.glassfish.jersey.container.jetty.http;
+ requires org.glassfish.jersey.container.jetty.http2;
+ requires org.glassfish.jersey.inject.hk2;
+
+ exports org.glassfish.jersey.test.jetty.http2;
+
+ requires org.junit.jupiter.api;
+ requires org.hamcrest;
+}
\ No newline at end of file
diff --git a/test-framework/providers/jetty/pom.xml b/test-framework/providers/jetty/pom.xml
index c9f5bef..6f41054 100644
--- a/test-framework/providers/jetty/pom.xml
+++ b/test-framework/providers/jetty/pom.xml
@@ -47,6 +47,11 @@
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
diff --git a/test-framework/providers/jetty/src/main/java/module-info.java b/test-framework/providers/jetty/src/main/java/module-info.java
new file mode 100644
index 0000000..851df2e
--- /dev/null
+++ b/test-framework/providers/jetty/src/main/java/module-info.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2023, 2025 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.framework.provider.jetty {
+ requires java.logging;
+
+ requires jakarta.ws.rs;
+
+ requires org.eclipse.jetty.server;
+
+ requires org.glassfish.jersey.tests.framework.core;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.container.jetty.http;
+
+ exports org.glassfish.jersey.test.jetty;
+
+ provides org.glassfish.jersey.test.spi.TestContainerFactory with
+ org.glassfish.jersey.test.jetty.JettyTestContainerFactory;
+}
\ No newline at end of file
diff --git a/test-framework/providers/jetty/src/main/java11/org/glassfish/jersey/test/jetty/JettyTestContainerFactory.java b/test-framework/providers/jetty/src/main/java11/org/glassfish/jersey/test/jetty/JettyTestContainerFactory.java
index 16be885..b487361 100644
--- a/test-framework/providers/jetty/src/main/java11/org/glassfish/jersey/test/jetty/JettyTestContainerFactory.java
+++ b/test-framework/providers/jetty/src/main/java11/org/glassfish/jersey/test/jetty/JettyTestContainerFactory.java
@@ -18,7 +18,7 @@
import java.util.Map;
import jakarta.ws.rs.ProcessingException;
-import org.glassfish.jersey.jetty.internal.LocalizationMessages;
+import org.glassfish.jersey.test.jetty.internal.LocalizationMessages;
import org.glassfish.jersey.test.DeploymentContext;
import org.glassfish.jersey.test.spi.TestContainer;
import org.glassfish.jersey.test.spi.TestContainerFactory;
diff --git a/test-framework/providers/jetty/src/test/java/module-info.java b/test-framework/providers/jetty/src/test/java/module-info.java
new file mode 100644
index 0000000..98a2b47
--- /dev/null
+++ b/test-framework/providers/jetty/src/test/java/module-info.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2023, 2025 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
+ */
+
+open module org.glassfish.jersey.tests.framework.provider.jetty {
+ requires java.logging;
+
+ requires jakarta.inject;
+ requires static jakarta.servlet;
+ requires jakarta.ws.rs;
+
+ requires org.eclipse.jetty.server;
+
+ 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;
+ requires org.glassfish.jersey.container.jetty.http;
+ requires org.glassfish.jersey.inject.hk2;
+
+ exports org.glassfish.jersey.test.jetty;
+
+ requires org.junit.jupiter.api;
+ requires org.junit.jupiter.engine;
+ requires org.junit.platform.engine;
+ requires org.hamcrest;
+}
\ No newline at end of file
diff --git a/test-framework/providers/netty/src/main/java/module-info.java b/test-framework/providers/netty/src/main/java/module-info.java
new file mode 100644
index 0000000..a6d5b26
--- /dev/null
+++ b/test-framework/providers/netty/src/main/java/module-info.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2022, 2025 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
+ */
+
+open module org.glassfish.jersey.test.framework.provider.netty {
+ requires io.netty.transport;
+ requires jakarta.ws.rs;
+ requires org.glassfish.jersey.container.netty.http;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.tests.framework.core;
+
+ exports org.glassfish.jersey.test.netty;
+}
\ No newline at end of file
diff --git a/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/config/ServiceFinderBinderTest.java b/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/config/ServiceFinderBinderTest.java
index d7d6775..0df4351 100644
--- a/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/config/ServiceFinderBinderTest.java
+++ b/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/config/ServiceFinderBinderTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 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,7 +23,7 @@
import jakarta.ws.rs.RuntimeType;
import org.glassfish.jersey.inject.hk2.AbstractBinder;
-import org.glassfish.jersey.innate.inject.ServiceFinderBinder;
+import org.glassfish.jersey.internal.ServiceFinderBinder;
import org.glassfish.jersey.internal.inject.InjectionManager;
import org.glassfish.jersey.internal.inject.Injections;
import org.glassfish.jersey.internal.inject.Providers;
diff --git a/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/config/TestContract.java b/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/config/TestContract.java
index 9ae7342..d484ed0 100644
--- a/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/config/TestContract.java
+++ b/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/config/TestContract.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,7 +16,7 @@
package org.glassfish.jersey.tests.e2e.common.config;
-import org.glassfish.jersey.innate.inject.ServiceFinderBinder;
+import org.glassfish.jersey.internal.ServiceFinderBinder;
/**
* Test contract for {@link ServiceFinderBinder} test.
diff --git a/tests/e2e-entity/pom.xml b/tests/e2e-entity/pom.xml
index 5510677..3de49a0 100644
--- a/tests/e2e-entity/pom.xml
+++ b/tests/e2e-entity/pom.xml
@@ -32,6 +32,16 @@
<description>Jersey E2E Entity tests</description>
+ <properties>
+ <surefire.security.argline>
+ --add-reads org.jboss.logging=weld.core.impl
+ --add-reads org.jboss.logging=weld.se.core
+ --add-reads org.jboss.logging=weld.environment.common
+ --add-reads org.jboss.logging=org.hibernate.validator
+ --add-exports org.eclipse.persistence.moxy/org.eclipse.persistence.internal.jaxb.many=ALL-UNNAMED
+ </surefire.security.argline>
+ </properties>
+
<build>
<plugins>
<plugin>
@@ -212,6 +222,23 @@
<profiles>
<profile>
+ <id>no.module.path</id>
+ <!-- Module org.eclipse.persistence.moxy does not read a module that exports com.sun.tools.xjc' -->
+ <!-- Works fine on JDK 25+ -->
+ <activation><jdk>[17,25)</jdk></activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <useModulePath>false</useModulePath>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>xdk</id>
<properties>
<!-- do not use security manager for xdk -->
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java b/tests/e2e-entity/src/main/java/module-info.java
similarity index 60%
copy from tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
copy to tests/e2e-entity/src/main/java/module-info.java
index e389cff..529200f 100644
--- a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
+++ b/tests/e2e-entity/src/main/java/module-info.java
@@ -14,22 +14,5 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.e2e.inject.cdi.se.j6000;
-
-import jakarta.inject.Inject;
-import jakarta.ws.rs.GET;
-import jakarta.ws.rs.Path;
-import jakarta.ws.rs.Produces;
-import jakarta.ws.rs.core.MediaType;
-import jakarta.ws.rs.core.Response;
-
-@Path("/ping")
-public class PingApi {
- private @Inject PingService delegate;
-
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response ping() {
- return this.delegate.ping();
- }
+module org.glassfish.jersey.tests.e2e.entity.main {
}
\ No newline at end of file
diff --git a/tests/e2e-entity/src/test/java/module-info.java b/tests/e2e-entity/src/test/java/module-info.java
new file mode 100644
index 0000000..8b13988
--- /dev/null
+++ b/tests/e2e-entity/src/test/java/module-info.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2025 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
+ */
+
+open module org.glassfish.jersey.tests.e2e.entity.test {
+ requires com.fasterxml.jackson.annotation;
+ requires com.fasterxml.jackson.databind;
+ requires jakarta.activation;
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.json;
+ requires jakarta.json.bind;
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ requires java.desktop;
+ requires java.logging;
+ requires java.xml;
+ requires jettison;
+ requires org.eclipse.persistence.moxy;
+ requires org.glassfish.grizzly;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.ext.entity.filtering;
+ requires org.glassfish.jersey.grizzly.connector;
+ requires org.glassfish.jersey.media.jaxb;
+ requires org.glassfish.jersey.media.json.jackson;
+ requires org.glassfish.jersey.media.json.jettison;
+ requires org.glassfish.jersey.media.json.processing;
+ requires org.glassfish.jersey.media.jsonb;
+ requires org.glassfish.jersey.media.moxy;
+ requires org.glassfish.jersey.media.multipart;
+ requires org.glassfish.jersey.media.sse;
+ requires org.glassfish.jersey.tests.framework.core;
+ requires org.hamcrest;
+ requires org.junit.jupiter.api;
+ requires org.junit.platform.suite.api;
+
+ exports org.glassfish.jersey.tests.e2e.entity;
+ exports org.glassfish.jersey.tests.e2e.entity.filtering;
+ exports org.glassfish.jersey.tests.e2e.entity.filtering.json;
+ exports org.glassfish.jersey.tests.e2e.entity.filtering.domain;
+ exports org.glassfish.jersey.tests.e2e.header;
+ exports org.glassfish.jersey.tests.e2e.json;
+ exports org.glassfish.jersey.tests.e2e.json.entity;
+ exports org.glassfish.jersey.tests.e2e.json.entity.pojo;
+ exports org.glassfish.jersey.tests.e2e.sse;
+
+}
\ No newline at end of file
diff --git a/tests/e2e-inject/cdi-inject-weld/pom.xml b/tests/e2e-inject/cdi-inject-weld/pom.xml
index 86bd202..13505a6 100644
--- a/tests/e2e-inject/cdi-inject-weld/pom.xml
+++ b/tests/e2e-inject/cdi-inject-weld/pom.xml
@@ -32,12 +32,25 @@
<description>Jersey E2E Inject CDI SE tests</description>
+ <properties>
+ <surefire.security.argline>
+ --add-reads org.jboss.logging=weld.core.impl
+ --add-reads org.jboss.logging=weld.se.core
+ --add-reads org.jboss.logging=weld.environment.common
+ </surefire.security.argline>
+ </properties>
+
<dependencies>
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-core</artifactId>
<scope>test</scope>
diff --git a/tests/e2e-inject/cdi-inject-weld/src/main/java/module-info.java b/tests/e2e-inject/cdi-inject-weld/src/main/java/module-info.java
new file mode 100644
index 0000000..71baa3b
--- /dev/null
+++ b/tests/e2e-inject/cdi-inject-weld/src/main/java/module-info.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2025 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.e2e.inject.cdi.inject.weld.main {
+ requires jakarta.annotation;
+ requires jakarta.cdi;
+ requires jakarta.inject;
+ requires jakarta.interceptor;
+ requires jakarta.ws.rs;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires weld.api;
+
+ exports org.glassfish.jersey.tests.e2e.inject.cdi.weld;
+ exports org.glassfish.jersey.tests.e2e.inject.cdi.weld.scopes;
+ exports org.glassfish.jersey.tests.e2e.inject.cdi.weld.subresources;
+
+ opens org.glassfish.jersey.tests.e2e.inject.cdi.weld to
+ org.glassfish.jersey.incubator.cdi.inject.weld,
+ weld.core.impl;
+ opens org.glassfish.jersey.tests.e2e.inject.cdi.weld.scopes to
+ org.glassfish.jersey.incubator.cdi.inject.weld,
+ weld.core.impl;
+ opens org.glassfish.jersey.tests.e2e.inject.cdi.weld.subresources to weld.core.impl;
+}
\ No newline at end of file
diff --git a/tests/e2e-inject/cdi-inject-weld/src/test/java/module-info.java b/tests/e2e-inject/cdi-inject-weld/src/test/java/module-info.java
new file mode 100644
index 0000000..684bbe0
--- /dev/null
+++ b/tests/e2e-inject/cdi-inject-weld/src/test/java/module-info.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2025 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
+ */
+
+open module org.glassfish.jersey.tests.e2e.inject.cdi.inject.weld.test {
+ requires jakarta.cdi;
+ requires jakarta.ws.rs;
+ requires java.logging;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.tests.e2e.inject.cdi.inject.weld.main;
+ requires org.glassfish.jersey.tests.framework.core;
+ requires org.junit.jupiter.api;
+ requires weld.core.impl;
+}
\ No newline at end of file
diff --git a/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/EventsTest.java b/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/test/EventsTest.java
similarity index 92%
rename from tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/EventsTest.java
rename to tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/test/EventsTest.java
index c93a71d..e423f7c 100644
--- a/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/EventsTest.java
+++ b/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/test/EventsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025 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.e2e.inject.cdi.weld;
+package org.glassfish.jersey.tests.e2e.inject.cdi.weld.test;
import jakarta.ws.rs.client.Entity;
import jakarta.ws.rs.core.Application;
@@ -24,6 +24,7 @@
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.tests.e2e.inject.cdi.weld.AccountResource;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assumptions;
diff --git a/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/InterceptorDecoratorTest.java b/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/test/InterceptorDecoratorTest.java
similarity index 90%
rename from tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/InterceptorDecoratorTest.java
rename to tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/test/InterceptorDecoratorTest.java
index f789edc..0d91f4c 100644
--- a/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/InterceptorDecoratorTest.java
+++ b/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/test/InterceptorDecoratorTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025 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.e2e.inject.cdi.weld;
+package org.glassfish.jersey.tests.e2e.inject.cdi.weld.test;
import jakarta.ws.rs.core.Application;
import jakarta.ws.rs.core.Response;
@@ -23,6 +23,8 @@
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.tests.e2e.inject.cdi.weld.HelloResource;
+import org.glassfish.jersey.tests.e2e.inject.cdi.weld.NameService;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assumptions;
diff --git a/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/RequestContextBuilder.java b/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/test/RequestContextBuilder.java
similarity index 98%
rename from tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/RequestContextBuilder.java
rename to tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/test/RequestContextBuilder.java
index 5eb8dd2..d48cf0f 100644
--- a/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/RequestContextBuilder.java
+++ b/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/test/RequestContextBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025 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.e2e.inject.cdi.weld;
+package org.glassfish.jersey.tests.e2e.inject.cdi.weld.test;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
diff --git a/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/scopes/ScopesTest.java b/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/test/scopes/ScopesTest.java
similarity index 90%
rename from tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/scopes/ScopesTest.java
rename to tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/test/scopes/ScopesTest.java
index f88b1e2..6c6a7c8 100644
--- a/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/scopes/ScopesTest.java
+++ b/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/test/scopes/ScopesTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025 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,13 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.e2e.inject.cdi.weld.scopes;
+package org.glassfish.jersey.tests.e2e.inject.cdi.weld.test.scopes;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.tests.e2e.inject.cdi.weld.scopes.RequestScopedResource;
+import org.glassfish.jersey.tests.e2e.inject.cdi.weld.scopes.SingletonScopedResource;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
diff --git a/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/subresources/ModelProcessorScopeTest.java b/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/test/subresources/ModelProcessorScopeTest.java
similarity index 92%
rename from tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/subresources/ModelProcessorScopeTest.java
rename to tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/test/subresources/ModelProcessorScopeTest.java
index 58d2e5b..f4b4872 100644
--- a/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/subresources/ModelProcessorScopeTest.java
+++ b/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/test/subresources/ModelProcessorScopeTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2025 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,14 +14,17 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.e2e.inject.cdi.weld.subresources;
+package org.glassfish.jersey.tests.e2e.inject.cdi.weld.test.subresources;
import java.util.concurrent.ExecutionException;
import org.glassfish.jersey.server.ApplicationHandler;
import org.glassfish.jersey.server.ContainerResponse;
import org.glassfish.jersey.server.ResourceConfig;
-import org.glassfish.jersey.tests.e2e.inject.cdi.weld.RequestContextBuilder;
+import org.glassfish.jersey.tests.e2e.inject.cdi.weld.subresources.ModelProcessorFeature;
+import org.glassfish.jersey.tests.e2e.inject.cdi.weld.subresources.RootResource;
+import org.glassfish.jersey.tests.e2e.inject.cdi.weld.subresources.RootSingletonResource;
+import org.glassfish.jersey.tests.e2e.inject.cdi.weld.test.RequestContextBuilder;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
diff --git a/tests/e2e-inject/cdi2-se/pom.xml b/tests/e2e-inject/cdi2-se/pom.xml
index 90df4bb..de7f5ff 100644
--- a/tests/e2e-inject/cdi2-se/pom.xml
+++ b/tests/e2e-inject/cdi2-se/pom.xml
@@ -32,6 +32,14 @@
<description>Jersey E2E Inject CDI SE tests</description>
+ <properties>
+ <surefire.security.argline>
+ --add-reads org.jboss.logging=weld.core.impl
+ --add-reads org.jboss.logging=weld.se.core
+ --add-reads org.jboss.logging=weld.environment.common
+ </surefire.security.argline>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
diff --git a/tests/e2e-inject/cdi2-se/src/main/java/module-info.java b/tests/e2e-inject/cdi2-se/src/main/java/module-info.java
new file mode 100644
index 0000000..28c8162
--- /dev/null
+++ b/tests/e2e-inject/cdi2-se/src/main/java/module-info.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2025 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.e2e.inject.cdi2.se.main {
+ requires jakarta.annotation;
+ requires jakarta.cdi;
+ requires jakarta.inject;
+ requires jakarta.interceptor;
+ requires jakarta.ws.rs;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires weld.core.impl;
+
+ exports org.glassfish.jersey.tests.e2e.inject.cdi.se;
+ exports org.glassfish.jersey.tests.e2e.inject.cdi.se.j6000;
+ exports org.glassfish.jersey.tests.e2e.inject.cdi.se.scopes;
+ exports org.glassfish.jersey.tests.e2e.inject.cdi.se.subresources;
+
+
+ opens org.glassfish.jersey.tests.e2e.inject.cdi.se to
+ org.glassfish.jersey.inject.cdi2.se,
+ weld.core.impl;
+ opens org.glassfish.jersey.tests.e2e.inject.cdi.se.scopes to
+ org.glassfish.jersey.inject.cdi2.se,
+ weld.core.impl;
+ opens org.glassfish.jersey.tests.e2e.inject.cdi.se.subresources to weld.core.impl;
+ opens org.glassfish.jersey.tests.e2e.inject.cdi.se.j6000 to weld.core.impl;
+}
\ No newline at end of file
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/module-info.java b/tests/e2e-inject/cdi2-se/src/test/java/module-info.java
new file mode 100644
index 0000000..7a3fdbc
--- /dev/null
+++ b/tests/e2e-inject/cdi2-se/src/test/java/module-info.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2025 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
+ */
+
+open module org.glassfish.jersey.tests.e2e.inject.cdi2.se.test {
+ requires jakarta.cdi;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires java.logging;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.tests.framework.core;
+ requires org.junit.jupiter.api;
+ requires org.glassfish.jersey.tests.e2e.inject.cdi2.se.main;
+ requires weld.api;
+
+ exports org.glassfish.jersey.tests.e2e.inject.cdi.se.test;
+ exports org.glassfish.jersey.tests.e2e.inject.cdi.se.test.subresources;
+ exports org.glassfish.jersey.tests.e2e.inject.cdi.se.test.scopes;
+}
\ No newline at end of file
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/RequestContextBuilder.java b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/RequestContextBuilder.java
deleted file mode 100644
index 42a04a3..0000000
--- a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/RequestContextBuilder.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright (c) 2017, 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.e2e.inject.cdi.se;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.lang.annotation.Annotation;
-import java.net.URI;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import jakarta.ws.rs.WebApplicationException;
-import jakarta.ws.rs.core.Cookie;
-import jakarta.ws.rs.core.GenericEntity;
-import jakarta.ws.rs.core.GenericType;
-import jakarta.ws.rs.core.HttpHeaders;
-import jakarta.ws.rs.core.MediaType;
-import jakarta.ws.rs.core.MultivaluedHashMap;
-import jakarta.ws.rs.core.MultivaluedMap;
-import jakarta.ws.rs.core.SecurityContext;
-import jakarta.ws.rs.ext.RuntimeDelegate;
-import jakarta.ws.rs.ext.WriterInterceptor;
-
-import org.glassfish.jersey.internal.MapPropertiesDelegate;
-import org.glassfish.jersey.internal.PropertiesDelegate;
-import org.glassfish.jersey.message.MessageBodyWorkers;
-import org.glassfish.jersey.message.internal.HeaderUtils;
-import org.glassfish.jersey.server.ContainerRequest;
-
-/**
- * Used by tests to create mock JerseyContainerRequestContext instances.
- *
- * @author Martin Matula
- */
-public class RequestContextBuilder {
-
- public class TestContainerRequest extends ContainerRequest {
-
- private Object entity;
- private GenericType entityType;
- private final PropertiesDelegate propertiesDelegate;
-
- public TestContainerRequest(final URI baseUri,
- final URI requestUri,
- final String method,
- final SecurityContext securityContext,
- final PropertiesDelegate propertiesDelegate) {
- super(baseUri, requestUri, method, securityContext, propertiesDelegate, null);
- this.propertiesDelegate = propertiesDelegate;
- }
-
- public void setEntity(final Object entity) {
- if (entity instanceof GenericEntity) {
- this.entity = ((GenericEntity) entity).getEntity();
- this.entityType = new GenericType(((GenericEntity) entity).getType());
- } else {
- this.entity = entity;
- this.entityType = new GenericType(entity.getClass());
- }
- }
-
- @Override
- public void setWorkers(final MessageBodyWorkers workers) {
- super.setWorkers(workers);
- final byte[] entityBytes;
- if (workers != null) {
- if (entity != null) {
- final MultivaluedMap<String, Object> myMap = new MultivaluedHashMap<String, Object>(getHeaders());
- final ByteArrayOutputStream baos = new ByteArrayOutputStream();
- OutputStream stream = null;
- try {
- stream = workers.writeTo(entity, entity.getClass(), entityType.getType(),
- new Annotation[0], getMediaType(),
- myMap,
- propertiesDelegate, baos, Collections.<WriterInterceptor>emptyList());
- } catch (final IOException | WebApplicationException ex) {
- Logger.getLogger(TestContainerRequest.class.getName()).log(Level.SEVERE, null, ex);
- } finally {
- if (stream != null) {
- try {
- stream.close();
- } catch (final IOException e) {
- // ignore
- }
- }
- }
- entityBytes = baos.toByteArray();
- } else {
- entityBytes = new byte[0];
- }
- setEntityStream(new ByteArrayInputStream(entityBytes));
- }
- }
- }
-
- private final TestContainerRequest request;
-
- public static RequestContextBuilder from(final String requestUri, final String method) {
- return from(null, requestUri, method);
- }
-
- public static RequestContextBuilder from(final String baseUri, final String requestUri, final String method) {
- return new RequestContextBuilder(baseUri, requestUri, method);
- }
-
- public static RequestContextBuilder from(final URI requestUri, final String method) {
- return from(null, requestUri, method);
- }
-
- public static RequestContextBuilder from(final URI baseUri, final URI requestUri, final String method) {
- return new RequestContextBuilder(baseUri, requestUri, method);
- }
-
- private RequestContextBuilder(final String baseUri, final String requestUri, final String method) {
- this(baseUri == null || baseUri.isEmpty() ? null : URI.create(baseUri), URI.create(requestUri), method);
- }
-
- private RequestContextBuilder(final URI baseUri, final URI requestUri, final String method) {
- request = new TestContainerRequest(baseUri, requestUri, method, null,
- new MapPropertiesDelegate());
- }
-
- public ContainerRequest build() {
- return request;
- }
-
- public RequestContextBuilder accept(final String... acceptHeader) {
- putHeaders(HttpHeaders.ACCEPT, acceptHeader);
- return this;
- }
-
- public RequestContextBuilder accept(final MediaType... acceptHeader) {
- putHeaders(HttpHeaders.ACCEPT, (Object[]) acceptHeader);
- return this;
- }
-
- public RequestContextBuilder entity(final Object entity) {
- request.setEntity(entity);
- return this;
- }
-
- public RequestContextBuilder type(final String contentType) {
- request.getHeaders().putSingle(HttpHeaders.CONTENT_TYPE, contentType);
- return this;
-
- }
-
- public RequestContextBuilder type(final MediaType contentType) {
- request.getHeaders().putSingle(HttpHeaders.CONTENT_TYPE, HeaderUtils.asString(contentType, request.getConfiguration()));
- return this;
- }
-
- public RequestContextBuilder header(final String name, final Object value) {
- putHeader(name, value);
- return this;
- }
-
- public RequestContextBuilder cookie(final Cookie cookie) {
- putHeader(HttpHeaders.COOKIE, cookie);
- return this;
- }
-
- public RequestContextBuilder cookies(final Cookie... cookies) {
- putHeaders(HttpHeaders.COOKIE, (Object[]) cookies);
- return this;
- }
-
- private void putHeader(final String name, final Object value) {
- if (value == null) {
- request.getHeaders().remove(name);
- return;
- }
- request.header(name, HeaderUtils.asString(value, request.getConfiguration()));
- }
-
- private void putHeaders(final String name, final Object... values) {
- if (values == null) {
- request.getHeaders().remove(name);
- return;
- }
- request.getHeaders().addAll(name, HeaderUtils.asStringList(Arrays.asList(values), request.getConfiguration()));
- }
-
- private void putHeaders(final String name, final String... values) {
- if (values == null) {
- request.getHeaders().remove(name);
- return;
- }
- request.getHeaders().addAll(name, values);
- }
-}
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/EventsTest.java b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/EventsTest.java
similarity index 90%
rename from tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/EventsTest.java
rename to tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/EventsTest.java
index a1d688c..94f10ab 100644
--- a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/EventsTest.java
+++ b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/EventsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2025 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.e2e.inject.cdi.se;
+package org.glassfish.jersey.tests.e2e.inject.cdi.se.test;
import jakarta.ws.rs.client.Entity;
import jakarta.ws.rs.core.Application;
@@ -23,6 +23,7 @@
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.tests.e2e.inject.cdi.se.AccountResource;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/InterceptorDecoratorTest.java b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/InterceptorDecoratorTest.java
similarity index 86%
rename from tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/InterceptorDecoratorTest.java
rename to tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/InterceptorDecoratorTest.java
index dae02fc..2e08b5c 100644
--- a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/InterceptorDecoratorTest.java
+++ b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/InterceptorDecoratorTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2025 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.e2e.inject.cdi.se;
+package org.glassfish.jersey.tests.e2e.inject.cdi.se.test;
import jakarta.ws.rs.core.Application;
import jakarta.ws.rs.core.Response;
@@ -22,6 +22,8 @@
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.tests.e2e.inject.cdi.se.HelloResource;
+import org.glassfish.jersey.tests.e2e.inject.cdi.se.NameService;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
diff --git a/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/RequestContextBuilder.java b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/RequestContextBuilder.java
similarity index 98%
copy from tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/RequestContextBuilder.java
copy to tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/RequestContextBuilder.java
index 5eb8dd2..9045d73 100644
--- a/tests/e2e-inject/cdi-inject-weld/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/weld/RequestContextBuilder.java
+++ b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/RequestContextBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2025 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.e2e.inject.cdi.weld;
+package org.glassfish.jersey.tests.e2e.inject.cdi.se.test;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/j6000/PingApi.java
similarity index 88%
rename from tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
rename to tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/j6000/PingApi.java
index e389cff..f9e0bd2 100644
--- a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
+++ b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/j6000/PingApi.java
@@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.e2e.inject.cdi.se.j6000;
+package org.glassfish.jersey.tests.e2e.inject.cdi.se.test.j6000;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
@@ -22,6 +22,7 @@
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
+import org.glassfish.jersey.tests.e2e.inject.cdi.se.j6000.PingService;
@Path("/ping")
public class PingApi {
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/TestServer.java b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/j6000/TestServer.java
similarity index 97%
rename from tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/TestServer.java
rename to tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/j6000/TestServer.java
index d1d9c54..624bff9 100644
--- a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/TestServer.java
+++ b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/j6000/TestServer.java
@@ -14,7 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.e2e.inject.cdi.se.j6000;
+package org.glassfish.jersey.tests.e2e.inject.cdi.se.test.j6000;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.ws.rs.ApplicationPath;
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/scopes/ScopesTest.java b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/scopes/ScopesTest.java
similarity index 88%
rename from tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/scopes/ScopesTest.java
rename to tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/scopes/ScopesTest.java
index baeb657..31314da 100644
--- a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/scopes/ScopesTest.java
+++ b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/scopes/ScopesTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2025 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,13 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.e2e.inject.cdi.se.scopes;
+package org.glassfish.jersey.tests.e2e.inject.cdi.se.test.scopes;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.tests.e2e.inject.cdi.se.scopes.RequestScopedResource;
+import org.glassfish.jersey.tests.e2e.inject.cdi.se.scopes.SingletonScopedResource;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/subresources/ModelProcessorScopeTest.java b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/subresources/ModelProcessorScopeTest.java
similarity index 92%
rename from tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/subresources/ModelProcessorScopeTest.java
rename to tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/subresources/ModelProcessorScopeTest.java
index 3545f4c..91d11d9 100644
--- a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/subresources/ModelProcessorScopeTest.java
+++ b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/subresources/ModelProcessorScopeTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2025 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,14 +14,17 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.e2e.inject.cdi.se.subresources;
+package org.glassfish.jersey.tests.e2e.inject.cdi.se.test.subresources;
import java.util.concurrent.ExecutionException;
import org.glassfish.jersey.server.ApplicationHandler;
import org.glassfish.jersey.server.ContainerResponse;
import org.glassfish.jersey.server.ResourceConfig;
-import org.glassfish.jersey.tests.e2e.inject.cdi.se.RequestContextBuilder;
+import org.glassfish.jersey.tests.e2e.inject.cdi.se.subresources.ModelProcessorFeature;
+import org.glassfish.jersey.tests.e2e.inject.cdi.se.subresources.RootResource;
+import org.glassfish.jersey.tests.e2e.inject.cdi.se.subresources.RootSingletonResource;
+import org.glassfish.jersey.tests.e2e.inject.cdi.se.test.RequestContextBuilder;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
diff --git a/tests/e2e-server/pom.xml b/tests/e2e-server/pom.xml
index cc69244..7b6b1e5 100644
--- a/tests/e2e-server/pom.xml
+++ b/tests/e2e-server/pom.xml
@@ -32,8 +32,41 @@
<description>Jersey E2E Server tests</description>
+ <properties>
+ <surefire.security.argline>
+ --add-reads org.jboss.logging=weld.core.impl
+ --add-reads org.jboss.logging=weld.se.core
+ --add-reads org.jboss.logging=weld.environment.common
+ --add-reads org.jboss.logging=org.hibernate.validator
+ </surefire.security.argline>
+ </properties>
+
<build>
<plugins>
+<!-- <plugin>-->
+<!-- <groupId>org.apache.maven.plugins</groupId>-->
+<!-- <artifactId>maven-compiler-plugin</artifactId>-->
+<!-- <version>${compiler.mvn.plugin.version}</version>-->
+<!-- <inherited>true</inherited>-->
+<!-- <executions>-->
+<!-- <execution>-->
+<!-- <id>default-compile</id>-->
+<!-- </execution>-->
+<!-- <execution>-->
+<!-- <id>default-testCompile</id>-->
+<!-- <goals>-->
+<!-- <goal>testCompile</goal>-->
+<!-- </goals>-->
+<!-- <configuration>-->
+<!-- <compilerArgs>-->
+<!-- <arg>--add-reads</arg>-->
+<!-- <arg>org.eclipse.persistence.moxy=com.sun.tools.xjc</arg>-->
+<!-- </compilerArgs>-->
+<!-- <release>${java.version}</release>-->
+<!-- </configuration>-->
+<!-- </execution>-->
+<!-- </executions>-->
+<!-- </plugin>-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
@@ -41,6 +74,9 @@
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
<enableAssertions>false</enableAssertions>
+<!-- <detail>true</detail>-->
+<!-- <enableOutErrElements>true</enableOutErrElements>-->
+<!-- <trimStackTrace>false</trimStackTrace>-->
</configuration>
<executions>
<execution>
@@ -231,6 +267,23 @@
<profiles>
<profile>
+ <id>no.module.path</id>
+ <!-- Module org.eclipse.persistence.moxy does not read a module that exports com.sun.tools.xjc' -->
+ <!-- Works fine on JDK 25+ -->
+ <activation><jdk>[17,25)</jdk></activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <useModulePath>false</useModulePath>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>xdk</id>
<properties>
<!-- do not use security manager for xdk -->
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java b/tests/e2e-server/src/main/java/module-info.java
similarity index 60%
copy from tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
copy to tests/e2e-server/src/main/java/module-info.java
index e389cff..951ac09 100644
--- a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
+++ b/tests/e2e-server/src/main/java/module-info.java
@@ -14,22 +14,5 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.e2e.inject.cdi.se.j6000;
-
-import jakarta.inject.Inject;
-import jakarta.ws.rs.GET;
-import jakarta.ws.rs.Path;
-import jakarta.ws.rs.Produces;
-import jakarta.ws.rs.core.MediaType;
-import jakarta.ws.rs.core.Response;
-
-@Path("/ping")
-public class PingApi {
- private @Inject PingService delegate;
-
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response ping() {
- return this.delegate.ping();
- }
+open module org.glassfish.jersey.tests.e2e.server.main {
}
\ No newline at end of file
diff --git a/tests/e2e-server/src/test/java/module-info.java b/tests/e2e-server/src/test/java/module-info.java
new file mode 100644
index 0000000..fc06a59
--- /dev/null
+++ b/tests/e2e-server/src/test/java/module-info.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2025 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
+ */
+
+open module org.glassfish.jersey.tests.e2e.server.test {
+ requires com.fasterxml.jackson.annotation;
+ requires com.google.gson;
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.servlet;
+ requires jakarta.validation;
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ requires java.logging;
+ requires java.management;
+ requires java.xml;
+ requires org.eclipse.jetty.ee10.servlet;
+ requires org.eclipse.jetty.server;
+ requires org.eclipse.persistence.moxy;
+ requires org.glassfish.grizzly.http.server;
+ requires org.glassfish.jersey.apache5.connector;
+ requires org.glassfish.jersey.container.jetty.http;
+ requires org.glassfish.jersey.container.servlet;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.ext.bean.validation;
+ requires org.glassfish.jersey.ext.mvc;
+ requires org.glassfish.jersey.ext.mvc.bean.validation;
+ requires org.glassfish.jersey.ext.mvc.freemarker;
+ requires org.glassfish.jersey.ext.mvc.mustache;
+ requires org.glassfish.jersey.grizzly.connector;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.media.json.gson;
+ requires org.glassfish.jersey.media.json.jackson;
+ requires org.glassfish.jersey.media.json.jettison;
+ requires org.glassfish.jersey.media.jsonb;
+ requires org.glassfish.jersey.media.moxy;
+ requires org.glassfish.jersey.media.multipart;
+ requires org.glassfish.jersey.tests.framework.core;
+ requires org.glassfish.jersey.tests.framework.provider.grizzly;
+ requires org.glassfish.jersey.tests.framework.provider.jetty;
+ requires org.hibernate.validator;
+ requires org.junit.jupiter.api;
+ requires org.junit.platform.suite.api;
+ requires org.hamcrest;
+ requires org.xmlunit;
+ requires org.glassfish.grizzly.http;
+ requires org.glassfish.jersey.test.framework.provider.inmemory;
+ requires org.glassfish.jersey.test.framework.provider.jdk.http;
+
+ provides jakarta.ws.rs.ext.MessageBodyReader with
+ org.glassfish.jersey.tests.e2e.server.AbstractDisableMetainfServicesLookupTest.UselessMessageProvider;
+ provides jakarta.ws.rs.ext.MessageBodyWriter with
+ org.glassfish.jersey.tests.e2e.server.AbstractDisableMetainfServicesLookupTest.UselessMessageProvider;
+ provides org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable with
+ org.glassfish.jersey.tests.e2e.server.monitoring.ApplicationInfoTest.ForcedAutoDiscoverableImpl;
+}
\ No newline at end of file
diff --git a/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/AbstractDisableMetainfServicesLookupTest.java b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/AbstractDisableMetainfServicesLookupTest.java
index 7ef5b18..872baeb 100644
--- a/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/AbstractDisableMetainfServicesLookupTest.java
+++ b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/AbstractDisableMetainfServicesLookupTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -44,7 +44,7 @@
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.inject.hk2.AbstractBinder;
-import org.glassfish.jersey.innate.inject.ServiceFinderBinder;
+import org.glassfish.jersey.internal.ServiceFinderBinder;
import org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider;
import org.glassfish.jersey.message.internal.ReaderWriter;
import org.glassfish.jersey.server.ResourceConfig;
diff --git a/tests/e2e-tls/pom.xml b/tests/e2e-tls/pom.xml
index 12b5193..50a3502 100644
--- a/tests/e2e-tls/pom.xml
+++ b/tests/e2e-tls/pom.xml
@@ -146,5 +146,5 @@
--add-opens java.base/sun.net.www.protocol.https=ALL-UNNAMED
</http.patch.addopens>
</properties>
-
+
</project>
diff --git a/tests/e2e-tls/src/test/java/org/glassfish/jersey/tests/e2e/tls/SniTest.java b/tests/e2e-tls/src/test/java/org/glassfish/jersey/tests/e2e/tls/SniTest.java
index 29164df..7ac593f 100644
--- a/tests/e2e-tls/src/test/java/org/glassfish/jersey/tests/e2e/tls/SniTest.java
+++ b/tests/e2e-tls/src/test/java/org/glassfish/jersey/tests/e2e/tls/SniTest.java
@@ -22,7 +22,6 @@
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.HttpUrlConnectorProvider;
import org.glassfish.jersey.client.spi.ConnectorProvider;
-import org.glassfish.jersey.internal.util.JdkVersion;
import org.glassfish.jersey.jdk.connector.JdkConnectorProvider;
import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.netty.connector.NettyConnectorProvider;
@@ -48,7 +47,6 @@
public class SniTest {
private static final int PORT = 8443;
private static final String LOCALHOST = "127.0.0.1";
- private static JdkVersion jdkVersion = JdkVersion.getJdkVersion();
static {
// Debug
@@ -122,7 +120,7 @@
.path("host")
.request();
if (!JavaNetHttpConnectorProvider.class.isInstance(provider)) {
- builder = builder.header(HttpHeaders.HOST, hostName + ":" + PORT);
+ builder = builder.header(HttpHeaders.HOST, hostName + ":8080");
}
try (Response r = builder.get()) {
// empty
diff --git a/tests/e2e/pom.xml b/tests/e2e/pom.xml
index 213a5eb..c815d49 100644
--- a/tests/e2e/pom.xml
+++ b/tests/e2e/pom.xml
@@ -32,6 +32,15 @@
<description>Jersey E2E tests</description>
+ <properties>
+ <surefire.security.argline>
+ --add-reads org.jboss.logging=weld.core.impl
+ --add-reads org.jboss.logging=weld.se.core
+ --add-reads org.jboss.logging=weld.environment.common
+ --add-reads org.jboss.logging=org.hibernate.validator
+ </surefire.security.argline>
+ </properties>
+
<build>
<plugins>
<plugin>
@@ -197,6 +206,23 @@
<profiles>
<profile>
+ <id>no.module.path</id>
+ <!-- Module org.eclipse.persistence.moxy does not read a module that exports com.sun.tools.xjc' -->
+ <!-- Works fine on JDK 25+ -->
+ <activation><jdk>[17,25)</jdk></activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <useModulePath>false</useModulePath>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>xdk</id>
<properties>
<!-- do not use security manager for xdk -->
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java b/tests/e2e/src/main/java/module-info.java
similarity index 60%
copy from tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
copy to tests/e2e/src/main/java/module-info.java
index e389cff..d70b2cb 100644
--- a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
+++ b/tests/e2e/src/main/java/module-info.java
@@ -14,22 +14,5 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.e2e.inject.cdi.se.j6000;
-
-import jakarta.inject.Inject;
-import jakarta.ws.rs.GET;
-import jakarta.ws.rs.Path;
-import jakarta.ws.rs.Produces;
-import jakarta.ws.rs.core.MediaType;
-import jakarta.ws.rs.core.Response;
-
-@Path("/ping")
-public class PingApi {
- private @Inject PingService delegate;
-
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response ping() {
- return this.delegate.ping();
- }
+module org.glassfish.jersey.tests.e2e {
}
\ No newline at end of file
diff --git a/tests/e2e/src/test/java/module-info.java b/tests/e2e/src/test/java/module-info.java
new file mode 100644
index 0000000..3f02bea
--- /dev/null
+++ b/tests/e2e/src/test/java/module-info.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2025 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
+ */
+
+open module org.glassfish.jersey.tests.e2e {
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.servlet;
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ requires java.logging;
+ requires java.xml;
+ requires jdk.security.auth;
+ requires org.apache.httpcomponents.client5.httpclient5;
+ requires org.apache.httpcomponents.core5.httpcore5;
+ requires org.eclipse.jetty.server;
+ requires org.glassfish.hk2.api;
+ requires org.glassfish.grizzly.http.server;
+ requires org.glassfish.jersey.apache5.connector;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.grizzly.connector;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.jdk.connector;
+ requires org.glassfish.jersey.media.moxy;
+ requires org.glassfish.jersey.media.multipart;
+ requires org.glassfish.jersey.security.oauth1.client;
+ requires org.glassfish.jersey.security.oauth1.server;
+ requires org.glassfish.jersey.security.oauth1.signature;
+ requires org.glassfish.jersey.security.oauth2.client;
+ requires org.glassfish.jersey.test.framework.provider.inmemory;
+ requires org.glassfish.jersey.test.framework.provider.jdk.http;
+ requires org.glassfish.jersey.test.framework.provider.netty;
+ requires org.glassfish.jersey.tests.framework.core;
+ requires org.glassfish.jersey.tests.framework.provider.grizzly;
+ requires org.glassfish.jersey.tests.framework.provider.jetty;
+ requires org.hamcrest;
+ requires org.junit.jupiter.api;
+ requires org.junit.jupiter.params;
+ requires org.junit.platform.suite.api;
+
+ exports org.glassfish.jersey.tests.api;
+ exports org.glassfish.jersey.tests.e2e;
+ exports org.glassfish.jersey.tests.e2e.common;
+ exports org.glassfish.jersey.tests.e2e.client.connector;
+ exports org.glassfish.jersey.tests.e2e.container;
+ exports org.glassfish.jersey.tests.e2e.inject;
+ exports org.glassfish.jersey.tests.e2e.oauth;
+ exports org.glassfish.jersey.tests.e2e.sonar;
+ exports org.glassfish.jersey.tests.e2e.server.wadl;
+
+}
\ No newline at end of file
diff --git a/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/common/LoggingFeatureTest.java b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/common/LoggingFeatureTest.java
index cd54930..fc23b63 100644
--- a/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/common/LoggingFeatureTest.java
+++ b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/common/LoggingFeatureTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2025 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
@@ -710,7 +710,8 @@
// client added header before request has sent (and logged)
Iterator<LogRecord> it = getLoggedRecords().iterator();
LogRecord logRecord = it.next();
- while (logRecord.getLevel() == Level.WARNING) { // Skip any warning at the beginning
+ while (logRecord.getLevel() == Level.WARNING || logRecord.getSourceMethodName().equals("start")) {
+ // Skip any warning at the beginning
logRecord = it.next();
}
assertThat(logRecord.getMessage(),
diff --git a/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/container/Jersey2462Test.java b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/container/Jersey2462Test.java
index 22dda62..cb77a50 100644
--- a/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/container/Jersey2462Test.java
+++ b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/container/Jersey2462Test.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2025 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
@@ -54,7 +54,8 @@
*/
@Suite
@SelectClasses({Jersey2462Test.GrizzlyContainerTest.class,
- Jersey2462Test.JettyContainerTest.class})
+})
+// Jersey2462Test.JettyContainerTest.class})
public class Jersey2462Test {
private static final String REQUEST_NUMBER = "request-number";
@@ -88,7 +89,7 @@
@Inject
private Provider<org.glassfish.grizzly.http.server.Request> grizzlyRequest;
@Inject
- private org.glassfish.grizzly.http.server.Response grizzlyResponse;
+ private Provider<org.glassfish.grizzly.http.server.Response> grizzlyResponse;
@Override
public void filter(ContainerRequestContext ctx) throws IOException {
@@ -112,7 +113,7 @@
if ("/jersey-2462".equals(grizzlyRequest.get().getContextPath())) {
flags += 1;
}
- if (!grizzlyResponse.isCommitted()) {
+ if (!grizzlyResponse.get().isCommitted()) {
flags += 10;
}
final String header = grizzlyRequest.get().getHeader(REQUEST_NUMBER);
diff --git a/tests/integration/JERSEY-2988/pom.xml b/tests/integration/JERSEY-2988/pom.xml
index ea11488..74c3db0 100644
--- a/tests/integration/JERSEY-2988/pom.xml
+++ b/tests/integration/JERSEY-2988/pom.xml
@@ -80,8 +80,9 @@
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
<plugin>
- <groupId>org.mortbay.jetty</groupId>
+ <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
+ <version>${jetty11.version}</version>
</plugin>
</plugins>
</build>
diff --git a/tests/integration/async-jersey-filter/pom.xml b/tests/integration/async-jersey-filter/pom.xml
index f7e0e98..b09fd7b 100644
--- a/tests/integration/async-jersey-filter/pom.xml
+++ b/tests/integration/async-jersey-filter/pom.xml
@@ -42,6 +42,11 @@
<artifactId>jersey-container-servlet</artifactId>
</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-external</artifactId>
<scope>test</scope>
@@ -51,16 +56,27 @@
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>jakarta.xml.bind</groupId>
+ <artifactId>jakarta.xml.bind-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
<plugin>
diff --git a/tests/integration/async-jersey-filter/src/main/java/module-info.java b/tests/integration/async-jersey-filter/src/main/java/module-info.java
new file mode 100644
index 0000000..f4973c1
--- /dev/null
+++ b/tests/integration/async-jersey-filter/src/main/java/module-info.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2022, 2025 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.async.jersey.filter {
+ requires jakarta.inject;
+// requires jakarta.persistence;
+ requires jakarta.servlet;
+ requires jakarta.ws.rs;
+
+ requires jakarta.xml.bind;
+
+ requires java.logging;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.container.servlet;
+
+ exports org.glassfish.jersey.tests.integration.async;
+ exports org.glassfish.jersey.tests.integration.jersey2730;
+ exports org.glassfish.jersey.tests.integration.jersey2812;
+
+ opens org.glassfish.jersey.tests.integration.async;
+ opens org.glassfish.jersey.tests.integration.jersey2812;
+ opens org.glassfish.jersey.tests.integration.jersey2730;
+}
\ No newline at end of file
diff --git a/tests/integration/async-jersey-filter/src/main/java/org/glassfish/jersey/tests/integration/jersey2730/TestExceptionResource.java b/tests/integration/async-jersey-filter/src/main/java/org/glassfish/jersey/tests/integration/jersey2730/TestExceptionResource.java
index 13f01a4..e586628 100644
--- a/tests/integration/async-jersey-filter/src/main/java/org/glassfish/jersey/tests/integration/jersey2730/TestExceptionResource.java
+++ b/tests/integration/async-jersey-filter/src/main/java/org/glassfish/jersey/tests/integration/jersey2730/TestExceptionResource.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 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,7 +23,6 @@
import jakarta.inject.Singleton;
-import org.glassfish.jersey.servlet.internal.ResponseWriter;
import org.glassfish.jersey.tests.integration.jersey2730.exception.MappedException;
import org.glassfish.jersey.tests.integration.jersey2730.exception.UnmappedException;
import org.glassfish.jersey.tests.integration.jersey2730.exception.UnmappedRuntimeException;
@@ -69,7 +68,8 @@
}
/**
- * Returns whether a thread that was processing a last request got stuck in {@link ResponseWriter}.
+ * Returns whether a thread that was processing a last request got stuck in
+ * org.glassfish.jersey.servlet.internal.ResponseWriter.
* <p/>
* Under normal circumstances, the last processing thread should return back to the servlet container
* and its pool.
@@ -90,7 +90,7 @@
case TIMED_WAITING:
case WAITING:
for (StackTraceElement stackTraceElement : lastProcessingThread.getStackTrace()) {
- if (ResponseWriter.class.getName().equals(stackTraceElement.getClassName())) {
+ if (stackTraceElement.getClassName().contains("ResponseWriter")) {
return true;
}
}
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
new file mode 100644
index 0000000..5ee2ea8
--- /dev/null
+++ b/tests/integration/async-jersey-filter/src/test/java/module-info.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2022, 2025 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.async.jersey.filter {
+ requires java.logging;
+
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires jakarta.servlet;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.container.servlet;
+ requires org.glassfish.jersey.tests.framework.core;
+ requires org.glassfish.jersey.tests.framework.provider.external;
+
+ requires org.junit.jupiter.api;
+ requires org.junit.jupiter.engine;
+ requires org.junit.platform.engine;
+
+ exports org.glassfish.jersey.tests.integration.async;
+ exports org.glassfish.jersey.tests.integration.jersey2730;
+ exports org.glassfish.jersey.tests.integration.jersey2812;
+
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml
index a7de149..b1b6409 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml
@@ -31,6 +31,16 @@
<description>Jersey CDI/Bean Validation test web application</description>
+ <properties>
+ <surefire.coverage.argline>
+ --add-reads org.jboss.logging=weld.core.impl
+ --add-reads org.jboss.logging=weld.environment.common
+ --add-reads org.jboss.logging=weld.se.core
+ --add-reads org.jboss.logging=org.hibernate.validator
+ --add-modules=ALL-MODULE-PATH
+ </surefire.coverage.argline>
+ </properties>
+
<dependencies>
<dependency>
<groupId>jakarta.ws.rs</groupId>
@@ -73,7 +83,25 @@
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-core</artifactId>
- <scope>provided</scope>
+<!-- <scope>provided</scope>-->
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld.environment</groupId>
+ <artifactId>weld-environment-common</artifactId>
+ <version>${weld.version}</version>
+<!-- <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>
@@ -90,9 +118,28 @@
</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-external</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.containers</groupId>
+ <artifactId>jersey-container-grizzly2-http</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/module-info.java
new file mode 100644
index 0000000..23445df
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/module-info.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2022, 2025 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.cdi.beanvalidation.webapp {
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ requires jakarta.cdi;
+ requires jakarta.validation;
+
+ requires weld.api;
+ requires weld.core.impl;
+
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.ext.cdi1x;
+
+ exports org.glassfish.jersey.tests.cdi.bv;
+ opens org.glassfish.jersey.tests.cdi.bv;
+}
\ No newline at end of file
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
new file mode 100644
index 0000000..6082573
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/module-info.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2022, 2024 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.cdi.beanvalidation.webapp.test {
+ requires jakarta.cdi;
+ requires jakarta.inject;
+ requires jakarta.validation;
+ requires jakarta.ws.rs;
+
+ requires weld.core.impl;
+ requires weld.environment.common;
+ requires weld.se.core;
+
+ requires org.glassfish.grizzly.http.server;
+ requires org.hibernate.validator;
+ requires org.hibernate.validator.cdi;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.container.grizzly2.http;
+ requires org.glassfish.jersey.ext.weld2.se;
+
+ requires org.glassfish.jersey.tests.integration.cdi.beanvalidation.webapp;
+
+ 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.glassfish.jersey.tests.framework.provider.grizzly;
+
+ exports org.glassfish.jersey.tests.cdi.bv.test;
+ opens org.glassfish.jersey.tests.cdi.bv.test;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/BaseValidationTest.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/BaseValidationTest.java
similarity index 98%
rename from tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/BaseValidationTest.java
rename to tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/BaseValidationTest.java
index 0a1141c..527012b 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/BaseValidationTest.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/BaseValidationTest.java
@@ -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.bv;
+package org.glassfish.jersey.tests.cdi.bv.test;
import java.net.URI;
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/CombinedTest.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/CombinedTest.java
similarity index 97%
rename from tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/CombinedTest.java
rename to tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/CombinedTest.java
index 2b04f74..1ca9945 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/CombinedTest.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/CombinedTest.java
@@ -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.bv;
+package org.glassfish.jersey.tests.cdi.bv.test;
import java.io.IOException;
import java.net.URI;
@@ -34,6 +34,8 @@
import org.glassfish.grizzly.http.server.HttpHandler;
import org.glassfish.grizzly.http.server.HttpServer;
+import org.glassfish.jersey.tests.cdi.bv.CdiApplication;
+import org.glassfish.jersey.tests.cdi.bv.Hk2Application;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assumptions;
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/RawCdiTest.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/RawCdiTest.java
similarity index 96%
rename from tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/RawCdiTest.java
rename to tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/RawCdiTest.java
index dfb2340..2733c38 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/RawCdiTest.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/RawCdiTest.java
@@ -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.bv;
+package org.glassfish.jersey.tests.cdi.bv.test;
import jakarta.ws.rs.core.Application;
@@ -22,6 +22,7 @@
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.external.ExternalTestContainerFactory;
+import org.glassfish.jersey.tests.cdi.bv.CdiApplication;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assumptions;
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/RawHk2Test.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/RawHk2Test.java
similarity index 90%
rename from tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/RawHk2Test.java
rename to tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/RawHk2Test.java
index 1998e9a..e50591e 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/RawHk2Test.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/test/java/org/glassfish/jersey/tests/cdi/bv/test/RawHk2Test.java
@@ -14,14 +14,13 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.cdi.bv;
+package org.glassfish.jersey.tests.cdi.bv.test;
import jakarta.ws.rs.core.Application;
import org.glassfish.jersey.server.ResourceConfig;
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
+import org.glassfish.jersey.tests.cdi.bv.Hk2Application;
/**
* Validation result test for raw HK2 environment.
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 e0bab7b..2c920af 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,17 @@
<description>CDI works on a client on a server resource</description>
+ <properties>
+ <surefire.coverage.argline>
+ --add-reads org.jboss.logging=java.logging
+ --add-reads org.jboss.logging=weld.core.impl
+ --add-reads org.jboss.logging=weld.environment.common
+ --add-reads org.jboss.logging=weld.se.core
+ --add-reads org.jboss.logging=org.hibernate.validator
+ --add-modules=ALL-MODULE-PATH
+ </surefire.coverage.argline>
+ </properties>
+
<dependencies>
<dependency>
<groupId>jakarta.ws.rs</groupId>
@@ -55,14 +66,23 @@
</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-external</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
+ <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</groupId>
<artifactId>jersey-test-framework-util</artifactId>
- <scope>provided</scope>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
@@ -80,6 +100,32 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-server</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>aopalliance</groupId>
+ <artifactId>aopalliance</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-api</artifactId>
+ </dependency>
</dependencies>
<profiles>
diff --git a/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/module-info.java
new file mode 100644
index 0000000..73bf1df
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/module-info.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2022, 2024 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.cdi.client.on.server {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ requires jakarta.inject;
+ requires jakarta.cdi;
+ requires weld.api;
+
+ requires org.glassfish.jersey.core.server;
+
+ 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-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiEnabledClientOnServerApplication.java b/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiEnabledClientOnServerApplication.java
index c3f92a6..b87db4d 100644
--- a/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiEnabledClientOnServerApplication.java
+++ b/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiEnabledClientOnServerApplication.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -18,8 +18,8 @@
import org.glassfish.jersey.server.ResourceConfig;
-class CdiEnabledClientOnServerApplication extends ResourceConfig {
- CdiEnabledClientOnServerApplication() {
+public class CdiEnabledClientOnServerApplication extends ResourceConfig {
+ public CdiEnabledClientOnServerApplication() {
register(CdiEnabledClientOnServerResource.class);
}
}
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
new file mode 100644
index 0000000..3cd2440
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client-on-server/src/test/java/module-info.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2022, 2024 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.cdi.client.on.server.test {
+
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires jakarta.cdi;
+
+ requires weld.core.impl;
+ requires weld.environment.common;
+ requires weld.se.core;
+ requires org.jboss.logging;
+
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+
+ requires org.glassfish.jersey.tests.framework.core;
+ requires org.glassfish.jersey.tests.framework.provider.external;
+ requires org.glassfish.jersey.tests.framework.provider.grizzly;
+
+ requires org.glassfish.jersey.tests.integration.cdi.client.on.server;
+
+ requires org.junit.jupiter.api;
+ requires org.junit.jupiter.engine;
+
+ exports org.glassfish.jersey.tests.cdi.client.test to org.junit.platform.commons;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-client-on-server/src/test/java/org/glassfish/jersey/tests/cdi/client/BeanManagerInjectedOnClientTest.java b/tests/integration/cdi-integration/cdi-client-on-server/src/test/java/org/glassfish/jersey/tests/cdi/client/test/BeanManagerInjectedOnClientTest.java
similarity index 92%
rename from tests/integration/cdi-integration/cdi-client-on-server/src/test/java/org/glassfish/jersey/tests/cdi/client/BeanManagerInjectedOnClientTest.java
rename to tests/integration/cdi-integration/cdi-client-on-server/src/test/java/org/glassfish/jersey/tests/cdi/client/test/BeanManagerInjectedOnClientTest.java
index f25ee90..6a2f4fd 100644
--- a/tests/integration/cdi-integration/cdi-client-on-server/src/test/java/org/glassfish/jersey/tests/cdi/client/BeanManagerInjectedOnClientTest.java
+++ b/tests/integration/cdi-integration/cdi-client-on-server/src/test/java/org/glassfish/jersey/tests/cdi/client/test/BeanManagerInjectedOnClientTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2024 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,12 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.cdi.client;
+package org.glassfish.jersey.tests.cdi.client.test;
import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory;
import org.glassfish.jersey.test.JerseyTest;
import org.glassfish.jersey.test.external.ExternalTestContainerFactory;
+import org.glassfish.jersey.tests.cdi.client.CdiEnabledClientOnServerApplication;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/cdi-client/pom.xml b/tests/integration/cdi-integration/cdi-client/pom.xml
index 6089714..809db83 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,18 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>${skip.tests}</skipTests>
+
</configuration>
</plugin>
</plugins>
</build>
+ <properties>
+ <surefire.coverage.argline>
+ --add-opens weld.core.impl/org.jboss.weld.logging=org.jboss.logging
+ --add-reads org.jboss.logging=weld.core.impl
+ --add-reads org.jboss.logging=weld.environment.common
+ --add-reads org.jboss.logging=weld.se.core
+ --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
new file mode 100644
index 0000000..0b98f14
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client/src/main/java/module-info.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2022, 2024 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.cdi.client {
+ requires jakarta.cdi;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+
+ requires weld.api;
+
+ 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-client/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-client/src/test/java/module-info.java
new file mode 100644
index 0000000..0567a2c
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client/src/test/java/module-info.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2022, 2024 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.cdi.client.test {
+
+ requires jakarta.activation;
+ requires jakarta.el;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires weld.environment.common;
+ requires weld.core.impl;
+ requires weld.se.core;
+
+ requires org.jboss.logging;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.ext.cdi1x ;
+
+ requires org.junit.jupiter.api;
+ requires org.junit.jupiter.engine;
+ requires org.glassfish.jersey.tests.integration.cdi.client;
+
+ exports org.glassfish.jersey.tests.cdi.client.test;
+ opens org.glassfish.jersey.tests.cdi.client.test;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-client/src/test/java/org/glassfish/jersey/tests/cdi/client/BeanManagerInjectedOnClientTest.java b/tests/integration/cdi-integration/cdi-client/src/test/java/org/glassfish/jersey/tests/cdi/client/test/BeanManagerInjectedOnClientTest.java
similarity index 89%
rename from tests/integration/cdi-integration/cdi-client/src/test/java/org/glassfish/jersey/tests/cdi/client/BeanManagerInjectedOnClientTest.java
rename to tests/integration/cdi-integration/cdi-client/src/test/java/org/glassfish/jersey/tests/cdi/client/test/BeanManagerInjectedOnClientTest.java
index bec10aa..62697e8 100644
--- a/tests/integration/cdi-integration/cdi-client/src/test/java/org/glassfish/jersey/tests/cdi/client/BeanManagerInjectedOnClientTest.java
+++ b/tests/integration/cdi-integration/cdi-client/src/test/java/org/glassfish/jersey/tests/cdi/client/test/BeanManagerInjectedOnClientTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 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
@@ -14,10 +14,12 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.cdi.client;
+package org.glassfish.jersey.tests.cdi.client.test;
import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory;
import org.glassfish.jersey.internal.util.ReflectionHelper;
+import org.glassfish.jersey.tests.cdi.client.CdiClientFilter;
+import org.glassfish.jersey.tests.cdi.client.CdiLowerPriorityClientFilter;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/module-info.java
new file mode 100644
index 0000000..20d2723
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/module-info.java
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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.cdi.ejb.test.webapp {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ requires jakarta.inject;
+ requires jakarta.cdi;
+ requires jakarta.annotation;
+ requires jakarta.ejb;
+
+ opens org.glassfish.jersey.tests.cdi.resources;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml
index f605c2c..bce9708 100644
--- a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml
@@ -42,11 +42,18 @@
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<scope>provided</scope>
</dependency>
-
- <dependency>
- <groupId>org.glassfish.jersey.test-framework.providers</groupId>
- <artifactId>jersey-test-framework-provider-bundle</artifactId>
- <type>pom</type>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework</groupId>
+ <artifactId>jersey-test-framework-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/java/module-info.java
new file mode 100644
index 0000000..be4d227
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/java/module-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.cdi.iface {
+ requires jakarta.ws.rs;
+ requires jakarta.inject;
+
+ opens org.glassfish.jersey.tests.cdi.resources;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/test/java/module-info.java
new file mode 100644
index 0000000..ec65e8a
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/test/java/module-info.java
@@ -0,0 +1,26 @@
+/*
+ * 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
+ * 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.cdi.iface {
+ requires java.logging;
+
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires org.junit.jupiter.api;
+ requires org.hamcrest;
+ requires org.glassfish.jersey.tests.framework.core;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-inject-weld-test/pom.xml b/tests/integration/cdi-integration/cdi-inject-weld-test/pom.xml
index 3002d8d..01e1ca5 100644
--- a/tests/integration/cdi-integration/cdi-inject-weld-test/pom.xml
+++ b/tests/integration/cdi-integration/cdi-inject-weld-test/pom.xml
@@ -64,6 +64,11 @@
<artifactId>weld-se-core</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
diff --git a/tests/integration/cdi-integration/cdi-log-check/pom.xml b/tests/integration/cdi-integration/cdi-log-check/pom.xml
index 763b561..e49afee 100644
--- a/tests/integration/cdi-integration/cdi-log-check/pom.xml
+++ b/tests/integration/cdi-integration/cdi-log-check/pom.xml
@@ -55,8 +55,17 @@
</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-external</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework</groupId>
+ <artifactId>jersey-test-framework-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@@ -72,6 +81,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>
@@ -80,6 +102,22 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>aopalliance</groupId>
+ <artifactId>aopalliance</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
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
new file mode 100644
index 0000000..d3d61b4
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-log-check/src/main/java/module-info.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2022, 2024 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.cdi.log.check {
+ requires jakarta.ws.rs;
+ requires jakarta.annotation;
+ requires jakarta.inject;
+ requires jakarta.interceptor;
+ requires jakarta.cdi;
+
+ requires java.logging;
+ requires weld.api;
+// 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
new file mode 100644
index 0000000..f3233c1
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-log-check/src/test/java/module-info.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2022, 2024 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.cdi.log.check.test {
+ requires java.logging;
+
+ requires jakarta.cdi;
+ requires jakarta.el;
+ requires jakarta.inject;
+ requires jakarta.interceptor;
+ requires jakarta.ws.rs;
+
+ requires weld.core.impl;
+ requires weld.environment.common;
+ requires weld.se.core;
+ 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;
+
+ requires org.glassfish.jersey.tests.framework.core;
+ 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.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 9e845e0..8d80395 100644
--- a/tests/integration/cdi-integration/cdi-manually-bound/pom.xml
+++ b/tests/integration/cdi-integration/cdi-manually-bound/pom.xml
@@ -47,8 +47,35 @@
<artifactId>jersey-cdi1x</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-core-impl</artifactId>
+ <version>${weld.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-server</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <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>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging</artifactId>
+ <version>${jboss.logging.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -57,9 +84,23 @@
<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-external</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.containers</groupId>
+ <artifactId>jersey-container-grizzly2-http</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@@ -77,5 +118,21 @@
</exclusions>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
+
+ <properties>
+ <surefire.coverage.argline>
+ --add-opens weld.core.impl/org.jboss.weld.logging=org.jboss.logging
+ --add-reads org.jboss.logging=weld.core.impl
+ --add-reads org.jboss.logging=weld.environment.common
+ --add-reads org.jboss.logging=weld.se.core
+ --add-modules=ALL-MODULE-PATH
+ </surefire.coverage.argline>
+ </properties>
+
</project>
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
new file mode 100644
index 0000000..bfe1f73
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-manually-bound/src/main/java/module-info.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2022, 2024 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.cdi.manually.bound {
+ requires jakarta.ws.rs;
+ requires jakarta.inject;
+ requires jakarta.cdi;
+ requires jakarta.xml.bind;
+
+ requires weld.api;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.ext.cdi1x;
+
+ opens org.glassfish.jersey.tests.cdi.manuallybound;
+ exports org.glassfish.jersey.tests.cdi.manuallybound;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-manually-bound/src/main/resources/META-INF/beans.xml b/tests/integration/cdi-integration/cdi-manually-bound/src/main/resources/META-INF/beans.xml
index 1fb9c84..cfe3c46 100644
--- a/tests/integration/cdi-integration/cdi-manually-bound/src/main/resources/META-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-manually-bound/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -18,9 +18,8 @@
-->
-<beans
- xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/beans_1_0.xsd" bean-discovery-mode="none">
+<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
+ version="4.0" bean-discovery-mode="none">
</beans>
\ No newline at end of file
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
new file mode 100644
index 0000000..4365145
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/module-info.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2022, 2024 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.cdi.manually.bound.test {
+ requires jakarta.el;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires weld.environment.common;
+ requires weld.core.impl;
+ requires weld.se.core;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.ext.cdi1x;
+ requires org.glassfish.jersey.ext.weld2.se;
+ requires org.glassfish.jersey.container.grizzly2.http;
+
+ requires org.glassfish.jersey.tests.integration.cdi.manually.bound;
+
+ requires org.junit.jupiter.api;
+ requires org.junit.jupiter.engine;
+ requires org.junit.platform.engine;
+
+ requires org.glassfish.jersey.tests.framework.core;
+ requires org.glassfish.jersey.tests.framework.provider.external;
+ requires org.glassfish.jersey.tests.framework.provider.grizzly;
+
+ exports org.glassfish.jersey.tests.cdi.manuallybound.test;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/CdiServiceInjectTest.java b/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/test/CdiServiceInjectTest.java
similarity index 89%
rename from tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/CdiServiceInjectTest.java
rename to tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/test/CdiServiceInjectTest.java
index 29e4d77..45d75fd 100644
--- a/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/CdiServiceInjectTest.java
+++ b/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/test/CdiServiceInjectTest.java
@@ -14,12 +14,15 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.cdi.manuallybound;
+package org.glassfish.jersey.tests.cdi.manuallybound.test;
import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
import org.glassfish.jersey.test.external.ExternalTestContainerFactory;
+import org.glassfish.jersey.tests.cdi.manuallybound.CdiServiceImpl;
+import org.glassfish.jersey.tests.cdi.manuallybound.NoBeanDefiningAnnotationContainerFilter;
+import org.glassfish.jersey.tests.cdi.manuallybound.Resource;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/HK2ServiceInjectTest.java b/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/test/HK2ServiceInjectTest.java
similarity index 88%
rename from tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/HK2ServiceInjectTest.java
rename to tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/test/HK2ServiceInjectTest.java
index 9d0039f..2581891 100644
--- a/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/HK2ServiceInjectTest.java
+++ b/tests/integration/cdi-integration/cdi-manually-bound/src/test/java/org/glassfish/jersey/tests/cdi/manuallybound/test/HK2ServiceInjectTest.java
@@ -14,12 +14,16 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.cdi.manuallybound;
+package org.glassfish.jersey.tests.cdi.manuallybound.test;
import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
import org.glassfish.jersey.test.external.ExternalTestContainerFactory;
+import org.glassfish.jersey.tests.cdi.manuallybound.HK2Binder;
+import org.glassfish.jersey.tests.cdi.manuallybound.HK2InjectedFilter;
+import org.glassfish.jersey.tests.cdi.manuallybound.HK2ServiceImpl;
+import org.glassfish.jersey.tests.cdi.manuallybound.Resource;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml b/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml
index a71e449..b521645 100644
--- a/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml
@@ -53,9 +53,8 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.glassfish.jersey.test-framework.providers</groupId>
- <artifactId>jersey-test-framework-provider-bundle</artifactId>
- <type>pom</type>
+ <groupId>org.glassfish.jersey.test-framework</groupId>
+ <artifactId>jersey-test-framework-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/tests/integration/cdi-integration/cdi-multipart-webapp/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-multipart-webapp/src/main/java/module-info.java
new file mode 100644
index 0000000..e43e796
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-multipart-webapp/src/main/java/module-info.java
@@ -0,0 +1,24 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.cdi.multipart.webapp {
+ requires jakarta.ws.rs;
+ requires jakarta.cdi;
+
+ requires org.glassfish.jersey.media.multipart;
+
+ opens org.glassfish.jersey.tests.cdi.resources;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-multipart-webapp/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-multipart-webapp/src/test/java/module-info.java
new file mode 100644
index 0000000..b6b6ab3
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-multipart-webapp/src/test/java/module-info.java
@@ -0,0 +1,30 @@
+/*
+ * 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
+ * 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.cdi.multipart.webapp {
+ requires jakarta.cdi;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.media.multipart;
+
+ requires org.junit.jupiter.api;
+ requires org.junit.jupiter.params;
+ requires org.hamcrest;
+
+ requires org.glassfish.jersey.tests.framework.core;
+}
\ No newline at end of file
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 076dc7e..7b0eae2 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
@@ -65,6 +65,18 @@
<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>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging</artifactId>
+ <version>${jboss.logging.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -83,6 +95,21 @@
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
+ <properties>
+ <surefire.coverage.argline>
+ --add-opens weld.core.impl/org.jboss.weld.logging=org.jboss.logging
+ --add-reads org.jboss.logging=weld.core.impl
+ --add-reads org.jboss.logging=weld.environment.common
+ --add-reads org.jboss.logging=weld.se.core
+ --add-modules=ALL-MODULE-PATH
+ </surefire.coverage.argline>
+ </properties>
+
</project>
diff --git a/tests/integration/cdi-integration/cdi-resource-with-at-context/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-resource-with-at-context/src/main/java/module-info.java
new file mode 100644
index 0000000..3599091
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-resource-with-at-context/src/main/java/module-info.java
@@ -0,0 +1,27 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.cdi.resource.context {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ requires jakarta.inject;
+ requires jakarta.cdi;
+
+ requires org.glassfish.jersey.core.server;
+
+ exports org.glassfish.jersey.tests.cdi.resourceatcontext;
+ opens org.glassfish.jersey.tests.cdi.resourceatcontext;
+}
\ No newline at end of file
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
new file mode 100644
index 0000000..f78a401
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/module-info.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2022, 2025 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.cdi.resource.context.test {
+ requires jakarta.el;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.ext.cdi1x;
+ requires org.glassfish.jersey.ext.weld2.se;
+ requires org.glassfish.jersey.container.servlet;
+ requires org.glassfish.jersey.container.grizzly2.http;
+
+ requires weld.core.impl;
+ requires weld.environment.common;
+ requires weld.se.core;
+
+ requires org.junit.jupiter.api;
+ requires org.junit.jupiter.engine;
+ requires org.junit.platform.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;
+
+ exports org.glassfish.jersey.tests.cdi.resourceatcontext.test;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/org/glassfish/jersey/tests/cdi/resourceatcontext/ResourceWithConstructorTest.java b/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/org/glassfish/jersey/tests/cdi/resourceatcontext/test/ResourceWithConstructorTest.java
similarity index 95%
rename from tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/org/glassfish/jersey/tests/cdi/resourceatcontext/ResourceWithConstructorTest.java
rename to tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/org/glassfish/jersey/tests/cdi/resourceatcontext/test/ResourceWithConstructorTest.java
index 1f846f3..1464c81 100644
--- a/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/org/glassfish/jersey/tests/cdi/resourceatcontext/ResourceWithConstructorTest.java
+++ b/tests/integration/cdi-integration/cdi-resource-with-at-context/src/test/java/org/glassfish/jersey/tests/cdi/resourceatcontext/test/ResourceWithConstructorTest.java
@@ -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.resourceatcontext;
+package org.glassfish.jersey.tests.cdi.resourceatcontext.test;
import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory;
import org.glassfish.jersey.server.ResourceConfig;
@@ -25,6 +25,7 @@
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.resourceatcontext.App;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/cdi-singleton/pom.xml b/tests/integration/cdi-integration/cdi-singleton/pom.xml
index 5fb9bd1..f2a6098 100644
--- a/tests/integration/cdi-integration/cdi-singleton/pom.xml
+++ b/tests/integration/cdi-integration/cdi-singleton/pom.xml
@@ -49,6 +49,18 @@
<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>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging</artifactId>
+ <version>${jboss.logging.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -57,9 +69,23 @@
<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-external</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.containers</groupId>
+ <artifactId>jersey-container-grizzly2-http</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@@ -73,6 +99,11 @@
</exclusions>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/tests/integration/cdi-integration/cdi-singleton/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-singleton/src/main/java/module-info.java
new file mode 100644
index 0000000..39c136d
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-singleton/src/main/java/module-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.cdi.singleton {
+ requires jakarta.ws.rs;
+ requires jakarta.inject;
+
+ opens org.glassfish.jersey.tests.cdi.singleton;
+ exports org.glassfish.jersey.tests.cdi.singleton;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-singleton/src/main/java/org/glassfish/jersey/tests/cdi/singleton/SingletonTestApp.java b/tests/integration/cdi-integration/cdi-singleton/src/main/java/org/glassfish/jersey/tests/cdi/singleton/SingletonTestApp.java
index 3578328..67a39fe 100644
--- a/tests/integration/cdi-integration/cdi-singleton/src/main/java/org/glassfish/jersey/tests/cdi/singleton/SingletonTestApp.java
+++ b/tests/integration/cdi-integration/cdi-singleton/src/main/java/org/glassfish/jersey/tests/cdi/singleton/SingletonTestApp.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 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,7 +22,7 @@
public class SingletonTestApp extends Application {
- static final SingletonResource[] SINGLETON_RESOURCES = new SingletonResource[3];
+ public static final SingletonResource[] SINGLETON_RESOURCES = new SingletonResource[3];
@Override
public Set<Class<?>> getClasses() {
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
new file mode 100644
index 0000000..fdb0bc3
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-singleton/src/test/java/module-info.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2022, 2024 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.cdi.singleton.test {
+ requires jakarta.el;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.container.grizzly2.http;
+ requires org.glassfish.jersey.ext.weld2.se;
+ requires org.glassfish.jersey.tests.integration.cdi.singleton;
+
+ requires weld.core.impl;
+ requires weld.environment.common;
+ requires weld.se.core;
+
+ requires org.glassfish.jersey.tests.framework.core;
+ 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;
+ requires org.junit.platform.engine;
+
+ exports org.glassfish.jersey.tests.cdi.singleton.test;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-singleton/src/test/java/org/glassfish/jersey/tests/cdi/singleton/SingletonTest.java b/tests/integration/cdi-integration/cdi-singleton/src/test/java/org/glassfish/jersey/tests/cdi/singleton/test/SingletonTest.java
similarity index 92%
rename from tests/integration/cdi-integration/cdi-singleton/src/test/java/org/glassfish/jersey/tests/cdi/singleton/SingletonTest.java
rename to tests/integration/cdi-integration/cdi-singleton/src/test/java/org/glassfish/jersey/tests/cdi/singleton/test/SingletonTest.java
index 8e39986..3928527 100644
--- a/tests/integration/cdi-integration/cdi-singleton/src/test/java/org/glassfish/jersey/tests/cdi/singleton/SingletonTest.java
+++ b/tests/integration/cdi-integration/cdi-singleton/src/test/java/org/glassfish/jersey/tests/cdi/singleton/test/SingletonTest.java
@@ -14,11 +14,13 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.cdi.singleton;
+package org.glassfish.jersey.tests.cdi.singleton.test;
import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory;
import org.glassfish.jersey.test.JerseyTest;
import org.glassfish.jersey.test.external.ExternalTestContainerFactory;
+import org.glassfish.jersey.tests.cdi.singleton.SingletonResource;
+import org.glassfish.jersey.tests.cdi.singleton.SingletonTestApp;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/cdi-skipping-analyzer/pom.xml b/tests/integration/cdi-integration/cdi-skipping-analyzer/pom.xml
index e7f8022..5830c95 100644
--- a/tests/integration/cdi-integration/cdi-skipping-analyzer/pom.xml
+++ b/tests/integration/cdi-integration/cdi-skipping-analyzer/pom.xml
@@ -66,6 +66,12 @@
<groupId>org.glassfish.jersey.incubator</groupId>
<artifactId>jersey-injectless-client</artifactId>
<version>${jersey.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <scope>test</scope>
</dependency>
</dependencies>
</project>
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java b/tests/integration/cdi-integration/cdi-skipping-analyzer/src/main/java/module-info.java
similarity index 60%
copy from tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
copy to tests/integration/cdi-integration/cdi-skipping-analyzer/src/main/java/module-info.java
index e389cff..cf27e65 100644
--- a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingApi.java
+++ b/tests/integration/cdi-integration/cdi-skipping-analyzer/src/main/java/module-info.java
@@ -14,22 +14,10 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
-package org.glassfish.jersey.tests.e2e.inject.cdi.se.j6000;
+module org.glassfish.jersey.tests.integration.cdi.skipping.analyzer {
+ requires jakarta.cdi;
+ requires jakarta.inject;
-import jakarta.inject.Inject;
-import jakarta.ws.rs.GET;
-import jakarta.ws.rs.Path;
-import jakarta.ws.rs.Produces;
-import jakarta.ws.rs.core.MediaType;
-import jakarta.ws.rs.core.Response;
-
-@Path("/ping")
-public class PingApi {
- private @Inject PingService delegate;
-
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response ping() {
- return this.delegate.ping();
- }
+ exports org.glassfish.jersey.tests.cdi.skippinganalyzer;
+ opens org.glassfish.jersey.tests.cdi.skippinganalyzer;
}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-skipping-analyzer/src/main/resources/META-INF/beans.xml b/tests/integration/cdi-integration/cdi-skipping-analyzer/src/main/resources/META-INF/beans.xml
index 56ad04f..0850fd8 100644
--- a/tests/integration/cdi-integration/cdi-skipping-analyzer/src/main/resources/META-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-skipping-analyzer/src/main/resources/META-INF/beans.xml
@@ -18,7 +18,8 @@
-->
-<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
- bean-discovery-mode="annotated" version="2.0">
+<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
+ version="4.0" bean-discovery-mode="annotated">
</beans>
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-skipping-analyzer/src/main/webapp/WEB-INF/web.xml b/tests/integration/cdi-integration/cdi-skipping-analyzer/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index e038a3a..0000000
--- a/tests/integration/cdi-integration/cdi-skipping-analyzer/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v. 2.0, which is available at
- http://www.eclipse.org/legal/epl-2.0.
-
- This Source Code may also be made available under the following Secondary
- Licenses when the conditions for such availability set forth in the
- Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- version 2 with the GNU Classpath Exception, which is available at
- https://www.gnu.org/software/classpath/license.html.
-
- SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-
--->
-
-<web-app xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
- version="3.0">
-</web-app>
diff --git a/tests/integration/cdi-integration/cdi-skipping-analyzer/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-skipping-analyzer/src/test/java/module-info.java
new file mode 100644
index 0000000..f7f6eb1
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-skipping-analyzer/src/test/java/module-info.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2025 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
+ */
+
+open module org.glassfish.jersey.tests.integration.cdi.skipping.analyzer.test {
+ requires jakarta.cdi;
+ requires org.glassfish.hk2.api;
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.ext.cdi1x;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.hamcrest;
+ requires org.junit.jupiter.api;
+ requires weld.se.core;
+ requires org.glassfish.jersey.tests.integration.cdi.skipping.analyzer;
+
+ exports org.glassfish.jersey.tests.cdi.skippinganalyzer.test;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-skipping-analyzer/src/test/java/org/glassfish/jersey/tests/cdi/skippinganalyzer/SkippingAnalyzerTest.java b/tests/integration/cdi-integration/cdi-skipping-analyzer/src/test/java/org/glassfish/jersey/tests/cdi/skippinganalyzer/test/SkippingAnalyzerTest.java
similarity index 93%
rename from tests/integration/cdi-integration/cdi-skipping-analyzer/src/test/java/org/glassfish/jersey/tests/cdi/skippinganalyzer/SkippingAnalyzerTest.java
rename to tests/integration/cdi-integration/cdi-skipping-analyzer/src/test/java/org/glassfish/jersey/tests/cdi/skippinganalyzer/test/SkippingAnalyzerTest.java
index 698e496..61ae214 100644
--- a/tests/integration/cdi-integration/cdi-skipping-analyzer/src/test/java/org/glassfish/jersey/tests/cdi/skippinganalyzer/SkippingAnalyzerTest.java
+++ b/tests/integration/cdi-integration/cdi-skipping-analyzer/src/test/java/org/glassfish/jersey/tests/cdi/skippinganalyzer/test/SkippingAnalyzerTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2024, 2025 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.skippinganalyzer;
+package org.glassfish.jersey.tests.cdi.skippinganalyzer.test;
import org.glassfish.hk2.api.ClassAnalyzer;
import org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider;
@@ -22,6 +22,7 @@
import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory;
import org.glassfish.jersey.internal.inject.InjectionManager;
import org.glassfish.jersey.internal.inject.Injections;
+import org.glassfish.jersey.tests.cdi.skippinganalyzer.CdiServiceImpl;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.jboss.weld.environment.se.Weld;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/pom.xml b/tests/integration/cdi-integration/cdi-test-webapp/pom.xml
index 5622e37..4453d9e 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-test-webapp/pom.xml
@@ -48,9 +48,23 @@
<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-external</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.containers</groupId>
+ <artifactId>jersey-container-grizzly2-http</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@@ -59,8 +73,29 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-api</artifactId>
+ </dependency>
+ <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>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.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
<scope>test</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
new file mode 100644
index 0000000..d2987e2
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/module-info.java
@@ -0,0 +1,28 @@
+/*
+ * 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
+ * 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.cdi.test.webapp {
+ requires jakarta.annotation;
+ requires jakarta.ws.rs;
+ requires jakarta.inject;
+ requires jakarta.cdi;
+
+ requires java.logging;
+ requires static weld.api;
+
+ 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-test-webapp/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/module-info.java
new file mode 100644
index 0000000..00ac6c5
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/module-info.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2022, 2024 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.cdi.test.webapp.test {
+ requires java.logging;
+
+ requires jakarta.annotation;
+ requires jakarta.el;
+ requires jakarta.cdi;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires weld.api;
+ requires weld.core.impl;
+ requires weld.environment.common;
+ requires weld.se.core;
+
+ requires org.hamcrest;
+
+ requires org.glassfish.grizzly.http.server;
+
+ 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;
+ requires org.glassfish.jersey.ext.cdi1x;
+ requires org.glassfish.jersey.container.grizzly2.http;
+
+
+ requires org.glassfish.jersey.tests.framework.core;
+ 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;
+ requires org.junit.jupiter.params;
+ requires org.junit.platform.engine;
+
+ 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/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CdiTest.java
similarity index 93%
rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiTest.java
rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CdiTest.java
index d4523ad..657bf6c 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CdiTest.java
@@ -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 java.net.URI;
@@ -23,6 +23,7 @@
import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.tests.cdi.resources.MainApplication;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ConstructorInjectionTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ConstructorInjectionTest.java
similarity index 97%
rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ConstructorInjectionTest.java
rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ConstructorInjectionTest.java
index fe0edde..bb31406 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ConstructorInjectionTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ConstructorInjectionTest.java
@@ -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 jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.Response;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/CounterTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CounterTest.java
similarity index 96%
rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/CounterTest.java
rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CounterTest.java
index 392d639..fa1ec43 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/CounterTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/CounterTest.java
@@ -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 jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.Response;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/JaxRsInjectedCdiBeanTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/JaxRsInjectedCdiBeanTest.java
similarity index 96%
rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/JaxRsInjectedCdiBeanTest.java
rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/JaxRsInjectedCdiBeanTest.java
index b00475c..6640e4c 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/JaxRsInjectedCdiBeanTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/JaxRsInjectedCdiBeanTest.java
@@ -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 jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.Response;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/NonJaxRsBeanJaxRsInjectionTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/NonJaxRsBeanJaxRsInjectionTest.java
similarity index 96%
rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/NonJaxRsBeanJaxRsInjectionTest.java
rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/NonJaxRsBeanJaxRsInjectionTest.java
index 3d577f4..a22ad08 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/NonJaxRsBeanJaxRsInjectionTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/NonJaxRsBeanJaxRsInjectionTest.java
@@ -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 java.io.IOException;
import java.net.URI;
@@ -34,6 +34,8 @@
import org.glassfish.grizzly.http.server.HttpHandler;
import org.glassfish.grizzly.http.server.HttpServer;
+import org.glassfish.jersey.tests.cdi.resources.MainApplication;
+import org.glassfish.jersey.tests.cdi.resources.SecondaryApplication;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assumptions;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/PerRequestBeanTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/PerRequestBeanTest.java
similarity index 97%
rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/PerRequestBeanTest.java
rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/PerRequestBeanTest.java
index 6865a66..c3e24b8 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/PerRequestBeanTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/PerRequestBeanTest.java
@@ -15,7 +15,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 java.util.List;
import java.util.stream.Stream;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/PerRequestDependentBeanTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/PerRequestDependentBeanTest.java
similarity index 96%
rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/PerRequestDependentBeanTest.java
rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/PerRequestDependentBeanTest.java
index 4954859..1970c6b 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/PerRequestDependentBeanTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/PerRequestDependentBeanTest.java
@@ -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 java.util.stream.Stream;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ProducerTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ProducerTest.java
similarity index 96%
rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ProducerTest.java
rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ProducerTest.java
index ed9dc7e..7460ec8 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ProducerTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ProducerTest.java
@@ -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 jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.Response;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/QualifiedInjectionSetGetTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/QualifiedInjectionSetGetTest.java
similarity index 96%
rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/QualifiedInjectionSetGetTest.java
rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/QualifiedInjectionSetGetTest.java
index 04570fb..558204f 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/QualifiedInjectionSetGetTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/QualifiedInjectionSetGetTest.java
@@ -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 jakarta.inject.Qualifier;
import jakarta.ws.rs.client.Entity;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ReverseEchoTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ReverseEchoTest.java
similarity index 96%
rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ReverseEchoTest.java
rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ReverseEchoTest.java
index 4f57650..f901338 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ReverseEchoTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/ReverseEchoTest.java
@@ -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 java.util.stream.Stream;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SecondJaxRsInjectedCdiBeanTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SecondJaxRsInjectedCdiBeanTest.java
similarity index 95%
rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SecondJaxRsInjectedCdiBeanTest.java
rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SecondJaxRsInjectedCdiBeanTest.java
index 7d33b41..d3be5a8 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SecondJaxRsInjectedCdiBeanTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SecondJaxRsInjectedCdiBeanTest.java
@@ -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 java.net.URI;
@@ -25,6 +25,7 @@
import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.tests.cdi.resources.SecondaryApplication;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SingletonBeanTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SingletonBeanTest.java
similarity index 98%
rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SingletonBeanTest.java
rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SingletonBeanTest.java
index 045d742..caf412f 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SingletonBeanTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SingletonBeanTest.java
@@ -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 java.util.stream.Stream;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SingletonDependentBeanTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SingletonDependentBeanTest.java
similarity index 98%
rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SingletonDependentBeanTest.java
rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SingletonDependentBeanTest.java
index 19a7033..5180d00 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/SingletonDependentBeanTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/SingletonDependentBeanTest.java
@@ -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 java.util.stream.Stream;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/StutterEchoTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/StutterEchoTest.java
similarity index 96%
rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/StutterEchoTest.java
rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/StutterEchoTest.java
index ba2d1fd..9621562 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/StutterEchoTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/StutterEchoTest.java
@@ -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 java.util.stream.Stream;
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/TimerTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/TimerTest.java
similarity index 97%
rename from tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/TimerTest.java
rename to tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/TimerTest.java
index fa7dcb2..0bcc3bb 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/TimerTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/test/TimerTest.java
@@ -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 java.util.logging.Level;
import java.util.logging.Logger;
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml
index d7f4e90..c455dd6 100644
--- a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml
@@ -67,9 +67,8 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.glassfish.jersey.test-framework.providers</groupId>
- <artifactId>jersey-test-framework-provider-bundle</artifactId>
- <type>pom</type>
+ <groupId>org.glassfish.jersey.test-framework</groupId>
+ <artifactId>jersey-test-framework-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/java/module-info.java
new file mode 100644
index 0000000..c89f60b
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/java/module-info.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2022, 2025 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.cdi.injection.cfg {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ requires jakarta.inject;
+ requires jakarta.cdi;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.ext.cdi1x;
+
+ opens org.glassfish.jersey.tests.cdi.resources;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/test/java/module-info.java
new file mode 100644
index 0000000..6b9c6bf
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/test/java/module-info.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2022, 2025 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.cdi.injection.cfg {
+ requires jakarta.cdi;
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+
+ requires org.junit.jupiter.api;
+ requires org.junit.jupiter.params;
+ requires org.glassfish.jersey.tests.framework.core;
+ requires org.hamcrest;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml
index 87703e3..4ba214f 100644
--- a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml
@@ -81,9 +81,8 @@
</dependency>
<dependency>
- <groupId>org.glassfish.jersey.test-framework.providers</groupId>
- <artifactId>jersey-test-framework-provider-bundle</artifactId>
- <type>pom</type>
+ <groupId>org.glassfish.jersey.test-framework</groupId>
+ <artifactId>jersey-test-framework-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/java/module-info.java
new file mode 100644
index 0000000..7e80de2
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/java/module-info.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2022, 2025 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.cdi.injection.hk2.banned {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ requires jakarta.inject;
+ requires jakarta.cdi;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+
+ opens org.glassfish.jersey.tests.cdi.resources;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/test/java/module-info.java
new file mode 100644
index 0000000..efa5d3d
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/test/java/module-info.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2022, 2025 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.cdi.injection.hk2.banned {
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires jakarta.cdi;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+
+ requires org.junit.jupiter.api;
+ requires org.hamcrest;
+
+ requires org.glassfish.jersey.tests.framework.core;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml
index f687983..e0c0dc8 100644
--- a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml
@@ -58,9 +58,8 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.glassfish.jersey.test-framework.providers</groupId>
- <artifactId>jersey-test-framework-provider-bundle</artifactId>
- <type>pom</type>
+ <groupId>org.glassfish.jersey.test-framework</groupId>
+ <artifactId>jersey-test-framework-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/java/module-info.java
new file mode 100644
index 0000000..0ebdca9
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/java/module-info.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2022, 2025 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.cdi.injection.webapp {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ requires jakarta.inject;
+ requires jakarta.cdi;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.ext.cdi1x;
+
+ opens org.glassfish.jersey.tests.cdi.resources;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/test/java/module-info.java b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/test/java/module-info.java
new file mode 100644
index 0000000..555fcca
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/test/java/module-info.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2022, 2025 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.cdi.injection.webapp {
+ requires jakarta.inject;
+ requires jakarta.cdi;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+
+ requires org.glassfish.jersey.tests.framework.core;
+
+ requires org.junit.jupiter.params;
+ requires org.hamcrest;
+}
\ No newline at end of file
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 8db2f14..3ac7297 100644
--- a/tests/integration/cdi-integration/context-inject-on-server/pom.xml
+++ b/tests/integration/cdi-integration/context-inject-on-server/pom.xml
@@ -56,8 +56,24 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-api</artifactId>
+ </dependency>
+ <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>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging</artifactId>
+ <version>${jboss.logging.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -68,6 +84,11 @@
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<profiles>
<profile>
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
new file mode 100644
index 0000000..456aa72
--- /dev/null
+++ b/tests/integration/cdi-integration/context-inject-on-server/src/main/java/module-info.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2022, 2025 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.cdi.inject.server {
+ requires jakarta.annotation;
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ requires jakarta.inject;
+ requires jakarta.cdi;
+ 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;
+
+ opens org.glassfish.jersey.tests.cdi.inject;
+ exports org.glassfish.jersey.tests.cdi.inject;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/main/java/org/glassfish/jersey/tests/cdi/inject/InjectionChecker.java b/tests/integration/cdi-integration/context-inject-on-server/src/main/java/org/glassfish/jersey/tests/cdi/inject/InjectionChecker.java
index 2d18f7c..9f0561c 100644
--- a/tests/integration/cdi-integration/context-inject-on-server/src/main/java/org/glassfish/jersey/tests/cdi/inject/InjectionChecker.java
+++ b/tests/integration/cdi-integration/context-inject-on-server/src/main/java/org/glassfish/jersey/tests/cdi/inject/InjectionChecker.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 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
@@ -42,10 +42,10 @@
import java.lang.annotation.Annotation;
import java.util.Iterator;
-class InjectionChecker {
- static final String APPLICATION_PROPERTY = "ApplicationProperty";
- static final String HEADER = "HttpHeader";
- static final String ROOT = "resource";
+public class InjectionChecker {
+ public static final String APPLICATION_PROPERTY = "ApplicationProperty";
+ public static final String HEADER = "HttpHeader";
+ public static final String ROOT = "resource";
static boolean checkApplication(Application application, StringBuilder sb) {
if (application == null) {
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
new file mode 100644
index 0000000..e98c9bf
--- /dev/null
+++ b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/module-info.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2022, 2025 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.cdi.inject.server.test {
+ requires jakarta.annotation;
+ requires jakarta.el;
+ requires jakarta.cdi;
+ requires jakarta.inject;
+ requires jakarta.servlet;
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+ requires org.glassfish.jersey.container.servlet;
+ requires org.glassfish.jersey.container.grizzly2.http;
+ 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.environment.common;
+ requires weld.core.impl;
+ requires weld.se.core;
+
+ requires org.glassfish.jersey.media.sse;
+ requires org.glassfish.jersey.ext.cdi1x;
+
+ requires org.junit.jupiter.api;
+ requires org.junit.platform.engine;
+ requires org.glassfish.jersey.tests.framework.core;
+ requires org.glassfish.jersey.tests.framework.provider.grizzly;
+
+ exports org.glassfish.jersey.tests.cdi.inject.test;
+ opens org.glassfish.jersey.tests.cdi.inject.test;
+}
\ No newline at end of file
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/NonScopedApplicationInjectTest.java b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/NonScopedApplicationInjectTest.java
similarity index 94%
rename from tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/NonScopedApplicationInjectTest.java
rename to tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/NonScopedApplicationInjectTest.java
index 2b25463..1614615 100644
--- a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/NonScopedApplicationInjectTest.java
+++ b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/NonScopedApplicationInjectTest.java
@@ -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.NonScopedApplicationInject;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/NonScopedInjectionTest.java b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/NonScopedInjectionTest.java
similarity index 96%
rename from tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/NonScopedInjectionTest.java
rename to tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/NonScopedInjectionTest.java
index c1339f5..a0f051e 100644
--- a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/NonScopedInjectionTest.java
+++ b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/NonScopedInjectionTest.java
@@ -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.NonScopedApplication;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/ScopedApplicationInjectTest.java b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/ScopedApplicationInjectTest.java
similarity index 94%
rename from tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/ScopedApplicationInjectTest.java
rename to tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/ScopedApplicationInjectTest.java
index 9c2f15d..384f17c 100644
--- a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/ScopedApplicationInjectTest.java
+++ b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/ScopedApplicationInjectTest.java
@@ -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.ScopedApplicationInject;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/ScopedInjectionTest.java b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/ScopedInjectionTest.java
similarity index 96%
rename from tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/ScopedInjectionTest.java
rename to tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/ScopedInjectionTest.java
index 85ebed0..6affbd2 100644
--- a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/ScopedInjectionTest.java
+++ b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/ScopedInjectionTest.java
@@ -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.ScopedApplication;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
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/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/SseTest.java b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/SseTest.java
similarity index 96%
rename from tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/SseTest.java
rename to tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/SseTest.java
index 6fc8952..1d8a993 100644
--- a/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/SseTest.java
+++ b/tests/integration/cdi-integration/context-inject-on-server/src/test/java/org/glassfish/jersey/tests/cdi/inject/test/SseTest.java
@@ -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.SseAplication;
import org.jboss.weld.environment.se.Weld;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
diff --git a/tests/integration/cdi-integration/pom.xml b/tests/integration/cdi-integration/pom.xml
index 7988f8f..d9fa7c8 100644
--- a/tests/integration/cdi-integration/pom.xml
+++ b/tests/integration/cdi-integration/pom.xml
@@ -31,6 +31,18 @@
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
<name>cdi-integration-project</name>
+
+ <properties>
+ <surefire.coverage.argline>
+ --add-opens weld.core.impl/org.jboss.weld.logging=org.jboss.logging
+ --add-reads org.jboss.logging=weld.core.impl
+ --add-reads org.jboss.logging=weld.environment.common
+ --add-reads org.jboss.logging=weld.se.core
+ --add-modules=ALL-MODULE-PATH
+ </surefire.coverage.argline>
+ </properties>
+
+
<modules>
<module>cdi-beanvalidation-webapp</module>
<module>cdi-client</module>
diff --git a/tests/integration/client-connector-provider/pom.xml b/tests/integration/client-connector-provider/pom.xml
index cd267a9..5cd3565 100644
--- a/tests/integration/client-connector-provider/pom.xml
+++ b/tests/integration/client-connector-provider/pom.xml
@@ -48,9 +48,18 @@
<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>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/tests/integration/client-connector-provider/src/main/java/module-info.java b/tests/integration/client-connector-provider/src/main/java/module-info.java
new file mode 100644
index 0000000..59e9460
--- /dev/null
+++ b/tests/integration/client-connector-provider/src/main/java/module-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.client.connector.provider {
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.client;
+
+ exports org.glassfish.jersey.tests.integration.client.connector.provider;
+}
\ No newline at end of file
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..6981a38
--- /dev/null
+++ b/tests/integration/client-connector-provider/src/test/java/module-info.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2023, 2025 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.junit.platform.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/ejb-multimodule/lib/pom.xml b/tests/integration/ejb-multimodule/lib/pom.xml
index 508748f..3698175 100644
--- a/tests/integration/ejb-multimodule/lib/pom.xml
+++ b/tests/integration/ejb-multimodule/lib/pom.xml
@@ -47,6 +47,11 @@
<artifactId>jakarta.annotation-api</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>jakarta.enterprise</groupId>
+ <artifactId>jakarta.enterprise.cdi-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
diff --git a/tests/integration/ejb-multimodule/lib/src/main/java/module-info.java b/tests/integration/ejb-multimodule/lib/src/main/java/module-info.java
new file mode 100644
index 0000000..ff74d10
--- /dev/null
+++ b/tests/integration/ejb-multimodule/lib/src/main/java/module-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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
+ * 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.ejb.multimodule.lib {
+ requires jakarta.ws.rs;
+ requires jakarta.ejb;
+
+ exports org.glassfish.jersey.tests.integration.multimodule.ejb.lib;
+}
\ No newline at end of file
diff --git a/tests/integration/ejb-multimodule/war/pom.xml b/tests/integration/ejb-multimodule/war/pom.xml
index 13d5e0b..794e978 100644
--- a/tests/integration/ejb-multimodule/war/pom.xml
+++ b/tests/integration/ejb-multimodule/war/pom.xml
@@ -38,6 +38,11 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>jakarta.enterprise</groupId>
+ <artifactId>jakarta.enterprise.cdi-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ejb-multimodule-lib</artifactId>
<version>${project.version}</version>
diff --git a/tests/integration/ejb-multimodule/war/src/main/java/module-info.java b/tests/integration/ejb-multimodule/war/src/main/java/module-info.java
new file mode 100644
index 0000000..e4cad14
--- /dev/null
+++ b/tests/integration/ejb-multimodule/war/src/main/java/module-info.java
@@ -0,0 +1,24 @@
+/*
+ * 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
+ * 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.ejb.multimodule.war {
+ requires jakarta.ws.rs;
+ requires jakarta.ejb;
+
+ requires org.glassfish.jersey.tests.integration.ejb.multimodule.lib;
+
+ exports org.glassfish.jersey.tests.integration.multimodule.ejb.web1;
+}
\ No newline at end of file
diff --git a/tests/integration/ejb-test-webapp/pom.xml b/tests/integration/ejb-test-webapp/pom.xml
index 4f2ece7..071220d 100644
--- a/tests/integration/ejb-test-webapp/pom.xml
+++ b/tests/integration/ejb-test-webapp/pom.xml
@@ -53,6 +53,11 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>jakarta.enterprise</groupId>
+ <artifactId>jakarta.enterprise.cdi-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-bundle</artifactId>
<type>pom</type>
diff --git a/tests/integration/ejb-test-webapp/src/main/java/module-info.java b/tests/integration/ejb-test-webapp/src/main/java/module-info.java
new file mode 100644
index 0000000..f86647b
--- /dev/null
+++ b/tests/integration/ejb-test-webapp/src/main/java/module-info.java
@@ -0,0 +1,25 @@
+/*
+ * 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
+ * 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.ejb.test.webapp {
+ requires jakarta.ws.rs;
+ requires jakarta.ejb;
+ requires jakarta.servlet;
+
+ requires java.logging;
+
+ exports org.glassfish.jersey.tests.ejb.resources;
+}
\ No newline at end of file
diff --git a/tests/integration/jaxrs-component-inject/src/main/java/module-info.java b/tests/integration/jaxrs-component-inject/src/main/java/module-info.java
new file mode 100644
index 0000000..f7c3fa9
--- /dev/null
+++ b/tests/integration/jaxrs-component-inject/src/main/java/module-info.java
@@ -0,0 +1,24 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jaxrs.component.inject {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.common;
+
+ exports org.glassfish.jersey.tests.jaxrs.inject;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-1107/src/main/java/module-info.java b/tests/integration/jersey-1107/src/main/java/module-info.java
new file mode 100644
index 0000000..cbdb86d
--- /dev/null
+++ b/tests/integration/jersey-1107/src/main/java/module-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey_1107 {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.server;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-1223/src/main/java/module-info.java b/tests/integration/jersey-1223/src/main/java/module-info.java
new file mode 100644
index 0000000..15fcf36
--- /dev/null
+++ b/tests/integration/jersey-1223/src/main/java/module-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey1223 {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.server;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-1604/pom.xml b/tests/integration/jersey-1604/pom.xml
index afdb089..d3564bf 100644
--- a/tests/integration/jersey-1604/pom.xml
+++ b/tests/integration/jersey-1604/pom.xml
@@ -72,4 +72,9 @@
</plugin>
</plugins>
</build>
+ <properties>
+ <failsafe.coverage.argline>
+ --add-opens org.glassfish.jersey.core.client/org.glassfish.jersey.client.innate=ALL-UNNAMED
+ --add-exports org.glassfish.jersey.core.common/org.glassfish.jersey.innate.io=ALL-UNNAMED --add-modules=ALL-MODULE-PATH</failsafe.coverage.argline>
+ </properties>
</project>
diff --git a/tests/integration/jersey-1604/src/main/java/module-info.java b/tests/integration/jersey-1604/src/main/java/module-info.java
new file mode 100644
index 0000000..b339487
--- /dev/null
+++ b/tests/integration/jersey-1604/src/main/java/module-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey_1604 {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.core.client;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-1667/src/main/java/module-info.java b/tests/integration/jersey-1667/src/main/java/module-info.java
new file mode 100644
index 0000000..a2f3b00
--- /dev/null
+++ b/tests/integration/jersey-1667/src/main/java/module-info.java
@@ -0,0 +1,24 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey_1667 {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.client;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.media.multipart;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-1883/src/main/java/module-info.java b/tests/integration/jersey-1883/src/main/java/module-info.java
new file mode 100644
index 0000000..3c742ae
--- /dev/null
+++ b/tests/integration/jersey-1883/src/main/java/module-info.java
@@ -0,0 +1,25 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey_1883 {
+ requires jakarta.annotation;
+ requires jakarta.ws.rs;
+ requires jakarta.inject;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-1928/src/main/java/module-info.java b/tests/integration/jersey-1928/src/main/java/module-info.java
new file mode 100644
index 0000000..383097a
--- /dev/null
+++ b/tests/integration/jersey-1928/src/main/java/module-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey1928 {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.server;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-1960/src/main/java/module-info.java b/tests/integration/jersey-1960/src/main/java/module-info.java
new file mode 100644
index 0000000..b9714eb
--- /dev/null
+++ b/tests/integration/jersey-1960/src/main/java/module-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey_1960 {
+ requires jakarta.ws.rs;
+ requires jakarta.servlet;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.common;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2031/pom.xml b/tests/integration/jersey-2031/pom.xml
index bde9a02..b69d141 100644
--- a/tests/integration/jersey-2031/pom.xml
+++ b/tests/integration/jersey-2031/pom.xml
@@ -53,6 +53,12 @@
<artifactId>jersey-test-framework-provider-external</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>jakarta.servlet.jsp</groupId>
+ <artifactId>jakarta.servlet.jsp-api</artifactId>
+ <version>${jsp.version}</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
@@ -102,4 +108,4 @@
</plugins>
</build>
-</project>
+</project>
\ No newline at end of file
diff --git a/tests/integration/jersey-2031/src/main/java/module-info.java b/tests/integration/jersey-2031/src/main/java/module-info.java
new file mode 100644
index 0000000..b46433a
--- /dev/null
+++ b/tests/integration/jersey-2031/src/main/java/module-info.java
@@ -0,0 +1,24 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey_2031 {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ requires jakarta.servlet.jsp;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.ext.mvc;
+ requires org.glassfish.jersey.ext.mvc.jsp;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2136/src/main/java/module-info.java b/tests/integration/jersey-2136/src/main/java/module-info.java
new file mode 100644
index 0000000..324dc62
--- /dev/null
+++ b/tests/integration/jersey-2136/src/main/java/module-info.java
@@ -0,0 +1,21 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey_2136 {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ requires org.glassfish.jersey.core.server;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2137/src/main/java/module-info.java b/tests/integration/jersey-2137/src/main/java/module-info.java
new file mode 100644
index 0000000..f35db2e
--- /dev/null
+++ b/tests/integration/jersey-2137/src/main/java/module-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey_2137 {
+ requires jakarta.persistence;
+ requires jakarta.cdi;
+ requires jakarta.transaction;
+ requires jakarta.ws.rs;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2154/src/main/java/module-info.java b/tests/integration/jersey-2154/src/main/java/module-info.java
new file mode 100644
index 0000000..b295a3a
--- /dev/null
+++ b/tests/integration/jersey-2154/src/main/java/module-info.java
@@ -0,0 +1,21 @@
+/*
+ * 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
+ * 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_2154 {
+ requires jakarta.ejb;
+ requires jakarta.cdi;
+ requires jakarta.ws.rs;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2160/src/main/java/module-info.java b/tests/integration/jersey-2160/src/main/java/module-info.java
new file mode 100644
index 0000000..15779d5
--- /dev/null
+++ b/tests/integration/jersey-2160/src/main/java/module-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey_2160 {
+ requires jakarta.servlet;
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ requires org.glassfish.hk2.api;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2164/src/main/java/module-info.java b/tests/integration/jersey-2164/src/main/java/module-info.java
new file mode 100644
index 0000000..c6dd33e
--- /dev/null
+++ b/tests/integration/jersey-2164/src/main/java/module-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.async.jersey2164 {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2167/src/main/java/module-info.txt b/tests/integration/jersey-2167/src/main/java/module-info.txt
new file mode 100644
index 0000000..5e49c90
--- /dev/null
+++ b/tests/integration/jersey-2167/src/main/java/module-info.txt
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2022, 2025 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_2167 {
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires java.logging;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2176/src/main/java/module-info.java b/tests/integration/jersey-2176/src/main/java/module-info.java
new file mode 100644
index 0000000..791d9d9
--- /dev/null
+++ b/tests/integration/jersey-2176/src/main/java/module-info.java
@@ -0,0 +1,24 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey_2176 {
+ requires jakarta.ws.rs;
+ requires jakarta.servlet;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2184/src/main/java/module-info.java b/tests/integration/jersey-2184/src/main/java/module-info.java
new file mode 100644
index 0000000..17571be
--- /dev/null
+++ b/tests/integration/jersey-2184/src/main/java/module-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey_2184 {
+ requires jakarta.servlet;
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.inject.hk2;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2255/pom.xml b/tests/integration/jersey-2255/pom.xml
index 17d9f14..9f4b79a 100644
--- a/tests/integration/jersey-2255/pom.xml
+++ b/tests/integration/jersey-2255/pom.xml
@@ -51,6 +51,17 @@
<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>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
@@ -69,5 +80,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/main/java/module-info.java b/tests/integration/jersey-2255/src/main/java/module-info.java
new file mode 100644
index 0000000..c9d1889
--- /dev/null
+++ b/tests/integration/jersey-2255/src/main/java/module-info.java
@@ -0,0 +1,25 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey_2255 {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+ 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-2255/src/test/java/module-info.java b/tests/integration/jersey-2255/src/test/java/module-info.java
new file mode 100644
index 0000000..57c76c2
--- /dev/null
+++ b/tests/integration/jersey-2255/src/test/java/module-info.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2023, 2025 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.junit.platform.engine;
+ 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-2322/src/main/java/module-info.txt b/tests/integration/jersey-2322/src/main/java/module-info.txt
new file mode 100644
index 0000000..2bcefdc
--- /dev/null
+++ b/tests/integration/jersey-2322/src/main/java/module-info.txt
@@ -0,0 +1,23 @@
+/*
+ * 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
+ */
+//TODO - fixme as soon as json-jackson module is modularized
+module org.glassfish.jersey.tests.integration.jersey_2322 {
+ requires com.fasterxml.jackson.databind;
+
+ requires jakarta.ws.rs;
+
+ requires org.glassfish.jersey.core.server;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2335/src/main/java/module-info.txt b/tests/integration/jersey-2335/src/main/java/module-info.txt
new file mode 100644
index 0000000..902ee54
--- /dev/null
+++ b/tests/integration/jersey-2335/src/main/java/module-info.txt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2022, 2025 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_2335 {
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+
+ opens org.glassfish.jersey.tests.integration.jersey2335;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2551/src/main/java/module-info.java b/tests/integration/jersey-2551/src/main/java/module-info.java
new file mode 100644
index 0000000..346a629
--- /dev/null
+++ b/tests/integration/jersey-2551/src/main/java/module-info.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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey_2551 {
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.hk2.api;
+ requires org.glassfish.hk2.locator;
+
+ requires org.glassfish.jersey.core.server;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2612/src/main/java/module-info.java b/tests/integration/jersey-2612/src/main/java/module-info.java
new file mode 100644
index 0000000..9e3eaf7
--- /dev/null
+++ b/tests/integration/jersey-2612/src/main/java/module-info.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2022, 2025 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_2612 {
+ requires jakarta.inject;
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+ requires org.glassfish.jersey.inject.hk2;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2637/src/main/java/module-info.java b/tests/integration/jersey-2637/src/main/java/module-info.java
new file mode 100644
index 0000000..1568de5
--- /dev/null
+++ b/tests/integration/jersey-2637/src/main/java/module-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey_2637 {
+ requires jakarta.servlet;
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.jersey.core.server;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2654/src/main/java/module-info.java b/tests/integration/jersey-2654/src/main/java/module-info.java
new file mode 100644
index 0000000..c2d5306
--- /dev/null
+++ b/tests/integration/jersey-2654/src/main/java/module-info.java
@@ -0,0 +1,20 @@
+/*
+ * 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
+ */
+
+module org.glassfish.jersey.tests.integration.jersey_2654 {
+ requires jakarta.ws.rs;
+// requires jakarta.xml.bind;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-2704/pom.xml b/tests/integration/jersey-2704/pom.xml
index 46d26e6..e5d39c6 100644
--- a/tests/integration/jersey-2704/pom.xml
+++ b/tests/integration/jersey-2704/pom.xml
@@ -69,4 +69,4 @@
</plugins>
</build>
-</project>
+</project>
\ No newline at end of file
diff --git a/tests/integration/jersey-2704/src/main/java/module-info.java b/tests/integration/jersey-2704/src/main/java/module-info.java
new file mode 100644
index 0000000..fea5b09
--- /dev/null
+++ b/tests/integration/jersey-2704/src/main/java/module-info.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2022, 2025 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_2704 {
+ requires jakarta.inject;
+// requires jakarta.persistence;
+ requires jakarta.servlet;
+ requires jakarta.ws.rs;
+ requires jakarta.xml.bind;
+
+ requires org.glassfish.hk2.api;
+
+ requires org.glassfish.jersey.core.common;
+ requires org.glassfish.jersey.core.server;
+
+ requires org.glassfish.jersey.container.servlet;
+}
\ No newline at end of file
diff --git a/tests/integration/jersey-4099/pom.xml b/tests/integration/jersey-4099/pom.xml
index 7c1f0ca..f43fc7f 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>
@@ -81,7 +85,11 @@
<groupId>org.glassfish.jersey.ext.cdi</groupId>
<artifactId>jersey-cdi1x</artifactId>
</dependency>
-
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
@@ -92,4 +100,13 @@
</plugin>
</plugins>
</build>
+ <properties>
+ <surefire.coverage.argline>
+ --add-opens weld.core.impl/org.jboss.weld.logging=org.jboss.logging
+ --add-reads org.jboss.logging=weld.core.impl
+ --add-reads org.jboss.logging=weld.environment.common
+ --add-reads org.jboss.logging=weld.se.core
+ --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
new file mode 100644
index 0000000..35c3a3e
--- /dev/null
+++ b/tests/integration/jersey-4099/src/main/java/module-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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
+ * 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;
+
+}
\ 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..7135e70
--- /dev/null
+++ b/tests/integration/jersey-4099/src/test/java/module-info.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2023, 2025 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.junit.platform.engine;
+ 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-5087/pom.xml b/tests/integration/jersey-5087/pom.xml
index 7c0a435..f604488 100644
--- a/tests/integration/jersey-5087/pom.xml
+++ b/tests/integration/jersey-5087/pom.xml
@@ -73,6 +73,12 @@
<dependency>
<groupId>org.glassfish.jersey.connectors</groupId>
<artifactId>jersey-jetty-connector</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.connectors</groupId>
@@ -306,4 +312,15 @@
<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>
+ <profiles>
+ <profile>
+ <id>jdk_11_17</id>
+ <activation>
+ <jdk>[11,17)</jdk>
+ </activation>
+ <properties>
+ <slf4j.version>2.0.13</slf4j.version>
+ </properties>
+ </profile>
+ </profiles>
</project>
\ No newline at end of file
diff --git a/tests/integration/jersey-780/pom.xml b/tests/integration/jersey-780/pom.xml
index dacfb1a..5d0477a 100644
--- a/tests/integration/jersey-780/pom.xml
+++ b/tests/integration/jersey-780/pom.xml
@@ -43,6 +43,28 @@
<artifactId>jersey-test-framework-provider-external</artifactId>
<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.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>aopalliance</groupId>
+ <artifactId>aopalliance</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
@@ -61,5 +83,10 @@
</plugin>
</plugins>
</build>
-
+ <properties>
+ <failsafe.coverage.argline>
+ --add-reads org.glassfish.jersey.tests.integration.jersey_780=ALL-UNNAMED
+ --add-modules=ALL-MODULE-PATH
+ </failsafe.coverage.argline>
+ </properties>
</project>
diff --git a/tests/integration/microprofile/rest-client-tck3/pom.xml b/tests/integration/microprofile/rest-client-tck3/pom.xml
index f8eb909..26f7d21 100644
--- a/tests/integration/microprofile/rest-client-tck3/pom.xml
+++ b/tests/integration/microprofile/rest-client-tck3/pom.xml
@@ -167,7 +167,7 @@
</dependency>
<!--<dependency>
<groupId>org.glassfish.jersey.connectors</groupId>
- <artifactId>jersey-apache-connector</artifactId>
+ <artifactId>jersey-apache5-connector</artifactId>
<scope>test</scope>
</dependency>-->
<dependency>