JPMS in e2e-server Signed-off-by: jansupol <jan.supol@oracle.com>
diff --git a/connectors/helidon-connector/pom.xml b/connectors/helidon-connector/pom.xml index 9d66f54..23ee4da 100644 --- a/connectors/helidon-connector/pom.xml +++ b/connectors/helidon-connector/pom.xml
@@ -178,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/src/main/java/module-info.java b/connectors/jdk-connector/src/main/java/module-info.java index 7147232..753dffd 100644 --- a/connectors/jdk-connector/src/main/java/module-info.java +++ b/connectors/jdk-connector/src/main/java/module-info.java
@@ -27,10 +27,18 @@ 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; + 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/jetty-http2-connector/src/test/java/module-info.java b/connectors/jetty-http2-connector/src/test/java/module-info.java index 5453358..ab3f5a5 100644 --- a/connectors/jetty-http2-connector/src/test/java/module-info.java +++ b/connectors/jetty-http2-connector/src/test/java/module-info.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 @@ -30,6 +30,7 @@ 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;
diff --git a/connectors/jnh-connector/src/test/java/module-info.java b/connectors/jnh-connector/src/test/java/module-info.java index f5731a7..e1b8bce 100644 --- a/connectors/jnh-connector/src/test/java/module-info.java +++ b/connectors/jnh-connector/src/test/java/module-info.java
@@ -41,6 +41,7 @@ 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;
diff --git a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/AbstractJavaConnectorTest.java b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/AbstractJavaConnectorTest.java index b5895ac..1202518 100644 --- a/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/AbstractJavaConnectorTest.java +++ b/connectors/jnh-connector/src/test/java/org/glassfish/jersey/jnh/connector/test/AbstractJavaConnectorTest.java
@@ -89,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/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/helidon/pom.xml b/containers/helidon/pom.xml index 4d27311..31d389c 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/jersey-servlet/src/main/java/module-info.java b/containers/jersey-servlet/src/main/java/module-info.java index 61a23c7..4e03f6b 100644 --- a/containers/jersey-servlet/src/main/java/module-info.java +++ b/containers/jersey-servlet/src/main/java/module-info.java
@@ -34,7 +34,11 @@ 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;
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 f6b284e..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;
diff --git a/core-client/pom.xml b/core-client/pom.xml index 247356c..93e6514 100644 --- a/core-client/pom.xml +++ b/core-client/pom.xml
@@ -39,7 +39,6 @@ --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 - --add-modules=ALL-MODULE-PATH </surefire.coverage.argline> </properties>
diff --git a/core-client/src/main/java/module-info.java b/core-client/src/main/java/module-info.java index ee94e3a..5a2241d 100644 --- a/core-client/src/main/java/module-info.java +++ b/core-client/src/main/java/module-info.java
@@ -51,18 +51,17 @@ org.glassfish.jersey.incubator.injectless.client; opens org.glassfish.jersey.client; - opens org.glassfish.jersey.client.spi; + 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.AsyncConnectorCallback; uses org.glassfish.jersey.client.spi.ConnectorProvider; uses org.glassfish.jersey.client.spi.DefaultSslContextProvider; - uses org.glassfish.jersey.client.spi.InvocationBuilderListener; - uses org.glassfish.jersey.client.spi.PostInvocationInterceptor; - uses org.glassfish.jersey.client.spi.PreInvocationInterceptor; provides jakarta.ws.rs.client.ClientBuilder with org.glassfish.jersey.client.JerseyClientBuilder;
diff --git a/core-common/pom.xml b/core-common/pom.xml index b4e0ca8..e2c8444 100644 --- a/core-common/pom.xml +++ b/core-common/pom.xml
@@ -79,22 +79,6 @@ <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> @@ -301,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> @@ -474,10 +458,6 @@ <surefire.security.argline>-Djava.security.manager -Djava.security.policy=${project.build.directory}/test-classes/surefire.policy</surefire.security.argline> <java21.build.outputDirectory>${project.build.directory}/classes-java21</java21.build.outputDirectory> <java21.sourceDirectory>${project.basedir}/src/main/java21</java21.sourceDirectory> - <surefire.coverage.argline> - --add-reads org.glassfish.jersey.core.common=ALL-UNNAMED - --add-modules=ALL-MODULE-PATH - </surefire.coverage.argline> </properties> </project>
diff --git a/core-common/src/main/java/module-info.java b/core-common/src/main/java/module-info.java index 5020acd..0ed83e4 100644 --- a/core-common/src/main/java/module-info.java +++ b/core-common/src/main/java/module-info.java
@@ -42,6 +42,7 @@ 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 @@ -62,28 +63,32 @@ 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.inject.cdi2.se, - 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.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.gf.ejb, - org.glassfish.jersey.security.oauth1.signature; + 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, @@ -100,22 +105,38 @@ 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.io.spi to 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.ServiceFinder; uses org.glassfish.jersey.internal.inject.InjectionManagerFactory; uses org.glassfish.jersey.internal.spi.AutoDiscoverable; uses org.glassfish.jersey.internal.spi.ForcedAutoDiscoverable;
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 93% 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 fe0e8a0..798b18f 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
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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,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/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 2b24237..285f3d0 100644 --- a/core-server/pom.xml +++ b/core-server/pom.xml
@@ -316,7 +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-modules=ALL-MODULE-PATH</surefire.coverage.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 index de75462..733d774 100644 --- a/core-server/src/main/java/module-info.java +++ b/core-server/src/main/java/module-info.java
@@ -35,10 +35,30 @@ requires org.glassfish.jersey.core.client; exports org.glassfish.jersey.server; - exports org.glassfish.jersey.server.spi; - exports org.glassfish.jersey.server.spi.internal; + 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; @@ -46,34 +66,8 @@ 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 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.monitoring; - 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.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 to org.glassfish.hk2.locator; - exports org.glassfish.jersey.server.internal.scanning to org.glassfish.jersey.container.servlet; - exports org.glassfish.jersey.server.internal.sonar; exports com.sun.research.ws.wadl; - exports org.glassfish.jersey.server.internal.monitoring.core; - - uses org.glassfish.jersey.server.spi.ComponentProvider; - uses org.glassfish.jersey.server.spi.ExternalRequestScope; - uses org.glassfish.jersey.server.spi.WebServerProvider; opens com.sun.research.ws.wadl to jakarta.xml.bind; @@ -82,19 +76,44 @@ 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 to org.glassfish.hk2.utilities, weld.core.impl; - opens org.glassfish.jersey.server.internal.inject; - opens org.glassfish.jersey.server.internal.monitoring to org.glassfish.hk2.utilities; + 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 to org.glassfish.hk2.utilities; + 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
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/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/ext/bean-validation/src/main/java/module-info.java b/ext/bean-validation/src/main/java/module-info.java index 017bd1d..4404399 100644 --- a/ext/bean-validation/src/main/java/module-info.java +++ b/ext/bean-validation/src/main/java/module-info.java
@@ -34,19 +34,23 @@ 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.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.hk2.utilities, + org.glassfish.jersey.core.client; 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 2d7b737..5ffdfbe 100644 --- a/ext/cdi/jersey-cdi1x/src/main/java/module-info.java +++ b/ext/cdi/jersey-cdi1x/src/main/java/module-info.java
@@ -33,7 +33,10 @@ 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;
diff --git a/ext/entity-filtering/src/main/java/module-info.java b/ext/entity-filtering/src/main/java/module-info.java index 0722c06..9d8853d 100644 --- a/ext/entity-filtering/src/main/java/module-info.java +++ b/ext/entity-filtering/src/main/java/module-info.java
@@ -29,19 +29,7 @@ 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; - - uses org.glassfish.jersey.message.filtering.spi.AbstractEntityProcessor; - uses org.glassfish.jersey.message.filtering.spi.AbstractObjectProvider; - uses org.glassfish.jersey.message.filtering.spi.EntityGraph; - uses org.glassfish.jersey.message.filtering.spi.EntityGraphProvider; - uses org.glassfish.jersey.message.filtering.spi.EntityInspector; - uses org.glassfish.jersey.message.filtering.spi.EntityProcessor; - uses org.glassfish.jersey.message.filtering.spi.EntityProcessorContext; - uses org.glassfish.jersey.message.filtering.spi.ObjectGraph; - uses org.glassfish.jersey.message.filtering.spi.ObjectGraphTransformer; - uses org.glassfish.jersey.message.filtering.spi.ObjectProvider; - uses org.glassfish.jersey.message.filtering.spi.ScopeProvider; - uses org.glassfish.jersey.message.filtering.spi.ScopeResolver; - + opens org.glassfish.jersey.message.filtering.spi; } \ No newline at end of file
diff --git a/ext/metainf-services/src/main/java/module-info.java b/ext/metainf-services/src/main/java/module-info.java index 64ab7f0..dfdfa2c 100644 --- a/ext/metainf-services/src/main/java/module-info.java +++ b/ext/metainf-services/src/main/java/module-info.java
@@ -19,7 +19,9 @@ requires jakarta.ws.rs; requires org.glassfish.jersey.core.common; - exports org.glassfish.jersey.spidiscovery.internal to org.glassfish.hk2.locator; + 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;
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/micrometer/pom.xml b/ext/micrometer/pom.xml index 8f1cf82..d7c6f74 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/incubator/declarative-linking/src/test/java/module-info.txt b/ext/micrometer/src/main/java/module-info.java similarity index 68% copy from incubator/declarative-linking/src/test/java/module-info.txt copy to ext/micrometer/src/main/java/module-info.java index aee82c7..a0f90cc 100644 --- a/incubator/declarative-linking/src/test/java/module-info.txt +++ b/ext/micrometer/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * 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 @@ -14,18 +14,16 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -open module org.glassfish.jersey.incubator.declarative.linking { - requires junit; - +module org.glassfish.jersey.ext.micrometer { requires java.logging; - requires java.desktop; - requires jakarta.xml.bind; - - requires com.fasterxml.jackson.databind; - - requires org.glassfish.jersey.core.client; + 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; - requires jsonassert; + + 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/src/main/java/module-info.java b/ext/microprofile/mp-config/src/main/java/module-info.java index cda7d57..7f292cd 100644 --- a/ext/microprofile/mp-config/src/main/java/module-info.java +++ b/ext/microprofile/mp-config/src/main/java/module-info.java
@@ -22,6 +22,7 @@ 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;
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 index 6a06610..76d2ddc 100644 --- a/ext/microprofile/mp-rest-client/src/main/java/module-info.java +++ b/ext/microprofile/mp-rest-client/src/main/java/module-info.java
@@ -38,6 +38,7 @@ 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
diff --git a/ext/mvc-bean-validation/src/main/java/module-info.java b/ext/mvc-bean-validation/src/main/java/module-info.java index f479039..71f6214 100644 --- a/ext/mvc-bean-validation/src/main/java/module-info.java +++ b/ext/mvc-bean-validation/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 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 @@ -23,4 +23,6 @@ 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-freemarker/src/main/java/module-info.java b/ext/mvc-freemarker/src/main/java/module-info.java index 2af13d3..0651b1d 100644 --- a/ext/mvc-freemarker/src/main/java/module-info.java +++ b/ext/mvc-freemarker/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 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 @@ -26,4 +26,6 @@ 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/src/main/java/module-info.java b/ext/mvc-jsp/src/main/java/module-info.java index 8afa940..8a0eb4b 100644 --- a/ext/mvc-jsp/src/main/java/module-info.java +++ b/ext/mvc-jsp/src/main/java/module-info.java
@@ -27,5 +27,6 @@ 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/src/main/java/module-info.java b/ext/mvc-mustache/src/main/java/module-info.java index 65360fc..0e5bf96 100644 --- a/ext/mvc-mustache/src/main/java/module-info.java +++ b/ext/mvc-mustache/src/main/java/module-info.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 @@ -28,4 +28,6 @@ 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/incubator/gae-integration/src/main/java/module-info.java b/ext/mvc-thymeleaf/src/main/java/module-info.java similarity index 65% copy from incubator/gae-integration/src/main/java/module-info.java copy to ext/mvc-thymeleaf/src/main/java/module-info.java index 761af57..ff0bb29 100644 --- a/incubator/gae-integration/src/main/java/module-info.java +++ b/ext/mvc-thymeleaf/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved. + * 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 @@ -14,13 +14,17 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.incubator.gae.integration { +module org.glassfish.jersey.ext.mvc.jersey.mvc.thymeleaf { + requires jakarta.inject; + requires jakarta.servlet; requires jakarta.ws.rs; -// requires com.google.appengine.api; - requires org.glassfish.jersey.core.common; - requires org.glassfish.jersey.core.server; + requires org.glassfish.jersey.ext.mvc; - exports org.glassfish.jersey.server.gae; + requires thymeleaf; + + 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 index b440986..411575d 100644 --- a/ext/mvc/src/main/java/module-info.java +++ b/ext/mvc/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 202, 2025 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 @@ -26,13 +26,12 @@ requires org.glassfish.jersey.core.common; exports org.glassfish.jersey.server.mvc; - exports org.glassfish.jersey.server.mvc.internal to org.glassfish.jersey.ext.mvc.jsp; + 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; - - uses org.glassfish.jersey.server.mvc.spi.TemplateProcessor; - uses org.glassfish.jersey.server.mvc.spi.ViewableContext; - uses org.glassfish.jersey.server.mvc.spi.AbstractTemplateProcessor; + 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/spi/AbstractTemplateProcessor.java b/ext/mvc/src/main/java/org/glassfish/jersey/server/mvc/spi/AbstractTemplateProcessor.java index 7f878cf..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
@@ -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/spring6/pom.xml b/ext/spring6/pom.xml index 794ecfb..d971f32 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/src/main/java/module-info.java b/ext/wadl-doclet/src/main/java/module-info.java index cad70c3..0380148 100644 --- a/ext/wadl-doclet/src/main/java/module-info.java +++ b/ext/wadl-doclet/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 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 @@ -27,4 +27,5 @@ 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/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 94fd307..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
@@ -63,7 +63,7 @@ /** * 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
diff --git a/incubator/declarative-linking/pom.xml b/incubator/declarative-linking/pom.xml index c6deb93..f740318 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> @@ -132,11 +132,6 @@ </profile> </profiles> - <!--<properties> - <surefire.coverage.argline>--add-opens java.base/java.util.zip=org.glassfish.jersey.incubator.declarative.linking - --add-opens java.base/java.util=org.glassfish.jersey.incubator.declarative.linking --illegal-access=permit</surefire.coverage.argline> - </properties>--> - <build> <resources> <resource>
diff --git a/incubator/declarative-linking/src/main/java/module-info.txt b/incubator/declarative-linking/src/main/java/module-info.java similarity index 86% rename from incubator/declarative-linking/src/main/java/module-info.txt rename to incubator/declarative-linking/src/main/java/module-info.java index 2835731..a362c42 100644 --- a/incubator/declarative-linking/src/main/java/module-info.txt +++ b/incubator/declarative-linking/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 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 @@ -27,9 +27,11 @@ requires org.glassfish.jersey.core.common; requires org.glassfish.jersey.core.server; - opens org.glassfish.jersey.linking; 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.txt b/incubator/declarative-linking/src/test/java/module-info.java similarity index 75% rename from incubator/declarative-linking/src/test/java/module-info.txt rename to incubator/declarative-linking/src/test/java/module-info.java index aee82c7..c3eb32e 100644 --- a/incubator/declarative-linking/src/test/java/module-info.txt +++ b/incubator/declarative-linking/src/test/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 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 @@ -15,17 +15,25 @@ */ open module org.glassfish.jersey.incubator.declarative.linking { - requires junit; + requires jakarta.el; + requires jakarta.inject; + requires jakarta.ws.rs; + + requires jakarta.xml.bind; requires java.logging; requires java.desktop; - requires jakarta.xml.bind; - - requires com.fasterxml.jackson.databind; - 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 da67308..f800ca7 100644 --- a/incubator/gae-integration/pom.xml +++ b/incubator/gae-integration/pom.xml
@@ -74,6 +74,16 @@ </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 b/incubator/gae-integration/src/main/java/module-info.java.txt similarity index 92% rename from incubator/gae-integration/src/main/java/module-info.java rename to incubator/gae-integration/src/main/java/module-info.java.txt index 761af57..eb398d8 100644 --- a/incubator/gae-integration/src/main/java/module-info.java +++ b/incubator/gae-integration/src/main/java/module-info.java.txt
@@ -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
diff --git a/incubator/html-json/pom.xml b/incubator/html-json/pom.xml index 4c0dbe1..6f10e85 100644 --- a/incubator/html-json/pom.xml +++ b/incubator/html-json/pom.xml
@@ -156,6 +156,16 @@ </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/injectless-client/src/main/java/module-info.java b/incubator/injectless-client/src/main/java/module-info.java index aa30805..91e0582 100644 --- a/incubator/injectless-client/src/main/java/module-info.java +++ b/incubator/injectless-client/src/main/java/module-info.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 @@ -24,6 +24,7 @@ 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;
diff --git a/incubator/open-tracing/src/main/java/module-info.java b/incubator/open-tracing/src/main/java/module-info.java index aa82948..98696d7 100644 --- a/incubator/open-tracing/src/main/java/module-info.java +++ b/incubator/open-tracing/src/main/java/module-info.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 @@ -26,4 +26,5 @@ 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/src/main/java/module-info.java b/inject/cdi2-se/src/main/java/module-info.java index 1352b45..23918e3 100644 --- a/inject/cdi2-se/src/main/java/module-info.java +++ b/inject/cdi2-se/src/main/java/module-info.java
@@ -36,6 +36,8 @@ 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;
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/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/src/main/java/module-info.java b/media/jaxb/src/main/java/module-info.java index 9589c4c..2f614ad 100644 --- a/media/jaxb/src/main/java/module-info.java +++ b/media/jaxb/src/main/java/module-info.java
@@ -24,15 +24,11 @@ requires org.glassfish.jersey.core.common; exports org.glassfish.jersey.jaxb; - exports org.glassfish.jersey.jaxb.internal to - org.glassfish.hk2.locator, - org.glassfish.hk2.utilities, - org.glassfish.jersey.media.json.jettison; + exports org.glassfish.jersey.jaxb.internal; exports org.glassfish.jersey.jaxb.internal.l10n; - opens org.glassfish.jersey.jaxb.internal to - org.glassfish.hk2.locator, - org.glassfish.hk2.utilities; + 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
diff --git a/media/json-binding/src/main/java/module-info.java b/media/json-binding/src/main/java/module-info.java index 3604b07..ca53be1 100644 --- a/media/json-binding/src/main/java/module-info.java +++ b/media/json-binding/src/main/java/module-info.java
@@ -27,7 +27,9 @@ 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;
diff --git a/media/json-jackson/src/main/java/module-info.txt b/media/json-gson/src/main/java/module-info.java similarity index 60% rename from media/json-jackson/src/main/java/module-info.txt rename to media/json-gson/src/main/java/module-info.java index bb32929..ac7f400 100644 --- a/media/json-jackson/src/main/java/module-info.txt +++ b/media/json-gson/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * 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 @@ -14,20 +14,18 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.media.json.jackson { +module org.glassfish.jersey.media.json.gson { + requires com.google.gson; requires jakarta.annotation; requires jakarta.inject; requires jakarta.ws.rs; - - requires com.fasterxml.jackson.core; - requires com.fasterxml.jackson.annotation; - requires com.fasterxml.jackson.databind; - requires com.fasterxml.jackson.module.jaxb; - requires com.fasterxml.jackson.module.jakarta.xmlbind; - requires org.glassfish.jersey.core.common; - requires org.glassfish.jersey.core.server; - requires org.glassfish.jersey.ext.entity.filtering; - exports org.glassfish.jersey.jackson; + 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 0fdeb2d..752954d 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>
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/src/main/java/module-info.java b/media/json-jettison/src/main/java/module-info.java index 78882b5..671ce68 100644 --- a/media/json-jettison/src/main/java/module-info.java +++ b/media/json-jettison/src/main/java/module-info.java
@@ -28,7 +28,12 @@ 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-processing/src/main/java/module-info.java b/media/json-processing/src/main/java/module-info.java index 9077b05..40a9958 100644 --- a/media/json-processing/src/main/java/module-info.java +++ b/media/json-processing/src/main/java/module-info.java
@@ -29,7 +29,12 @@ opens org.glassfish.jersey.jsonp.internal to org.glassfish.hk2.locator, - org.glassfish.hk2.utilities; + 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;
diff --git a/media/moxy/src/main/java/module-info.java b/media/moxy/src/main/java/module-info.java index 2119453..2fc7daa 100644 --- a/media/moxy/src/main/java/module-info.java +++ b/media/moxy/src/main/java/module-info.java
@@ -29,12 +29,20 @@ requires org.eclipse.persistence.core; requires org.eclipse.persistence.moxy; - exports org.glassfish.jersey.moxy.xml; + 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.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;
diff --git a/media/multipart/pom.xml b/media/multipart/pom.xml index 719eac3..0451347 100644 --- a/media/multipart/pom.xml +++ b/media/multipart/pom.xml
@@ -36,12 +36,8 @@ <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-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-modules=ALL-MODULE-PATH --add-reads org.glassfish.jersey.media.multipart=jakarta.json </surefire.coverage.argline> </properties>
diff --git a/media/multipart/src/main/java/module-info.java b/media/multipart/src/main/java/module-info.java index 3cc54b9..755dbdf 100644 --- a/media/multipart/src/main/java/module-info.java +++ b/media/multipart/src/main/java/module-info.java
@@ -28,19 +28,25 @@ requires org.glassfish.jersey.core.common; exports org.glassfish.jersey.media.multipart; - exports org.glassfish.jersey.media.multipart.internal to - org.glassfish.hk2.locator, - org.glassfish.hk2.utilities, - org.glassfish.jersey.core.server, - org.glassfish.jersey.core.client; + 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.internal to - org.glassfish.hk2.locator, - org.glassfish.hk2.utilities, - org.glassfish.jersey.core.server, - org.glassfish.jersey.core.client; + 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/pom.xml b/pom.xml index a6c6593..5b7a417 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/--> @@ -695,6 +695,7 @@ <configuration> <instructions> <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy> + <_noimportjava>true</_noimportjava> <_nodefaultversion>false</_nodefaultversion> <Include-Resource>{maven-resources},${project.build.directory}/legal</Include-Resource> </instructions> @@ -879,6 +880,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> @@ -891,77 +906,6 @@ <profiles> <profile> - <id>jdk8</id> - <activation> - <jdk>1.8</jdk> - </activation> - <properties> - <checkstyle.version>9.3</checkstyle.version> - <istack.mvn.plugin.version>3.0.9</istack.mvn.plugin.version> - </properties> - <build> - <pluginManagement> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>${compiler.mvn.plugin.version}</version> - <inherited>true</inherited> - <configuration> - <excludes> - <exclude>module-info.java</exclude> - </excludes> - </configuration> - </plugin> - </plugins> - </pluginManagement> - </build> - </profile> - <profile> - <id>jdk11+</id> - <!-- - JDK 9 & 10 is unsupported (as well as <release>9</release>) - module-info for java.xml.bind is taken from JDK (lib/ct.sym/9-modules) - and it depends on java.activation which clashes with javax.activation - --> - <activation> - <jdk>[11,)</jdk> - </activation> - <build> - <pluginManagement> - <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> - <configuration> - compile everything to ensure module-info contains right entries - <release>${java.version}</release> - </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> - </plugins> - </pluginManagement> - </build> - </profile> - <profile> <!-- Use it with release-perform goal to skip another test run. --> <id>testsSkip</id> <activation> @@ -2178,13 +2122,6 @@ <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.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>
diff --git a/security/oauth1-client/src/main/java/module-info.java b/security/oauth1-client/src/main/java/module-info.java index 370e721..20a6724 100644 --- a/security/oauth1-client/src/main/java/module-info.java +++ b/security/oauth1-client/src/main/java/module-info.java
@@ -27,5 +27,6 @@ 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 index 523410c..22a59e3 100644 --- a/security/oauth1-server/src/main/java/module-info.java +++ b/security/oauth1-server/src/main/java/module-info.java
@@ -26,12 +26,8 @@ requires org.glassfish.jersey.security.oauth1.signature; exports org.glassfish.jersey.server.oauth1; - exports org.glassfish.jersey.server.oauth1.internal to - org.glassfish.hk2.locator, - org.glassfish.hk2.utilities; + exports org.glassfish.jersey.server.oauth1.internal; opens org.glassfish.jersey.server.oauth1; - opens org.glassfish.jersey.server.oauth1.internal to - org.glassfish.hk2.locator, - org.glassfish.hk2.utilities; + 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 index b717f22..a3232d9 100644 --- a/security/oauth1-signature/src/main/java/module-info.java +++ b/security/oauth1-signature/src/main/java/module-info.java
@@ -25,5 +25,6 @@ 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 index ffe9a62..672264e 100644 --- a/security/oauth2-client/src/main/java/module-info.java +++ b/security/oauth2-client/src/main/java/module-info.java
@@ -24,5 +24,6 @@ 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/providers/external/src/main/java/module-info.java b/test-framework/providers/external/src/main/java/module-info.java index 3a8a463..f175989 100644 --- a/test-framework/providers/external/src/main/java/module-info.java +++ b/test-framework/providers/external/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 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 */ -module org.glassfish.jersey.tests.framework.provider.external { +open module org.glassfish.jersey.tests.framework.provider.external { requires jakarta.ws.rs; requires java.logging; @@ -24,5 +24,4 @@ requires org.glassfish.jersey.tests.framework.core; exports org.glassfish.jersey.test.external; - opens org.glassfish.jersey.test.external; } \ No newline at end of file
diff --git a/test-framework/providers/grizzly2/src/main/java/module-info.java b/test-framework/providers/grizzly2/src/main/java/module-info.java index f5dab7a..4dd0ccc 100644 --- a/test-framework/providers/grizzly2/src/main/java/module-info.java +++ b/test-framework/providers/grizzly2/src/main/java/module-info.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 */ -module org.glassfish.jersey.tests.framework.provider.grizzly { +open module org.glassfish.jersey.tests.framework.provider.grizzly { requires java.logging; requires jakarta.servlet; @@ -31,4 +31,7 @@ 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 index b201975..1d5708e 100644 --- a/test-framework/providers/grizzly2/src/test/java/module-info.java +++ b/test-framework/providers/grizzly2/src/test/java/module-info.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.tests.framework.provider.grizzly { +open module org.glassfish.jersey.tests.framework.provider.grizzly { requires java.logging; requires jakarta.inject; @@ -39,9 +39,6 @@ exports org.glassfish.jersey.test.grizzly.web.context; exports org.glassfish.jersey.test.grizzly.web.ssl; - opens org.glassfish.jersey.test.grizzly.pckg; - opens org.glassfish.jersey.test.grizzly.web; - requires org.junit.jupiter.api; requires org.junit.jupiter.engine; requires org.hamcrest;
diff --git a/test-framework/providers/helidon-http/pom.xml b/test-framework/providers/helidon-http/pom.xml index 72fc69b..aec77c2 100644 --- a/test-framework/providers/helidon-http/pom.xml +++ b/test-framework/providers/helidon-http/pom.xml
@@ -45,4 +45,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 6ce326a..08f85ab 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/incubator/declarative-linking/src/test/java/module-info.txt b/test-framework/providers/inmemory/src/main/java/module-info.java similarity index 65% copy from incubator/declarative-linking/src/test/java/module-info.txt copy to test-framework/providers/inmemory/src/main/java/module-info.java index aee82c7..74e8c8a 100644 --- a/incubator/declarative-linking/src/test/java/module-info.txt +++ b/test-framework/providers/inmemory/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * 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 @@ -14,18 +14,16 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -open module org.glassfish.jersey.incubator.declarative.linking { - requires junit; - +open module org.glassfish.jersey.test.framework.provider.inmemory { + requires jakarta.ws.rs; requires java.logging; - requires java.desktop; - - requires jakarta.xml.bind; - - requires com.fasterxml.jackson.databind; - requires org.glassfish.jersey.core.client; requires org.glassfish.jersey.core.common; requires org.glassfish.jersey.core.server; - requires jsonassert; + 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/incubator/declarative-linking/src/test/java/module-info.txt b/test-framework/providers/inmemory/src/test/java/module-info.java similarity index 65% copy from incubator/declarative-linking/src/test/java/module-info.txt copy to test-framework/providers/inmemory/src/test/java/module-info.java index aee82c7..6842fc7 100644 --- a/incubator/declarative-linking/src/test/java/module-info.txt +++ b/test-framework/providers/inmemory/src/test/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * 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 @@ -14,18 +14,18 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -open module org.glassfish.jersey.incubator.declarative.linking { - requires junit; - +open module org.glassfish.jersey.test.framework.provider.inmemory { requires java.logging; - requires java.desktop; - - requires jakarta.xml.bind; - - requires com.fasterxml.jackson.databind; - + requires jakarta.ws.rs; requires org.glassfish.jersey.core.client; requires org.glassfish.jersey.core.common; requires org.glassfish.jersey.core.server; - requires jsonassert; + 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 4117370..f90829b 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/incubator/declarative-linking/src/test/java/module-info.txt b/test-framework/providers/jdk-http/src/test/java/module-info.java similarity index 63% copy from incubator/declarative-linking/src/test/java/module-info.txt copy to test-framework/providers/jdk-http/src/test/java/module-info.java index aee82c7..4d72955 100644 --- a/incubator/declarative-linking/src/test/java/module-info.txt +++ b/test-framework/providers/jdk-http/src/test/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * 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 @@ -14,18 +14,19 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -open module org.glassfish.jersey.incubator.declarative.linking { - requires junit; - +open module org.glassfish.jersey.test.framework.provider.jdk.http { + requires jakarta.ws.rs; requires java.logging; - requires java.desktop; - - requires jakarta.xml.bind; - - requires com.fasterxml.jackson.databind; - + 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 jsonassert; + 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/src/main/java/module-info.java b/test-framework/providers/jetty-http2/src/main/java/module-info.java index e38362e..b7413ed 100644 --- a/test-framework/providers/jetty-http2/src/main/java/module-info.java +++ b/test-framework/providers/jetty-http2/src/main/java/module-info.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.tests.framework.provider.jetty.http2 { +open module org.glassfish.jersey.tests.framework.provider.jetty.http2 { requires java.logging; requires jakarta.servlet; @@ -28,4 +28,7 @@ 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 index b539bf2..1173ec5 100644 --- a/test-framework/providers/jetty-http2/src/test/java/module-info.java +++ b/test-framework/providers/jetty-http2/src/test/java/module-info.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 */ -module org.glassfish.jersey.tests.framework.provider.jetty.http2 { +open module org.glassfish.jersey.tests.framework.provider.jetty.http2 { requires java.logging; requires jakarta.ws.rs; @@ -31,8 +31,6 @@ exports org.glassfish.jersey.test.jetty.http2; - opens 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/src/main/java/module-info.java b/test-framework/providers/jetty/src/main/java/module-info.java index 693764c..851df2e 100644 --- a/test-framework/providers/jetty/src/main/java/module-info.java +++ b/test-framework/providers/jetty/src/main/java/module-info.java
@@ -27,4 +27,7 @@ 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/test/java/module-info.java b/test-framework/providers/jetty/src/test/java/module-info.java index 43485ec..98a2b47 100644 --- a/test-framework/providers/jetty/src/test/java/module-info.java +++ b/test-framework/providers/jetty/src/test/java/module-info.java
@@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.tests.framework.provider.jetty { +open module org.glassfish.jersey.tests.framework.provider.jetty { requires java.logging; requires jakarta.inject; @@ -32,8 +32,6 @@ exports org.glassfish.jersey.test.jetty; - opens org.glassfish.jersey.test.jetty; - requires org.junit.jupiter.api; requires org.junit.jupiter.engine; requires org.junit.platform.engine;
diff --git a/incubator/gae-integration/src/main/java/module-info.java b/test-framework/providers/netty/src/main/java/module-info.java similarity index 64% copy from incubator/gae-integration/src/main/java/module-info.java copy to test-framework/providers/netty/src/main/java/module-info.java index 761af57..a6d5b26 100644 --- a/incubator/gae-integration/src/main/java/module-info.java +++ b/test-framework/providers/netty/src/main/java/module-info.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,13 +14,12 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.incubator.gae.integration { +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; -// requires com.google.appengine.api; - - requires org.glassfish.jersey.core.common; - requires org.glassfish.jersey.core.server; - - exports org.glassfish.jersey.server.gae; + 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 53f374b..6c8a328 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/incubator/gae-integration/src/main/java/module-info.java b/tests/e2e-entity/src/main/java/module-info.java similarity index 64% copy from incubator/gae-integration/src/main/java/module-info.java copy to tests/e2e-entity/src/main/java/module-info.java index 761af57..529200f 100644 --- a/incubator/gae-integration/src/main/java/module-info.java +++ b/tests/e2e-entity/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved. + * 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 @@ -14,13 +14,5 @@ * 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; +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/cdi2-se/pom.xml b/tests/e2e-inject/cdi2-se/pom.xml index 7c2c813..745b684 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..bbb8949 --- /dev/null +++ b/tests/e2e-inject/cdi2-se/src/main/java/module-info.java
@@ -0,0 +1,39 @@ +/* + * 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.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; +} \ No newline at end of file
diff --git a/incubator/declarative-linking/src/main/java/module-info.txt b/tests/e2e-inject/cdi2-se/src/test/java/module-info.java similarity index 60% copy from incubator/declarative-linking/src/main/java/module-info.txt copy to tests/e2e-inject/cdi2-se/src/test/java/module-info.java index 2835731..ed920e3 100644 --- a/incubator/declarative-linking/src/main/java/module-info.txt +++ b/tests/e2e-inject/cdi2-se/src/test/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. + * 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 @@ -14,22 +14,16 @@ * 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; +open module org.glassfish.jersey.tests.e2e.inject.cdi2.se.test { 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; + requires org.glassfish.jersey.tests.framework.core; + requires org.junit.jupiter.api; + requires org.glassfish.jersey.tests.e2e.inject.cdi2.se.main; - opens org.glassfish.jersey.linking; - exports org.glassfish.jersey.linking; - - exports org.glassfish.jersey.linking.contributing; - exports org.glassfish.jersey.linking.mapping; + 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/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/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/test/RequestContextBuilder.java similarity index 97% rename from tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/RequestContextBuilder.java rename to tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/RequestContextBuilder.java index 42a04a3..9045d73 100644 --- 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/test/RequestContextBuilder.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 java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -36,7 +36,6 @@ 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;
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 526e872..962cc38 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/incubator/gae-integration/src/main/java/module-info.java b/tests/e2e-server/src/main/java/module-info.java similarity index 64% copy from incubator/gae-integration/src/main/java/module-info.java copy to tests/e2e-server/src/main/java/module-info.java index 761af57..951ac09 100644 --- a/incubator/gae-integration/src/main/java/module-info.java +++ b/tests/e2e-server/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved. + * 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 @@ -14,13 +14,5 @@ * 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; +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/pom.xml b/tests/e2e/pom.xml index 2d1b282..c1f25de 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/incubator/gae-integration/src/main/java/module-info.java b/tests/e2e/src/main/java/module-info.java similarity index 64% copy from incubator/gae-integration/src/main/java/module-info.java copy to tests/e2e/src/main/java/module-info.java index 761af57..d70b2cb 100644 --- a/incubator/gae-integration/src/main/java/module-info.java +++ b/tests/e2e/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved. + * 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 @@ -14,13 +14,5 @@ * 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; +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/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/cdi-integration/cdi-inject-weld-test/pom.xml b/tests/integration/cdi-integration/cdi-inject-weld-test/pom.xml index 7a8a675..5fd27a8 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-skipping-analyzer/pom.xml b/tests/integration/cdi-integration/cdi-skipping-analyzer/pom.xml index 6f1f732..6f2810f 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/incubator/gae-integration/src/main/java/module-info.java b/tests/integration/cdi-integration/cdi-skipping-analyzer/src/main/java/module-info.java similarity index 64% copy from incubator/gae-integration/src/main/java/module-info.java copy to tests/integration/cdi-integration/cdi-skipping-analyzer/src/main/java/module-info.java index 761af57..cf27e65 100644 --- a/incubator/gae-integration/src/main/java/module-info.java +++ b/tests/integration/cdi-integration/cdi-skipping-analyzer/src/main/java/module-info.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved. + * 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 @@ -14,13 +14,10 @@ * 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; +module org.glassfish.jersey.tests.integration.cdi.skipping.analyzer { + requires jakarta.cdi; + requires jakarta.inject; -// requires com.google.appengine.api; - - requires org.glassfish.jersey.core.common; - requires org.glassfish.jersey.core.server; - - exports org.glassfish.jersey.server.gae; + 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/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;