More JPMS updates
Signed-off-by: jansupol <jan.supol@oracle.com>
diff --git a/bom/pom.xml b/bom/pom.xml
index 7cb7db3..85803d4 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -352,6 +352,11 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.glassfish.jersey.inject</groupId>
+ <artifactId>jersey-cdi2-se</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.glassfish.jersey.test-framework</groupId>
<artifactId>jersey-test-framework-core</artifactId>
<version>${project.version}</version>
diff --git a/connectors/jetty-connector/pom.xml b/connectors/jetty-connector/pom.xml
index 52cbddc..719b4bf 100644
--- a/connectors/jetty-connector/pom.xml
+++ b/connectors/jetty-connector/pom.xml
@@ -97,10 +97,9 @@
<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>
+ <groupId>jakarta.servlet</groupId>
+ <artifactId>jakarta.servlet-api</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
diff --git a/connectors/jetty11-connector/src/main/java/module-info.java b/connectors/jetty11-connector/src/main/java/module-info.java
deleted file mode 100644
index 62dbbb8..0000000
--- a/connectors/jetty11-connector/src/main/java/module-info.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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
deleted file mode 100644
index eb47e83..0000000
--- a/connectors/jetty11-connector/src/test/java/module-info.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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/netty-connector/src/main/java/module-info.java b/connectors/netty-connector/src/main/java/module-info.java
index 48b0a1f..4798c8c 100644
--- a/connectors/netty-connector/src/main/java/module-info.java
+++ b/connectors/netty-connector/src/main/java/module-info.java
@@ -36,7 +36,8 @@
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;
+ exports org.glassfish.jersey.netty.connector.internal;
opens org.glassfish.jersey.netty.connector;
+ opens org.glassfish.jersey.netty.connector.internal;
}
\ 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
index 4e03f6b..8f0aced 100644
--- a/containers/jersey-servlet/src/main/java/module-info.java
+++ b/containers/jersey-servlet/src/main/java/module-info.java
@@ -21,17 +21,17 @@
requires jakarta.inject;
requires static jakarta.persistence;
requires jakarta.ws.rs;
- requires static jakarta.servlet;
+ requires jakarta.servlet;
requires org.glassfish.jersey.core.common;
requires org.glassfish.jersey.core.server;
+ exports org.glassfish.jersey.servlet;
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;
@@ -44,6 +44,8 @@
uses org.glassfish.jersey.servlet.spi.AsyncContextDelegateProvider;
uses org.glassfish.jersey.servlet.spi.FilterUrlMappingsProvider;
+ provides jakarta.servlet.ServletContainerInitializer with
+ org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer;
provides org.glassfish.jersey.servlet.spi.AsyncContextDelegateProvider with
org.glassfish.jersey.servlet.async.AsyncContextDelegateProviderImpl;
provides org.glassfish.jersey.servlet.spi.FilterUrlMappingsProvider with
diff --git a/containers/jetty-http/src/main/java11/org/glassfish/jersey/jetty/JettyHttpContainer.java b/containers/jetty-http/src/main/java11/org/glassfish/jersey/jetty/JettyHttpContainer.java
deleted file mode 100644
index e69de29..0000000
--- a/containers/jetty-http/src/main/java11/org/glassfish/jersey/jetty/JettyHttpContainer.java
+++ /dev/null
diff --git a/containers/jetty-servlet/src/main/java/module-info.txt b/containers/jetty-servlet/src/main/java/module-info.java
similarity index 89%
rename from containers/jetty-servlet/src/main/java/module-info.txt
rename to containers/jetty-servlet/src/main/java/module-info.java
index 894f892..8be67aa 100644
--- a/containers/jetty-servlet/src/main/java/module-info.txt
+++ b/containers/jetty-servlet/src/main/java/module-info.java
@@ -17,16 +17,17 @@
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 jakarta.servlet;
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;
+ requires org.eclipse.jetty.ee10.webapp;
exports org.glassfish.jersey.jetty.servlet;
+ opens org.glassfish.jersey.jetty.servlet;
}
\ No newline at end of file
diff --git a/core-client/pom.xml b/core-client/pom.xml
index 04eb6bd..6964fc9 100644
--- a/core-client/pom.xml
+++ b/core-client/pom.xml
@@ -33,15 +33,6 @@
<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>
diff --git a/core-server/pom.xml b/core-server/pom.xml
index 2583a37..c86426e 100644
--- a/core-server/pom.xml
+++ b/core-server/pom.xml
@@ -316,7 +316,12 @@
<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>
+ <surefire.coverage.argline>
+ --add-opens org.glassfish.jersey.core.server/org.glassfish.jersey.server.internal.inject=jakarta.xml.bind
+ --add-reads org.glassfish.jersey.core.server=org.glassfish.hk2.api
+ --add-reads org.glassfish.jersey.core.server=org.glassfish.hk2.locator
+ --add-reads org.glassfish.jersey.core.server=org.glassfish.jersey.inject.hk2
+ </surefire.coverage.argline>
</properties>
</project>
diff --git a/core-server/src/main/java/module-info.java b/core-server/src/main/java/module-info.java
index 7d3e3f4..a532b99 100644
--- a/core-server/src/main/java/module-info.java
+++ b/core-server/src/main/java/module-info.java
@@ -27,7 +27,6 @@
requires jdk.httpserver;
- requires static org.glassfish.jersey.inject.hk2;
requires static org.glassfish.hk2.api;
// jersey common modules
diff --git a/ext/bean-validation/src/main/java/module-info.java b/ext/bean-validation/src/main/java/module-info.java
index 4404399..9a81b0b 100644
--- a/ext/bean-validation/src/main/java/module-info.java
+++ b/ext/bean-validation/src/main/java/module-info.java
@@ -35,22 +35,30 @@
org.glassfish.hk2.locator,
org.glassfish.hk2.utilities,
org.glassfish.jersey.core.client,
- org.glassfish.jersey.ext.mvc.bean.validation;
+ org.glassfish.jersey.ext.mvc.bean.validation,
+ org.glassfish.jersey.inject.cdi2.se,
+ weld.core.impl;
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;
+ org.glassfish.jersey.core.client,
+ org.glassfish.jersey.inject.cdi2.se,
+ weld.core.impl;
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;
+ org.glassfish.jersey.ext.mvc.bean.validation,
+ org.glassfish.jersey.inject.cdi2.se,
+ weld.core.impl;
opens org.glassfish.jersey.server.validation.internal.hibernate to
org.glassfish.hk2.locator,
org.glassfish.hk2.utilities,
- org.glassfish.jersey.core.client;
+ org.glassfish.jersey.core.client,
+ org.glassfish.jersey.inject.cdi2.se,
+ weld.core.impl;
opens org.glassfish.jersey.server.validation.internal.l10n;
provides org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable with
diff --git a/ext/cdi/jersey-cdi1x/src/main/java/module-info.java b/ext/cdi/jersey-cdi1x/src/main/java/module-info.java
index 5ffdfbe..f5e097b 100644
--- a/ext/cdi/jersey-cdi1x/src/main/java/module-info.java
+++ b/ext/cdi/jersey-cdi1x/src/main/java/module-info.java
@@ -40,9 +40,7 @@
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,
diff --git a/media/moxy/src/main/java/module-info.java b/media/moxy/src/main/java/module-info.java
index 7d7f953..b191466 100644
--- a/media/moxy/src/main/java/module-info.java
+++ b/media/moxy/src/main/java/module-info.java
@@ -31,6 +31,15 @@
exports org.glassfish.jersey.moxy.internal;
exports org.glassfish.jersey.moxy.json;
+ exports org.glassfish.jersey.moxy.json.internal to
+ org.glassfish.hk2.locator,
+ org.glassfish.hk2.utilities,
+ org.glassfish.jersey.core.client,
+ org.glassfish.jersey.core.common,
+ org.glassfish.jersey.incubator.cdi.inject.weld,
+ org.glassfish.jersey.inject.cdi2.se,
+ weld.core.impl;
+
exports org.glassfish.jersey.moxy.xml;
opens org.glassfish.jersey.moxy.internal;
@@ -38,8 +47,8 @@
opens org.glassfish.jersey.moxy.json.internal to
org.glassfish.hk2.locator,
org.glassfish.hk2.utilities,
- org.glassfish.jersey.core.common,
org.glassfish.jersey.core.client,
+ org.glassfish.jersey.core.common,
org.glassfish.jersey.incubator.cdi.inject.weld,
org.glassfish.jersey.inject.cdi2.se,
weld.core.impl;
diff --git a/media/multipart/src/main/java/module-info.java b/media/multipart/src/main/java/module-info.java
index 755dbdf..8dd1f9c 100644
--- a/media/multipart/src/main/java/module-info.java
+++ b/media/multipart/src/main/java/module-info.java
@@ -30,23 +30,11 @@
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
diff --git a/test-framework/maven/container-runner-maven-plugin/pom.xml b/test-framework/maven/container-runner-maven-plugin/pom.xml
index ed43163..1034daa 100644
--- a/test-framework/maven/container-runner-maven-plugin/pom.xml
+++ b/test-framework/maven/container-runner-maven-plugin/pom.xml
@@ -258,6 +258,16 @@
</dependency>
</dependencies>
</plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <instructions>
+ <Automatic-Module-Name>org.glassfish.jersey.tests.framework.container.runner.plugin</Automatic-Module-Name>
+ </instructions>
+ </configuration>
+ </plugin>
</plugins>
<pluginManagement>
diff --git a/test-framework/maven/custom-enforcer-rules/pom.xml b/test-framework/maven/custom-enforcer-rules/pom.xml
index 824376c..8f6e549 100644
--- a/test-framework/maven/custom-enforcer-rules/pom.xml
+++ b/test-framework/maven/custom-enforcer-rules/pom.xml
@@ -74,5 +74,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.tests.framework.custom.enforcer.rules</Automatic-Module-Name>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>