Post merge Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
diff --git a/bundles/apidocs/pom.xml b/bundles/apidocs/pom.xml index 58c4485..e2d0f86 100644 --- a/bundles/apidocs/pom.xml +++ b/bundles/apidocs/pom.xml
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - 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 @@ -292,23 +292,32 @@ <fileExclude>org/glassfish/jersey/jetty/*.java</fileExclude> <fileExclude>org/glassfish/jersey/jetty/connector/*.java</fileExclude> <fileExclude>org/glassfish/jersey/wadl/doclet/*.java</fileExclude> + <fileExclude>module-info.java</fileExclude> </sourceFileExcludes> + <source>${java.version}</source> + <disableSourcepathUsage>true</disableSourcepathUsage> <dependencySourceIncludes> <dependencySourceInclude>org.glassfish.jersey.*:*</dependencySourceInclude> </dependencySourceIncludes> <excludePackageNames>*.innate:*.innate.*</excludePackageNames> + <legacyMode>true</legacyMode> + <verbose>false</verbose> + <debug>true</debug> + <detectJavaApiLink>false</detectJavaApiLink> + <detectLinks>false</detectLinks> + <doclint>none</doclint> </configuration> </execution> </executions> </plugin> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>exclude-jar</id> <goals> - <goal>remove-project-artifact</goal> + <goal>purge-local-repository</goal> </goals> </execution> </executions>
diff --git a/connectors/apache5-connector/src/main/java/module-info.java b/connectors/apache5-connector/src/main/java/module-info.java index 33af279..ab997c4 100644 --- a/connectors/apache5-connector/src/main/java/module-info.java +++ b/connectors/apache5-connector/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 @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.apache.connector { +module org.glassfish.jersey.apache5.connector { requires java.logging; requires jakarta.ws.rs;
diff --git a/connectors/apache5-connector/src/test/java/module-info.java b/connectors/apache5-connector/src/test/java/module-info.java index 4545e85..9351a82 100644 --- a/connectors/apache5-connector/src/test/java/module-info.java +++ b/connectors/apache5-connector/src/test/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 @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -module org.glassfish.jersey.apache.connector.test { +module org.glassfish.jersey.apache5.connector.test { requires java.logging; requires jakarta.inject; @@ -26,7 +26,7 @@ requires org.glassfish.jersey.core.client; requires org.glassfish.jersey.core.server; - requires org.glassfish.jersey.apache.connector; + requires org.glassfish.jersey.apache5.connector; requires org.glassfish.jersey.tests.framework.core; requires org.glassfish.jersey.tests.framework.provider.grizzly;
diff --git a/connectors/helidon-connector/pom.xml b/connectors/helidon-connector/pom.xml index 7e1838c..930f8ce 100644 --- a/connectors/helidon-connector/pom.xml +++ b/connectors/helidon-connector/pom.xml
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v. 2.0, which is available at @@ -36,6 +36,7 @@ <java8.sourceDirectory>${project.basedir}/src/main/java8</java8.sourceDirectory> <java17.build.outputDirectory>${project.basedir}/target17</java17.build.outputDirectory> <java17.sourceDirectory>${project.basedir}/src/main/java17</java17.sourceDirectory> + <javadoc.skip>${maven.javadoc.skip}</javadoc.skip> </properties> <dependencies> @@ -80,8 +81,7 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> - <source>8</source> - <detectJavaApiLink>false</detectJavaApiLink> + <skip>${javadoc.skip}</skip> </configuration> </plugin> </plugins> @@ -93,6 +93,9 @@ <activation> <jdk>[1.8,17)</jdk> </activation> + <properties> + <javadoc.skip>true</javadoc.skip> + </properties> <build> <directory>${java8.build.outputDirectory}</directory> <plugins>
diff --git a/connectors/jetty-connector/pom.xml b/connectors/jetty-connector/pom.xml index d8436b5..7f2b377 100644 --- a/connectors/jetty-connector/pom.xml +++ b/connectors/jetty-connector/pom.xml
@@ -1,7 +1,7 @@ <?xml version="1.0"?> <!-- - 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 @@ -45,17 +45,6 @@ <dependencies> <dependency> - <groupId>org.eclipse.jetty</groupId> - <artifactId>jetty-client</artifactId> - <exclusions> - <exclusion> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> <groupId>org.glassfish.jersey.media</groupId> <artifactId>jersey-media-jaxb</artifactId> <version>${project.version}</version> @@ -155,6 +144,18 @@ <properties> <jetty.version>${jetty11.version}</jetty.version> </properties> + <dependencies> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-client</artifactId> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> <build> <directory>${java11.build.outputDirectory}</directory> <plugins> @@ -192,6 +193,18 @@ <activation> <jdk>[17,)</jdk> </activation> + <dependencies> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-client</artifactId> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> <build> <directory>${java17.build.outputDirectory}</directory> <plugins>
diff --git a/connectors/jetty-connector/src/main/java17/module-info.java b/connectors/jetty-connector/src/main/java/module-info.java similarity index 93% rename from connectors/jetty-connector/src/main/java17/module-info.java rename to connectors/jetty-connector/src/main/java/module-info.java index 67f8b4b..41d7d8c 100644 --- a/connectors/jetty-connector/src/main/java17/module-info.java +++ b/connectors/jetty-connector/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
diff --git a/connectors/jetty-http2-connector/pom.xml b/connectors/jetty-http2-connector/pom.xml index c8f5a85..1293426 100644 --- a/connectors/jetty-http2-connector/pom.xml +++ b/connectors/jetty-http2-connector/pom.xml
@@ -1,7 +1,7 @@ <?xml version="1.0"?> <!-- - Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2023, 2025 Oracle and/or its affiliates. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v. 2.0, which is available at @@ -44,6 +44,12 @@ <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-client</artifactId> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.eclipse.jetty</groupId>
diff --git a/containers/grizzly2-servlet/src/main/java/module-info.java b/containers/grizzly2-servlet/src/main/java/module-info.java index 07712cd..229f2ac 100644 --- a/containers/grizzly2-servlet/src/main/java/module-info.java +++ b/containers/grizzly2-servlet/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
diff --git a/core-common/src/main/java/module-info.java b/core-common/src/main/java/module-info.java index 7af8951..91bfb0b 100644 --- a/core-common/src/main/java/module-info.java +++ b/core-common/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 @@ -70,6 +70,7 @@ exports org.glassfish.jersey.innate.io to org.glassfish.jersey.core.server, org.glassfish.jersey.container.servlet.core, + org.glassfish.jersey.apache5.connector, org.glassfish.jersey.apache.connector; exports org.glassfish.jersey.innate.spi to org.glassfish.jersey.media.multipart; exports org.glassfish.jersey.innate.inject.spi to org.glassfish.jersey.inject.hk2;
diff --git a/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.java index c85d1b2..d193046 100644 --- a/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.java +++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.java
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/ext/cdi/jersey-cdi1x-transaction/pom.xml b/ext/cdi/jersey-cdi1x-transaction/pom.xml index 580ff73..eca2aef 100644 --- a/ext/cdi/jersey-cdi1x-transaction/pom.xml +++ b/ext/cdi/jersey-cdi1x-transaction/pom.xml
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - 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 @@ -65,6 +65,16 @@ <dependency> <groupId>jakarta.enterprise</groupId> <artifactId>jakarta.enterprise.cdi-api</artifactId> + <exclusions> + <exclusion> + <groupId>jakarta.annotation</groupId> + <artifactId>jakarta.annotation-api</artifactId> + </exclusion> + <exclusion> + <groupId>jakarta.el</groupId> + <artifactId>jakarta.el-api</artifactId> + </exclusion> + </exclusions> </dependency> <dependency>
diff --git a/incubator/html-json/src/main/java/module-info.java b/incubator/html-json/src/main/java/module-info.txt similarity index 85% rename from incubator/html-json/src/main/java/module-info.java rename to incubator/html-json/src/main/java/module-info.txt index 6a2d033..29656d9 100644 --- a/incubator/html-json/src/main/java/module-info.java +++ b/incubator/html-json/src/main/java/module-info.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 @@ -20,6 +20,9 @@ requires org.glassfish.jersey.core.common; requires org.glassfish.jersey.core.client; + requires org.openide.util.lookup.RELEASE240; + requires net.java.html.json; + requires net.java.html; exports org.glassfish.jersey.media.htmljson; opens org.glassfish.jersey.media.htmljson;
diff --git a/incubator/html-json/src/test/java/module-info.test b/incubator/html-json/src/test/java/module-info.txt similarity index 88% rename from incubator/html-json/src/test/java/module-info.test rename to incubator/html-json/src/test/java/module-info.txt index b722e67..d1e14d0 100644 --- a/incubator/html-json/src/test/java/module-info.test +++ b/incubator/html-json/src/test/java/module-info.txt
@@ -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 @@ -21,8 +21,7 @@ requires net.java.html; requires net.java.html.json; requires ko.ws.tyrus; - requires grizzly.framework; - requires org.openide.util.lookup.RELEASE160; + requires org.openide.util.lookup.RELEASE240; requires org.junit.jupiter.api; requires org.glassfish.jersey.tests.framework.core;
diff --git a/pom.xml b/pom.xml index 557fad5..d040e56 100644 --- a/pom.xml +++ b/pom.xml
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - 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 @@ -579,6 +579,7 @@ <configLocation>etc/config/checkstyle.xml</configLocation> <suppressionsLocation>etc/config/checkstyle-suppressions.xml</suppressionsLocation> <outputFile>${project.build.directory}/checkstyle/checkstyle-result.xml</outputFile> + <excludes>**/module-info.java</excludes> </configuration> <dependencies> <dependency> @@ -2177,7 +2178,7 @@ <install.mvn.plugin.version>3.1.2</install.mvn.plugin.version> <istack.mvn.plugin.version>4.2.0</istack.mvn.plugin.version> <jar.mvn.plugin.version>3.4.2</jar.mvn.plugin.version> - <javadoc.mvn.plugin.version>3.8.0</javadoc.mvn.plugin.version> + <javadoc.mvn.plugin.version>3.11.2</javadoc.mvn.plugin.version> <jxr.mvn.plugin.version>3.4.0</jxr.mvn.plugin.version> <paxexam.mvn.plugin.version>1.2.4</paxexam.mvn.plugin.version> <project.info.reports.mvn.plugin.version>3.6.2</project.info.reports.mvn.plugin.version>
diff --git a/test-framework/providers/jetty11-http2/pom.xml b/test-framework/providers/jetty11-http2/pom.xml deleted file mode 100644 index 9a29a03..0000000 --- a/test-framework/providers/jetty11-http2/pom.xml +++ /dev/null
@@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved. - - This program and the accompanying materials are made available under the - terms of the Eclipse Public License v. 2.0, which is available at - http://www.eclipse.org/legal/epl-2.0. - - This Source Code may also be made available under the following Secondary - Licenses when the conditions for such availability set forth in the - Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - version 2 with the GNU Classpath Exception, which is available at - https://www.gnu.org/software/classpath/license.html. - - SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ---> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <parent> - <artifactId>project</artifactId> - <groupId>org.glassfish.jersey.test-framework.providers</groupId> - <version>3.5.99-SNAPSHOT</version> - </parent> - <modelVersion>4.0.0</modelVersion> - - <artifactId>jersey-test-framework-provider-jetty-http2</artifactId> - <packaging>jar</packaging> - <name>jersey-test-framework-provider-jetty-http2</name> - - <description>Jersey Test Framework - Jetty HTTP2 container</description> - - <dependencies> - <dependency> - <groupId>org.glassfish.jersey.test-framework</groupId> - <artifactId>jersey-test-framework-core</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.glassfish.jersey.containers</groupId> - <artifactId>jersey-container-jetty-http2</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> -</project>
diff --git a/test-framework/providers/jetty11-http2/src/main/java/org/glassfish/jersey/test/jetty11/http2/Jetty11Http2TestContainerFactory.java b/test-framework/providers/jetty11-http2/src/main/java/org/glassfish/jersey/test/jetty11/http2/Jetty11Http2TestContainerFactory.java deleted file mode 100644 index 867db08..0000000 --- a/test-framework/providers/jetty11-http2/src/main/java/org/glassfish/jersey/test/jetty11/http2/Jetty11Http2TestContainerFactory.java +++ /dev/null
@@ -1,126 +0,0 @@ -/* - * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.test.jetty11.http2; - -import java.net.URI; -import java.util.logging.Level; -import java.util.logging.Logger; - -import jakarta.ws.rs.core.UriBuilder; - -import org.glassfish.jersey.client.ClientConfig; -import org.glassfish.jersey.jetty.http2.Jetty11Http2ContainerFactory; -import org.glassfish.jersey.test.DeploymentContext; -import org.glassfish.jersey.test.spi.TestContainer; -import org.glassfish.jersey.test.spi.TestContainerException; -import org.glassfish.jersey.test.spi.TestContainerFactory; -import org.glassfish.jersey.test.spi.TestHelper; - -import org.eclipse.jetty.server.Connector; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.ServerConnector; - -/** - * Factory for testing {@link Jetty11Http2ContainerFactory}. - * - */ -public final class Jetty11Http2TestContainerFactory implements TestContainerFactory { - - private static class JettyHttp2TestContainer implements TestContainer { - - private static final Logger LOGGER = Logger.getLogger(JettyHttp2TestContainer.class.getName()); - - private URI baseUri; - private final Server server; - - private JettyHttp2TestContainer(final URI baseUri, final DeploymentContext context) { - final URI base = UriBuilder.fromUri(baseUri).path(context.getContextPath()).build(); - - if (!"/".equals(base.getRawPath())) { - throw new TestContainerException(String.format( - "Cannot deploy on %s. Jetty HTTP2 container only supports deployment on root path.", - base.getRawPath())); - } - - this.baseUri = base; - - if (LOGGER.isLoggable(Level.INFO)) { - LOGGER.info("Creating JettyHttp2TestContainer configured at the base URI " - + TestHelper.zeroPortToAvailablePort(baseUri)); - } - - this.server = Jetty11Http2ContainerFactory.createHttp2Server(this.baseUri, context.getResourceConfig(), false); - } - - @Override - public ClientConfig getClientConfig() { - return null; - } - - @Override - public URI getBaseUri() { - return baseUri; - } - - @Override - public void start() { - if (server.isStarted()) { - LOGGER.log(Level.WARNING, "Ignoring start request - JettyHttp2TestContainer is already started."); - } else { - LOGGER.log(Level.FINE, "Starting JettyHttp2TestContainer..."); - try { - server.start(); - - if (baseUri.getPort() == 0) { - int port = 0; - for (final Connector connector : server.getConnectors()) { - if (connector instanceof ServerConnector) { - port = ((ServerConnector) connector).getLocalPort(); - break; - } - } - - baseUri = UriBuilder.fromUri(baseUri).port(port).build(); - - LOGGER.log(Level.INFO, "Started JettyHttp2TestContainer at the base URI " + baseUri); - } - } catch (Exception e) { - throw new TestContainerException(e); - } - } - } - - @Override - public void stop() { - if (server.isStarted()) { - LOGGER.log(Level.FINE, "Stopping JettyHttp2TestContainer..."); - try { - this.server.stop(); - } catch (Exception ex) { - LOGGER.log(Level.WARNING, "Error Stopping JettyHttp2TestContainer...", ex); - } - } else { - LOGGER.log(Level.WARNING, "Ignoring stop request - JettyHttp2TestContainer is already stopped."); - } - } - } - - @Override - public TestContainer create(final URI baseUri, final DeploymentContext context) throws IllegalArgumentException { - return new JettyHttp2TestContainer(baseUri, context); - } -}
diff --git a/test-framework/providers/jetty11-http2/src/main/java/org/glassfish/jersey/test/jetty11/http2/package-info.java b/test-framework/providers/jetty11-http2/src/main/java/org/glassfish/jersey/test/jetty11/http2/package-info.java deleted file mode 100644 index 0fdbe9d..0000000 --- a/test-framework/providers/jetty11-http2/src/main/java/org/glassfish/jersey/test/jetty11/http2/package-info.java +++ /dev/null
@@ -1,20 +0,0 @@ -/* - * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/** - * Jersey test framework for Jetty 11 HTTP/2 Container. - */ -package org.glassfish.jersey.test.jetty11.http2;
diff --git a/test-framework/providers/jetty11-http2/src/main/resources/META-INF/services/org.glassfish.jersey.test.spi.TestContainerFactory b/test-framework/providers/jetty11-http2/src/main/resources/META-INF/services/org.glassfish.jersey.test.spi.TestContainerFactory deleted file mode 100644 index 0edcf72..0000000 --- a/test-framework/providers/jetty11-http2/src/main/resources/META-INF/services/org.glassfish.jersey.test.spi.TestContainerFactory +++ /dev/null
@@ -1 +0,0 @@ -org.glassfish.jersey.test.jetty11.http2.Jetty11Http2TestContainerFactory
diff --git a/test-framework/providers/jetty11-http2/src/main/resources/org/glassfish/jersey/test/jetty11/http2/localization.properties b/test-framework/providers/jetty11-http2/src/main/resources/org/glassfish/jersey/test/jetty11/http2/localization.properties deleted file mode 100644 index f10b03c..0000000 --- a/test-framework/providers/jetty11-http2/src/main/resources/org/glassfish/jersey/test/jetty11/http2/localization.properties +++ /dev/null
@@ -1,18 +0,0 @@ -# -# Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v. 2.0, which is available at -# http://www.eclipse.org/legal/epl-2.0. -# -# This Source Code may also be made available under the following Secondary -# Licenses when the conditions for such availability set forth in the -# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, -# version 2 with the GNU Classpath Exception, which is available at -# https://www.gnu.org/software/classpath/license.html. -# -# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 -# - -# {0} - status code; {1} - status reason message -not.supported=Jetty container is not supported on JDK version less than 17.
diff --git a/test-framework/providers/jetty11-http2/src/test/java/org/glassfish/jersey/test/jetty11/http2/AvailablePortJetty11Test.java b/test-framework/providers/jetty11-http2/src/test/java/org/glassfish/jersey/test/jetty11/http2/AvailablePortJetty11Test.java deleted file mode 100644 index ac93ccb..0000000 --- a/test-framework/providers/jetty11-http2/src/test/java/org/glassfish/jersey/test/jetty11/http2/AvailablePortJetty11Test.java +++ /dev/null
@@ -1,66 +0,0 @@ -/* - * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.test.jetty11.http2; - -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; - -import org.glassfish.jersey.server.ResourceConfig; -import org.glassfish.jersey.test.DeploymentContext; -import org.glassfish.jersey.test.JerseyTest; -import org.glassfish.jersey.test.TestProperties; -import org.glassfish.jersey.test.spi.TestContainerFactory; - -import org.junit.jupiter.api.Test; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.not; -import static org.hamcrest.MatcherAssert.assertThat; - -/** - * Tests finding an available port for container. - * - */ -public class AvailablePortJetty11Test extends JerseyTest { - - @Override - protected TestContainerFactory getTestContainerFactory() { - return new Jetty11Http2TestContainerFactory(); - } - - @Path("AvailablePortJettyTest") - public static class TestResource { - @GET - public String get() { - return "GET"; - } - } - - @Override - protected DeploymentContext configureDeployment() { - forceSet(TestProperties.CONTAINER_PORT, "0"); - - return DeploymentContext.builder(new ResourceConfig(TestResource.class)).build(); - } - - @Test - public void testGet() { - assertThat(target().getUri().getPort(), not(0)); - assertThat(getBaseUri().getPort(), not(0)); - - assertThat(target("AvailablePortJettyTest").request().get(String.class), equalTo("GET")); - } -}
diff --git a/test-framework/providers/jetty11-http2/src/test/java/org/glassfish/jersey/test/jetty11/http2/Jetty11ContainerTest.java b/test-framework/providers/jetty11-http2/src/test/java/org/glassfish/jersey/test/jetty11/http2/Jetty11ContainerTest.java deleted file mode 100644 index 0ec4c06..0000000 --- a/test-framework/providers/jetty11-http2/src/test/java/org/glassfish/jersey/test/jetty11/http2/Jetty11ContainerTest.java +++ /dev/null
@@ -1,119 +0,0 @@ -/* - * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package org.glassfish.jersey.test.jetty11.http2; - -import java.net.URI; -import java.util.List; - -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.core.Response; - -import org.glassfish.jersey.inject.hk2.DelayedHk2InjectionManager; -import org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager; -import org.glassfish.jersey.internal.inject.InjectionManager; -import org.glassfish.jersey.jetty.http2.Jetty11Http2ContainerFactory; -import org.glassfish.jersey.jetty.Jetty11HttpContainer; -import org.glassfish.jersey.server.ResourceConfig; -import org.glassfish.jersey.test.JerseyTest; - -import org.glassfish.hk2.api.ServiceLocator; - -import org.jvnet.hk2.internal.ServiceLocatorImpl; - -import org.eclipse.jetty.server.Server; -import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -/** - * Test class for {@link Jetty11HttpContainer}. - * - */ -public class Jetty11ContainerTest extends JerseyTest { - - /** - * Creates new instance. - */ - public Jetty11ContainerTest() { - super(new Jetty11Http2TestContainerFactory()); - } - - @Override - protected ResourceConfig configure() { - return new ResourceConfig(Resource.class); - } - - /** - * Test resource class. - */ - @Path("one") - public static class Resource { - - /** - * Test resource method. - * - * @return Test simple string response. - */ - @GET - public String getSomething() { - return "get"; - } - } - - @Test - /** - * Test {@link Server Jetty Server} container. - */ - public void testJettyContainerTarget() { - final Response response = target().path("one").request().get(); - - assertEquals(200, response.getStatus(), "Response status unexpected."); - assertEquals("get", response.readEntity(String.class), "Response entity unexpected."); - } - - /** - * Test that defined ServiceLocator becomes a parent of the newly created service locator. - */ - @Test - public void testParentServiceLocator() { - final ServiceLocator locator = new ServiceLocatorImpl("MyServiceLocator", null); - final Server server = Jetty11Http2ContainerFactory.createHttp2Server(URI.create("http://localhost:9876"), - new ResourceConfig(Resource.class), false, locator); - final Jetty11HttpContainer container = (Jetty11HttpContainer) server.getHandler(); - final InjectionManager injectionManager = container.getApplicationHandler().getInjectionManager(); - - ServiceLocator serviceLocator; - if (injectionManager instanceof ImmediateHk2InjectionManager) { - serviceLocator = ((ImmediateHk2InjectionManager) injectionManager).getServiceLocator(); - } else if (injectionManager instanceof DelayedHk2InjectionManager) { - serviceLocator = ((DelayedHk2InjectionManager) injectionManager).getServiceLocator(); - } else { - throw new RuntimeException("Invalid Hk2 InjectionManager"); - } - assertTrue(serviceLocator.getParent() == locator, - "Application injection manager was expected to have defined parent locator"); - } - @Test - public void testHttp2Container() { - final ServiceLocator locator = new ServiceLocatorImpl("MyServiceLocator", null); - final Server server = Jetty11Http2ContainerFactory.createHttp2Server(URI.create("http://localhost:9876"), - new ResourceConfig(Resource.class), true, locator); - final List<String> protocols = server.getConnectors()[0].getProtocols(); - assertTrue(protocols.contains("h2") || protocols.contains("h2c")); - } -}
diff --git a/tests/integration/async-jersey-filter/src/test/java/module-info.java b/tests/integration/async-jersey-filter/src/test/java/module-info.java index 55d2d87..f6cc40c 100644 --- a/tests/integration/async-jersey-filter/src/test/java/module-info.java +++ b/tests/integration/async-jersey-filter/src/test/java/module-info.java
@@ -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/tests/integration/client-connector-provider/src/test/java/module-info.java b/tests/integration/client-connector-provider/src/test/java/module-info.java index c306f6a..6981a38 100644 --- a/tests/integration/client-connector-provider/src/test/java/module-info.java +++ b/tests/integration/client-connector-provider/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
diff --git a/tests/integration/jersey-2255/src/test/java/module-info.java b/tests/integration/jersey-2255/src/test/java/module-info.java index 5d4f2fd..57c76c2 100644 --- a/tests/integration/jersey-2255/src/test/java/module-info.java +++ b/tests/integration/jersey-2255/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
diff --git a/tests/integration/jersey-4099/src/test/java/module-info.java b/tests/integration/jersey-4099/src/test/java/module-info.java index 9a2560c..7135e70 100644 --- a/tests/integration/jersey-4099/src/test/java/module-info.java +++ b/tests/integration/jersey-4099/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
diff --git a/tests/integration/jersey-5087/pom.xml b/tests/integration/jersey-5087/pom.xml index 7b51fae..b82f788 100644 --- a/tests/integration/jersey-5087/pom.xml +++ b/tests/integration/jersey-5087/pom.xml
@@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright (c) 2022, 2024 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 @@ -81,6 +81,12 @@ <dependency> <groupId>org.glassfish.jersey.connectors</groupId> <artifactId>jersey-jetty-connector</artifactId> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.glassfish.jersey.connectors</groupId> @@ -330,4 +336,15 @@ <maven.test.skip>true</maven.test.skip> <!-- do not run any tests here, it's useless, dependencies clash is being tested even before compilation. --> </properties> + <profiles> + <profile> + <id>jdk_11_17</id> + <activation> + <jdk>[11,17)</jdk> + </activation> + <properties> + <slf4j.version>2.0.13</slf4j.version> + </properties> + </profile> + </profiles> </project> \ No newline at end of file