[4.0] remove redundant multi-release jar configuration (#5516)
Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
diff --git a/connectors/helidon-connector/pom.xml b/connectors/helidon-connector/pom.xml
index 1e1da90..57556b7 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, 2023 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 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
@@ -32,10 +32,10 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <java8.build.outputDirectory>${project.basedir}/target</java8.build.outputDirectory>
- <java8.sourceDirectory>${project.basedir}/src/main/java8</java8.sourceDirectory>
- <java17.build.outputDirectory>${project.basedir}/target17</java17.build.outputDirectory>
+ <java17.build.outputDirectory>${project.basedir}/target</java17.build.outputDirectory>
<java17.sourceDirectory>${project.basedir}/src/main/java17</java17.sourceDirectory>
+ <java21.build.outputDirectory>${project.basedir}/target21</java21.build.outputDirectory>
+ <java21.sourceDirectory>${project.basedir}/src/main/java21</java21.sourceDirectory>
</properties>
<dependencies>
@@ -91,45 +91,7 @@
<profile>
<id>HelidonExclude</id>
<activation>
- <jdk>[1.8,17)</jdk>
- </activation>
- <build>
- <directory>${java8.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java8.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <testExcludes>
- <testExclude>org/glassfish/jersey/helidon/connector/sse/*.java</testExclude>
- <testExclude>org/glassfish/jersey/helidon/connector/*.java</testExclude>
- </testExcludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>HelidonInclude</id>
- <activation>
- <jdk>[17,)</jdk>
+ <jdk>[17,21)</jdk>
</activation>
<build>
<directory>${java17.build.outputDirectory}</directory>
@@ -151,17 +113,55 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <testExcludes>
+ <testExclude>org/glassfish/jersey/helidon/connector/sse/*.java</testExclude>
+ <testExclude>org/glassfish/jersey/helidon/connector/*.java</testExclude>
+ </testExcludes>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
<profile>
- <id>copyJDK17FilesToMultiReleaseJar</id>
+ <id>HelidonInclude</id>
+ <activation>
+ <jdk>[21,)</jdk>
+ </activation>
+ <build>
+ <directory>${java21.build.outputDirectory}</directory>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${java21.sourceDirectory}</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>copyJDK21FilesToMultiReleaseJar</id>
<activation>
<file>
- <!-- ${java17.build.outputDirectory} does not work here -->
- <exists>target17/classes/org/glassfish/jersey/helidon/connector/HelidonConnectorProvider.class</exists>
+ <!-- ${java21.build.outputDirectory} does not work here -->
+ <exists>target21/classes/org/glassfish/jersey/helidon/connector/HelidonConnectorProvider.class</exists>
</file>
- <jdk>[1.8,17)</jdk>
+ <jdk>[17,21)</jdk>
</activation>
<build>
<plugins>
@@ -182,16 +182,16 @@
<inherited>true</inherited>
<executions>
<execution>
- <id>copy-jdk17-classes</id>
+ <id>copy-jdk21-classes</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
- <outputDirectory>${java8.build.outputDirectory}/classes/META-INF/versions/17</outputDirectory>
+ <outputDirectory>${java17.build.outputDirectory}/classes/META-INF/versions/21</outputDirectory>
<resources>
<resource>
- <directory>${java17.build.outputDirectory}/classes</directory>
+ <directory>${java21.build.outputDirectory}/classes</directory>
</resource>
</resources>
</configuration>
@@ -203,14 +203,14 @@
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
- <id>copy-jdk17-sources</id>
+ <id>copy-jdk21-sources</id>
<phase>package</phase>
<configuration>
<target>
- <property name="sources-jar" value="${java8.build.outputDirectory}/${project.artifactId}-${project.version}-sources.jar"/>
+ <property name="sources-jar" value="${java17.build.outputDirectory}/${project.artifactId}-${project.version}-sources.jar"/>
<echo>sources-jar: ${sources-jar}</echo>
<zip destfile="${sources-jar}" update="true">
- <zipfileset dir="${java17.sourceDirectory}" prefix="META-INF/versions/17"/>
+ <zipfileset dir="${java21.sourceDirectory}" prefix="META-INF/versions/21"/>
</zip>
</target>
</configuration>
diff --git a/connectors/helidon-connector/src/main/java17/org/glassfish/jersey/helidon/connector/HelidonClientProperties.java b/connectors/helidon-connector/src/main/java17/org/glassfish/jersey/helidon/connector/HelidonClientProperties.java
index 93baa42..7ca77a1 100644
--- a/connectors/helidon-connector/src/main/java17/org/glassfish/jersey/helidon/connector/HelidonClientProperties.java
+++ b/connectors/helidon-connector/src/main/java17/org/glassfish/jersey/helidon/connector/HelidonClientProperties.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 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
@@ -15,21 +15,17 @@
*/
package org.glassfish.jersey.helidon.connector;
-import io.helidon.jersey.connector.HelidonProperties;
import org.glassfish.jersey.internal.util.PropertiesClass;
-import io.helidon.config.Config;
-import io.helidon.webclient.WebClient;
-
/**
- * Configuration options specific to the Client API that utilizes {@code HelidonConnectorProvider}.
+ * Configuration options specific to the Client API that utilizes {@code HelidonConnectorProvider}
* @since 2.31
*/
@PropertiesClass
public final class HelidonClientProperties {
/**
- * A Helidon {@link Config} instance that is passed to {@link WebClient.Builder#config(Config)} if available
+ * A Helidon {@code Config} instance that is passed to {@code WebClient.Builder#config(Config)} if available.
*/
- public static final String CONFIG = HelidonProperties.CONFIG;
+ public static final String CONFIG = "jersey.connector.helidon.config";
}
diff --git a/connectors/helidon-connector/src/main/java17/org/glassfish/jersey/helidon/connector/HelidonConnectorProvider.java b/connectors/helidon-connector/src/main/java17/org/glassfish/jersey/helidon/connector/HelidonConnectorProvider.java
index aa1540a..155a54c 100644
--- a/connectors/helidon-connector/src/main/java17/org/glassfish/jersey/helidon/connector/HelidonConnectorProvider.java
+++ b/connectors/helidon-connector/src/main/java17/org/glassfish/jersey/helidon/connector/HelidonConnectorProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,8 +16,8 @@
package org.glassfish.jersey.helidon.connector;
-import org.glassfish.jersey.Beta;
import org.glassfish.jersey.client.spi.Connector;
+import org.glassfish.jersey.client.spi.ConnectorProvider;
import org.glassfish.jersey.internal.util.JdkVersion;
import jakarta.ws.rs.ProcessingException;
@@ -26,51 +26,17 @@
import java.io.OutputStream;
/**
- * Provider for Helidon WebClient {@link Connector} that utilizes the Helidon HTTP Client to send and receive
- * HTTP request and responses. JDK 8 is not supported by the Helidon Connector.
- * <p>
- * The following properties are only supported at construction of this class:
- * <ul>
- * <li>{@link org.glassfish.jersey.client.ClientProperties#CONNECT_TIMEOUT}</li>
- * <li>{@link org.glassfish.jersey.client.ClientProperties#FOLLOW_REDIRECTS}</li>
- * <li>{@link org.glassfish.jersey.client.ClientProperties#PROXY_URI}</li>
- * <li>{@link org.glassfish.jersey.client.ClientProperties#PROXY_USERNAME}</li>
- * <li>{@link org.glassfish.jersey.client.ClientProperties#PROXY_PASSWORD}</li>
- * <li>{@link org.glassfish.jersey.client.ClientProperties#READ_TIMEOUT}</li>
- * <li>{@link HelidonClientProperties#CONFIG}</li>
- * </ul>
- * <p>
- * If a {@link org.glassfish.jersey.client.ClientResponse} is obtained and an
- * entity is not read from the response then
- * {@link org.glassfish.jersey.client.ClientResponse#close()} MUST be called
- * after processing the response to release connection-based resources.
- * </p>
- * <p>
- * Client operations are thread safe, the HTTP connection may
- * be shared between different threads.
- * </p>
- * <p>
- * If a response entity is obtained that is an instance of {@link java.io.Closeable}
- * then the instance MUST be closed after processing the entity to release
- * connection-based resources.
- * </p>
- * <p>
- * This connector uses {@link org.glassfish.jersey.client.ClientProperties#OUTBOUND_CONTENT_LENGTH_BUFFER} to buffer the entity
- * written for instance by {@link jakarta.ws.rs.core.StreamingOutput}. Should the buffer be small and
- * {@link jakarta.ws.rs.core.StreamingOutput#write(OutputStream)} be called many times, the performance can drop. The Content-Length
- * or the Content_Encoding header is set by the underlaying Helidon WebClient regardless of the
- * {@link org.glassfish.jersey.client.ClientProperties#OUTBOUND_CONTENT_LENGTH_BUFFER} size, however.
- * </p>
+ * Helidon Connector stub which only throws exception when running on JDK prior to 21.
+ * New Helidon 3 does not support JDKs prior to 21.
*
- * @since 2.31
+ * @since 3.0.5
*/
-@Beta
-public class HelidonConnectorProvider extends io.helidon.jersey.connector.HelidonConnectorProvider {
+public class HelidonConnectorProvider implements ConnectorProvider {
@Override
public Connector getConnector(Client client, Configuration runtimeConfig) {
- if (JdkVersion.getJdkVersion().getMajor() < 17) {
+ if (JdkVersion.getJdkVersion().getMajor() < 21) {
throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
}
- return super.getConnector(client, runtimeConfig);
+ return null;
}
}
diff --git a/connectors/helidon-connector/src/main/java8/org/glassfish/jersey/helidon/connector/HelidonClientProperties.java b/connectors/helidon-connector/src/main/java21/org/glassfish/jersey/helidon/connector/HelidonClientProperties.java
similarity index 73%
rename from connectors/helidon-connector/src/main/java8/org/glassfish/jersey/helidon/connector/HelidonClientProperties.java
rename to connectors/helidon-connector/src/main/java21/org/glassfish/jersey/helidon/connector/HelidonClientProperties.java
index d1e8ee1..5f47b6b 100644
--- a/connectors/helidon-connector/src/main/java8/org/glassfish/jersey/helidon/connector/HelidonClientProperties.java
+++ b/connectors/helidon-connector/src/main/java21/org/glassfish/jersey/helidon/connector/HelidonClientProperties.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 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
@@ -15,17 +15,18 @@
*/
package org.glassfish.jersey.helidon.connector;
+import io.helidon.jersey.connector.HelidonProperties;
import org.glassfish.jersey.internal.util.PropertiesClass;
/**
- * Configuration options specific to the Client API that utilizes {@code HelidonConnectorProvider}
+ * Configuration options specific to the Client API that utilizes {@code HelidonConnectorProvider}.
* @since 2.31
*/
@PropertiesClass
public final class HelidonClientProperties {
/**
- * A Helidon {@code Config} instance that is passed to {@code WebClient.Builder#config(Config)} if available.
+ * A Helidon {@link Config} instance that is passed to {@link WebClient.Builder#config(Config)} if available
*/
- public static final String CONFIG = "jersey.connector.helidon.config";
+ public static final String CONFIG = HelidonProperties.CONFIG;
}
diff --git a/connectors/helidon-connector/src/main/java21/org/glassfish/jersey/helidon/connector/HelidonConnectorProvider.java b/connectors/helidon-connector/src/main/java21/org/glassfish/jersey/helidon/connector/HelidonConnectorProvider.java
new file mode 100644
index 0000000..a7fca97
--- /dev/null
+++ b/connectors/helidon-connector/src/main/java21/org/glassfish/jersey/helidon/connector/HelidonConnectorProvider.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2020, 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
+ */
+
+package org.glassfish.jersey.helidon.connector;
+
+import org.glassfish.jersey.Beta;
+import org.glassfish.jersey.client.spi.Connector;
+import org.glassfish.jersey.internal.util.JdkVersion;
+
+import jakarta.ws.rs.ProcessingException;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.core.Configuration;
+import java.io.OutputStream;
+
+/**
+ * Provider for Helidon WebClient {@link Connector} that utilizes the Helidon HTTP Client to send and receive
+ * HTTP request and responses. JDK 8 is not supported by the Helidon Connector.
+ * <p>
+ * The following properties are only supported at construction of this class:
+ * <ul>
+ * <li>{@link org.glassfish.jersey.client.ClientProperties#CONNECT_TIMEOUT}</li>
+ * <li>{@link org.glassfish.jersey.client.ClientProperties#FOLLOW_REDIRECTS}</li>
+ * <li>{@link org.glassfish.jersey.client.ClientProperties#PROXY_URI}</li>
+ * <li>{@link org.glassfish.jersey.client.ClientProperties#PROXY_USERNAME}</li>
+ * <li>{@link org.glassfish.jersey.client.ClientProperties#PROXY_PASSWORD}</li>
+ * <li>{@link org.glassfish.jersey.client.ClientProperties#READ_TIMEOUT}</li>
+ * <li>{@link HelidonClientProperties#CONFIG}</li>
+ * </ul>
+ * <p>
+ * If a {@link org.glassfish.jersey.client.ClientResponse} is obtained and an
+ * entity is not read from the response then
+ * {@link org.glassfish.jersey.client.ClientResponse#close()} MUST be called
+ * after processing the response to release connection-based resources.
+ * </p>
+ * <p>
+ * Client operations are thread safe, the HTTP connection may
+ * be shared between different threads.
+ * </p>
+ * <p>
+ * If a response entity is obtained that is an instance of {@link java.io.Closeable}
+ * then the instance MUST be closed after processing the entity to release
+ * connection-based resources.
+ * </p>
+ * <p>
+ * This connector uses {@link org.glassfish.jersey.client.ClientProperties#OUTBOUND_CONTENT_LENGTH_BUFFER} to buffer the entity
+ * written for instance by {@link jakarta.ws.rs.core.StreamingOutput}. Should the buffer be small and
+ * {@link jakarta.ws.rs.core.StreamingOutput#write(OutputStream)} be called many times, the performance can drop. The Content-Length
+ * or the Content_Encoding header is set by the underlaying Helidon WebClient regardless of the
+ * {@link org.glassfish.jersey.client.ClientProperties#OUTBOUND_CONTENT_LENGTH_BUFFER} size, however.
+ * </p>
+ *
+ * @since 2.31
+ */
+@Beta
+public class HelidonConnectorProvider extends io.helidon.jersey.connector.HelidonConnectorProvider {
+ @Override
+ public Connector getConnector(Client client, Configuration runtimeConfig) {
+ if (JdkVersion.getJdkVersion().getMajor() < 21) {
+ throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
+ }
+ return super.getConnector(client, runtimeConfig);
+ }
+}
diff --git a/connectors/helidon-connector/src/main/java8/org/glassfish/jersey/helidon/connector/HelidonConnectorProvider.java b/connectors/helidon-connector/src/main/java8/org/glassfish/jersey/helidon/connector/HelidonConnectorProvider.java
deleted file mode 100644
index 932155a..0000000
--- a/connectors/helidon-connector/src/main/java8/org/glassfish/jersey/helidon/connector/HelidonConnectorProvider.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package org.glassfish.jersey.helidon.connector;
-
-import org.glassfish.jersey.client.spi.Connector;
-import org.glassfish.jersey.client.spi.ConnectorProvider;
-import org.glassfish.jersey.internal.util.JdkVersion;
-
-import jakarta.ws.rs.ProcessingException;
-import jakarta.ws.rs.client.Client;
-import jakarta.ws.rs.core.Configuration;
-import java.io.OutputStream;
-
-/**
- * Helidon Connector stub which only throws exception when running on JDK prior to 17.
- * New Helidon 3 does not support JDKs prior to 17.
- *
- * @since 3.0.5
- */
-public class HelidonConnectorProvider implements ConnectorProvider {
- @Override
- public Connector getConnector(Client client, Configuration runtimeConfig) {
- if (JdkVersion.getJdkVersion().getMajor() < 17) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
- return null;
- }
-}
diff --git a/connectors/helidon-connector/src/main/resources/org/glassfish/jersey/helidon/connector/localization.properties b/connectors/helidon-connector/src/main/resources/org/glassfish/jersey/helidon/connector/localization.properties
index fb56d5c..4cb36b6 100644
--- a/connectors/helidon-connector/src/main/resources/org/glassfish/jersey/helidon/connector/localization.properties
+++ b/connectors/helidon-connector/src/main/resources/org/glassfish/jersey/helidon/connector/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, 2022 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
@@ -14,4 +14,4 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
-not.supported=Helidon connector is not supported on JDK version less than 17.
\ No newline at end of file
+not.supported=Helidon connector is not supported on JDK version less than 21.
\ No newline at end of file
diff --git a/connectors/jetty-connector/pom.xml b/connectors/jetty-connector/pom.xml
index fd75f85..f6209e9 100644
--- a/connectors/jetty-connector/pom.xml
+++ b/connectors/jetty-connector/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2011, 2023 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
@@ -34,10 +34,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <java11.build.outputDirectory>${project.basedir}/target</java11.build.outputDirectory>
- <java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory>
- <java17.build.outputDirectory>${project.basedir}/target17</java17.build.outputDirectory>
- <java17.sourceDirectory>${project.basedir}/src/main/java17</java17.sourceDirectory>
</properties>
<dependencies>
@@ -119,144 +115,4 @@
</plugin>
</plugins>
</build>
-
- <profiles>
- <profile>
- <id>JettyExclude</id>
- <activation>
- <jdk>[11,17)</jdk>
- </activation>
- <properties>
- <jetty.version>${jetty11.version}</jetty.version>
- </properties>
- <build>
- <directory>${java11.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java11.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <testExcludes>
- <testExclude>org/glassfish/jersey/jetty/connector/*.java</testExclude>
- </testExcludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>JettyInclude</id>
- <activation>
- <jdk>[17,)</jdk>
- </activation>
- <build>
- <directory>${java17.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java17.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>copyJDK17FilesToMultiReleaseJar</id>
- <activation>
- <file>
- <!-- ${java17.build.outputDirectory} does not work here -->
- <exists>target17/classes/org/glassfish/jersey/jetty/connector/JettyConnector.class</exists>
- </file>
- <jdk>[11,17)</jdk>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <inherited>true</inherited>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Multi-Release>true</Multi-Release>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>copy-jdk17-classes</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${java11.build.outputDirectory}/classes/META-INF/versions/17</outputDirectory>
- <resources>
- <resource>
- <directory>${java17.build.outputDirectory}/classes</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-jdk17-sources</id>
- <phase>package</phase>
- <configuration>
- <target>
- <property name="sources-jar" value="${java11.build.outputDirectory}/${project.artifactId}-${project.version}-sources.jar"/>
- <echo>sources-jar: ${sources-jar}</echo>
- <zip destfile="${sources-jar}" update="true">
- <zipfileset dir="${java17.sourceDirectory}" prefix="META-INF/versions/17"/>
- </zip>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
+</project>
\ No newline at end of file
diff --git a/connectors/jetty-connector/src/main/java17/org/glassfish/jersey/jetty/connector/JettyConnector.java b/connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyConnector.java
similarity index 99%
rename from connectors/jetty-connector/src/main/java17/org/glassfish/jersey/jetty/connector/JettyConnector.java
rename to connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyConnector.java
index aa8f0e6..47d5ced 100644
--- a/connectors/jetty-connector/src/main/java17/org/glassfish/jersey/jetty/connector/JettyConnector.java
+++ b/connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyConnector.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/connectors/jetty-connector/src/main/java17/org/glassfish/jersey/jetty/connector/JettyConnectorProvider.java b/connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyConnectorProvider.java
similarity index 98%
rename from connectors/jetty-connector/src/main/java17/org/glassfish/jersey/jetty/connector/JettyConnectorProvider.java
rename to connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyConnectorProvider.java
index 43a08ce..5a3315d 100644
--- a/connectors/jetty-connector/src/main/java17/org/glassfish/jersey/jetty/connector/JettyConnectorProvider.java
+++ b/connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyConnectorProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyHttpClientContract.java b/connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyHttpClientContract.java
similarity index 94%
rename from connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyHttpClientContract.java
rename to connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyHttpClientContract.java
index 6453521..9b20a64 100644
--- a/connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyHttpClientContract.java
+++ b/connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyHttpClientContract.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyHttpClientSupplier.java b/connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyHttpClientSupplier.java
similarity index 96%
rename from connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyHttpClientSupplier.java
rename to connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyHttpClientSupplier.java
index 2b9e8b2..9cccf45 100644
--- a/connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyHttpClientSupplier.java
+++ b/connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyHttpClientSupplier.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyConnectorProvider.java b/connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyConnectorProvider.java
deleted file mode 100644
index 50ec6bd..0000000
--- a/connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyConnectorProvider.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * 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.jetty.connector;
-
-import jakarta.ws.rs.ProcessingException;
-import jakarta.ws.rs.client.Client;
-import jakarta.ws.rs.core.Configuration;
-import org.glassfish.jersey.client.spi.Connector;
-import org.glassfish.jersey.client.spi.ConnectorProvider;
-
-/**
- * A {@link ConnectorProvider} for Jersey {@link Connector connector}
- * instances that utilize the Jetty HTTP Client to send and receive
- * HTTP request and responses.
- * <p>
- * The following connector configuration properties are supported:
- * <ul>
- * <li>{@link org.glassfish.jersey.client.ClientProperties#ASYNC_THREADPOOL_SIZE}</li>
- * <li>{@link org.glassfish.jersey.client.ClientProperties#CONNECT_TIMEOUT}</li>
- * <li>{@link org.glassfish.jersey.client.ClientProperties#FOLLOW_REDIRECTS}</li>
- * <li>{@link org.glassfish.jersey.client.ClientProperties#PROXY_URI}</li>
- * <li>{@link org.glassfish.jersey.client.ClientProperties#PROXY_USERNAME}</li>
- * <li>{@link org.glassfish.jersey.client.ClientProperties#PROXY_PASSWORD}</li>
- * <li>{@link org.glassfish.jersey.client.ClientProperties#PROXY_PASSWORD}</li>
- * <li>{@link JettyClientProperties#DISABLE_COOKIES}</li>*
- * <li>{@link JettyClientProperties#ENABLE_SSL_HOSTNAME_VERIFICATION}</li>
- * <li>{@link JettyClientProperties#PREEMPTIVE_BASIC_AUTHENTICATION}</li>
- * <li>{@link JettyClientProperties#SYNC_LISTENER_RESPONSE_MAX_SIZE}</li>
- * </ul>
- * </p>
- * <p>
- * This transport supports both synchronous and asynchronous processing of client requests.
- * The following methods are supported: GET, POST, PUT, DELETE, HEAD, OPTIONS, TRACE, CONNECT and MOVE.
- * </p>
- * <p>
- * Typical usage:
- * </p>
- * <pre>
- * {@code
- * ClientConfig config = new ClientConfig();
- * config.connectorProvider(new JettyConnectorProvider());
- * Client client = ClientBuilder.newClient(config);
- *
- * // async request
- * WebTarget target = client.target("http://localhost:8080");
- * Future<Response> future = target.path("resource").request().async().get();
- *
- * // wait for 3 seconds
- * Response response = future.get(3, TimeUnit.SECONDS);
- * String entity = response.readEntity(String.class);
- * client.close();
- * }
- * </pre>
- * <p>
- * Connector instances created via Jetty HTTP Client-based connector provider support only
- * {@link org.glassfish.jersey.client.RequestEntityProcessing#BUFFERED entity buffering}.
- * Defining the property {@link org.glassfish.jersey.client.ClientProperties#REQUEST_ENTITY_PROCESSING} has no
- * effect on Jetty HTTP Client-based connectors.
- * </p>
- *
- * @author Arul Dhesiaseelan (aruld at acm.org)
- * @author Marek Potociar
- * @since 2.5
- */
-public class JettyConnectorProvider implements ConnectorProvider {
-
- @Override
- public Connector getConnector(Client client, Configuration runtimeConfig) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-}
diff --git a/connectors/jetty-connector/src/main/java17/org/glassfish/jersey/jetty/connector/JettyHttpClientContract.java b/connectors/jetty-connector/src/main/java17/org/glassfish/jersey/jetty/connector/JettyHttpClientContract.java
deleted file mode 100644
index 6453521..0000000
--- a/connectors/jetty-connector/src/main/java17/org/glassfish/jersey/jetty/connector/JettyHttpClientContract.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2021, 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.jetty.connector;
-
-import org.eclipse.jetty.client.HttpClient;
-import org.glassfish.jersey.spi.Contract;
-
-/**
- * A contract that allows for an optional registration of user predefined Jetty {@code HttpClient}
- * that is consequently used by {@link JettyConnector}
- */
-@Contract
-public interface JettyHttpClientContract {
- /**
- * Supply a user predefined HttpClient
- * @return a user predefined HttpClient
- */
- HttpClient getHttpClient();
-}
diff --git a/connectors/jetty-connector/src/main/java17/org/glassfish/jersey/jetty/connector/JettyHttpClientSupplier.java b/connectors/jetty-connector/src/main/java17/org/glassfish/jersey/jetty/connector/JettyHttpClientSupplier.java
deleted file mode 100644
index 2b9e8b2..0000000
--- a/connectors/jetty-connector/src/main/java17/org/glassfish/jersey/jetty/connector/JettyHttpClientSupplier.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2019, 2023 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * 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.jetty.connector;
-
-import org.eclipse.jetty.client.HttpClient;
-
-/**
- * Jetty HttpClient supplier to be registered into Jersey configuration to be used by {@link JettyConnector}.
- * Not every possible configuration option is covered by the Jetty Connector and this supplier offers a way to provide
- * an HttpClient that has configured the options not covered by the Jetty Connector.
- * <p>
- * Typical usage:
- * </p>
- * <pre>
- * {@code
- * HttpClient httpClient = ...
- *
- * ClientConfig config = new ClientConfig();
- * config.connectorProvider(new JettyConnectorProvider());
- * config.register(new JettyHttpClientSupplier(httpClient));
- * Client client = ClientBuilder.newClient(config);
- * }
- * </pre>
- * <p>
- * The {@code HttpClient} is configured as if it was created by {@link JettyConnector} the usual way.
- * </p>
- */
-public class JettyHttpClientSupplier implements JettyHttpClientContract {
- private final HttpClient httpClient;
-
- /**
- * {@code HttpClient} supplier to be optionally registered to a {@link org.glassfish.jersey.client.ClientConfig}
- * @param httpClient a HttpClient to be supplied when {@link JettyConnector#getHttpClient()} is called.
- */
- public JettyHttpClientSupplier(HttpClient httpClient) {
- this.httpClient = httpClient;
- }
-
- @Override
- public HttpClient getHttpClient() {
- return httpClient;
- }
-}
diff --git a/connectors/jetty-connector/src/main/resources/org/glassfish/jersey/jetty/connector/localization.properties b/connectors/jetty-connector/src/main/resources/org/glassfish/jersey/jetty/connector/localization.properties
index 6561153..9e27153 100644
--- a/connectors/jetty-connector/src/main/resources/org/glassfish/jersey/jetty/connector/localization.properties
+++ b/connectors/jetty-connector/src/main/resources/org/glassfish/jersey/jetty/connector/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
@@ -17,5 +17,4 @@
# {0} - HTTP method, e.g. GET, DELETE
method.not.supported=Method {0} not supported.
invalid.configurable.component.type=The supplied component "{0}" is not assignable from JerseyClient or JerseyWebTarget.
-expected.connector.provider.not.used=The supplied component is not configured to use a JettyConnectorProvider.
-not.supported=Jetty connector is not supported on JDK version less than 17.
+expected.connector.provider.not.used=The supplied component is not configured to use a JettyConnectorProvider.
\ No newline at end of file
diff --git a/connectors/jetty-http2-connector/pom.xml b/connectors/jetty-http2-connector/pom.xml
index 805401e..1dee0e7 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 Oracle and/or its affiliates. All rights reserved.
+ 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
@@ -34,10 +34,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <java11.build.outputDirectory>${project.basedir}/target</java11.build.outputDirectory>
- <java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory>
- <java17.build.outputDirectory>${project.basedir}/target17</java17.build.outputDirectory>
- <java17.sourceDirectory>${project.basedir}/src/main/java17</java17.sourceDirectory>
</properties>
<dependencies>
@@ -55,7 +51,26 @@
<artifactId>jersey-jetty-connector</artifactId>
<version>${project.version}</version>
</dependency>
-
+ <dependency>
+ <groupId>org.eclipse.jetty.http2</groupId>
+ <artifactId>jetty-http2-client</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.http2</groupId>
+ <artifactId>jetty-http2-client-transport</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.containers</groupId>
+ <artifactId>jersey-container-jetty-http2</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-jetty-http2</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-jaxb</artifactId>
@@ -107,167 +122,4 @@
</plugin>
</plugins>
</build>
-
- <profiles>
- <profile>
- <id>JettyExclude</id>
- <activation>
- <jdk>[11,17)</jdk>
- </activation>
- <properties>
- <jetty.version>${jetty11.version}</jetty.version>
- </properties>
- <build>
- <directory>${java11.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java11.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <testExcludes>
- <testExclude>org/glassfish/jersey/jetty/http2/connector/*.java</testExclude>
- </testExcludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>JettyInclude</id>
- <activation>
- <jdk>[17,)</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.jetty.http2</groupId>
- <artifactId>jetty-http2-client</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty.http2</groupId>
- <artifactId>jetty-http2-client-transport</artifactId>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.containers</groupId>
- <artifactId>jersey-container-jetty-http2</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.test-framework.providers</groupId>
- <artifactId>jersey-test-framework-provider-jetty-http2</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <directory>${java17.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java17.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>copyJDK17FilesToMultiReleaseJar</id>
- <activation>
- <file>
- <!-- ${java17.build.outputDirectory} does not work here -->
- <exists>target17/classes/org/glassfish/jersey/jetty/http2/connector/JettyHttp2Connector.class</exists>
- </file>
- <jdk>[11,17)</jdk>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <inherited>true</inherited>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Multi-Release>true</Multi-Release>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>copy-jdk17-classes</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${java11.build.outputDirectory}/classes/META-INF/versions/17</outputDirectory>
- <resources>
- <resource>
- <directory>${java17.build.outputDirectory}/classes</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-jdk17-sources</id>
- <phase>package</phase>
- <configuration>
- <target>
- <property name="sources-jar" value="${java11.build.outputDirectory}/${project.artifactId}-${project.version}-sources.jar"/>
- <echo>sources-jar: ${sources-jar}</echo>
- <zip destfile="${sources-jar}" update="true">
- <zipfileset dir="${java17.sourceDirectory}" prefix="META-INF/versions/17"/>
- </zip>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
</project>
\ No newline at end of file
diff --git a/connectors/jetty-http2-connector/src/main/java17/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ClientSupplier.java b/connectors/jetty-http2-connector/src/main/java/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ClientSupplier.java
similarity index 96%
rename from connectors/jetty-http2-connector/src/main/java17/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ClientSupplier.java
rename to connectors/jetty-http2-connector/src/main/java/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ClientSupplier.java
index 36556e0..04c3c76 100644
--- a/connectors/jetty-http2-connector/src/main/java17/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ClientSupplier.java
+++ b/connectors/jetty-http2-connector/src/main/java/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ClientSupplier.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
+ * 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
diff --git a/connectors/jetty-http2-connector/src/main/java17/org/glassfish/jersey/jetty/http2/connector/JettyHttp2Connector.java b/connectors/jetty-http2-connector/src/main/java/org/glassfish/jersey/jetty/http2/connector/JettyHttp2Connector.java
similarity index 97%
rename from connectors/jetty-http2-connector/src/main/java17/org/glassfish/jersey/jetty/http2/connector/JettyHttp2Connector.java
rename to connectors/jetty-http2-connector/src/main/java/org/glassfish/jersey/jetty/http2/connector/JettyHttp2Connector.java
index a602b0d..75acaba 100644
--- a/connectors/jetty-http2-connector/src/main/java17/org/glassfish/jersey/jetty/http2/connector/JettyHttp2Connector.java
+++ b/connectors/jetty-http2-connector/src/main/java/org/glassfish/jersey/jetty/http2/connector/JettyHttp2Connector.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
+ * 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
diff --git a/connectors/jetty-http2-connector/src/main/java17/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ConnectorProvider.java b/connectors/jetty-http2-connector/src/main/java/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ConnectorProvider.java
similarity index 96%
rename from connectors/jetty-http2-connector/src/main/java17/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ConnectorProvider.java
rename to connectors/jetty-http2-connector/src/main/java/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ConnectorProvider.java
index 02eaf5a..a14801f 100644
--- a/connectors/jetty-http2-connector/src/main/java17/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ConnectorProvider.java
+++ b/connectors/jetty-http2-connector/src/main/java/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ConnectorProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
+ * 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
diff --git a/connectors/jetty-http2-connector/src/main/java11/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ClientSupplier.java b/connectors/jetty-http2-connector/src/main/java11/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ClientSupplier.java
deleted file mode 100644
index 7d203cc..0000000
--- a/connectors/jetty-http2-connector/src/main/java11/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ClientSupplier.java
+++ /dev/null
@@ -1,60 +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.jetty.http2.connector;
-
-import jakarta.ws.rs.ProcessingException;
-import org.eclipse.jetty.client.HttpClient;
-import org.glassfish.jersey.internal.util.JdkVersion;
-import org.glassfish.jersey.jetty.connector.JettyHttpClientContract;
-import org.glassfish.jersey.jetty.connector.JettyHttpClientSupplier;
-import org.glassfish.jersey.jetty.connector.LocalizationMessages;
-
-/**
- * HTTP/2 enabled version of the {@link JettyHttpClientSupplier}
- *
- * @since 2.41
- */
-public class JettyHttp2ClientSupplier implements JettyHttpClientContract {
- private final HttpClient http2Client;
-
- /**
- * default Http2Client created for the supplier.
- */
- public JettyHttp2ClientSupplier() {
- this(createHttp2Client());
- }
- /**
- * supplier for the {@code HttpClient} with {@code HttpClientTransportOverHTTP2} to be optionally registered
- * to a {@link org.glassfish.jersey.client.ClientConfig}
- * @param http2Client seed doc for JDK 11+.
- */
- public JettyHttp2ClientSupplier(HttpClient http2Client) {
- this.http2Client = http2Client;
- }
-
- private static final HttpClient createHttp2Client() {
- if (JdkVersion.getJdkVersion().getMajor() < 17) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
- return null; // does not work at JDK lower than 17
- }
-
- @Override
- public HttpClient getHttpClient() {
- return http2Client;
- }
-}
\ No newline at end of file
diff --git a/connectors/jetty-http2-connector/src/main/java11/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ConnectorProvider.java b/connectors/jetty-http2-connector/src/main/java11/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ConnectorProvider.java
deleted file mode 100644
index 301879c..0000000
--- a/connectors/jetty-http2-connector/src/main/java11/org/glassfish/jersey/jetty/http2/connector/JettyHttp2ConnectorProvider.java
+++ /dev/null
@@ -1,40 +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.jetty.http2.connector;
-
-import jakarta.ws.rs.ProcessingException;
-import jakarta.ws.rs.client.Client;
-import jakarta.ws.rs.core.Configuration;
-import org.glassfish.jersey.client.spi.Connector;
-import org.glassfish.jersey.internal.util.JdkVersion;
-import org.glassfish.jersey.jetty.connector.JettyConnectorProvider;
-import org.glassfish.jersey.jetty.connector.LocalizationMessages;
-
-/**
- * Provides HTTP2 enabled version of the {@link JettyConnectorProvider} for a client
- *
- * @since 2.41
- */
-public class JettyHttp2ConnectorProvider extends JettyConnectorProvider {
- @Override
- public Connector getConnector(Client client, Configuration runtimeConfig) {
- if (JdkVersion.getJdkVersion().getMajor() < 17) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
- return null; // does not work at JDK lower than 17
- }
-}
\ No newline at end of file
diff --git a/connectors/jetty-http2-connector/src/main/resources/org/glassfish/jersey/jetty/http2/connector/localization.properties b/connectors/jetty-http2-connector/src/main/resources/org/glassfish/jersey/jetty/http2/connector/localization.properties
index 5fc8425..d583ea0 100644
--- a/connectors/jetty-http2-connector/src/main/resources/org/glassfish/jersey/jetty/http2/connector/localization.properties
+++ b/connectors/jetty-http2-connector/src/main/resources/org/glassfish/jersey/jetty/http2/connector/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
+# 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
@@ -17,5 +17,4 @@
# {0} - HTTP method, e.g. GET, DELETE
method.not.supported=Method {0} not supported.
invalid.configurable.component.type=The supplied component "{0}" is not assignable from JerseyClient or JerseyWebTarget.
-expected.connector.provider.not.used=The supplied component is not configured to use a JettyConnectorProvider.
-not.supported=Jetty connector is not supported on JDK version less than 17.
+expected.connector.provider.not.used=The supplied component is not configured to use a JettyConnectorProvider.
\ No newline at end of file
diff --git a/connectors/jetty11-http2-connector/pom.xml b/connectors/jetty11-http2-connector/pom.xml
index c3633ed..dc607a3 100644
--- a/connectors/jetty11-http2-connector/pom.xml
+++ b/connectors/jetty11-http2-connector/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
+ 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
@@ -34,10 +34,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <java8.build.outputDirectory>${project.basedir}/target</java8.build.outputDirectory>
- <java8.sourceDirectory>${project.basedir}/src/main/java8</java8.sourceDirectory>
- <java11.build.outputDirectory>${project.basedir}/target11</java11.build.outputDirectory>
- <java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory>
</properties>
<dependencyManagement>
diff --git a/containers/jetty-http/pom.xml b/containers/jetty-http/pom.xml
index 4eb54ff..92f518c 100644
--- a/containers/jetty-http/pom.xml
+++ b/containers/jetty-http/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -32,13 +32,6 @@
<description>Jetty Http Container</description>
- <properties>
- <java11.build.outputDirectory>${project.basedir}/target</java11.build.outputDirectory>
- <java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory>
- <java17.build.outputDirectory>${project.basedir}/target17</java17.build.outputDirectory>
- <java17.sourceDirectory>${project.basedir}/src/main/java17</java17.sourceDirectory>
- </properties>
-
<dependencies>
<dependency>
<groupId>jakarta.inject</groupId>
@@ -125,144 +118,4 @@
</resources>
</build>
- <profiles>
- <profile>
- <id>JettyExclude</id>
- <activation>
- <jdk>[11,17)</jdk>
- </activation>
- <properties>
- <jetty.version>${jetty11.version}</jetty.version>
- </properties>
- <build>
- <directory>${java11.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java11.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <testExcludes>
- <testExclude>org/glassfish/jersey/jetty/*.java</testExclude>
- </testExcludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>JettyInclude</id>
- <activation>
- <jdk>[17,)</jdk>
- </activation>
- <build>
- <directory>${java17.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java17.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>copyJDK17FilesToMultiReleaseJar</id>
- <activation>
- <file>
- <!-- ${java17.build.outputDirectory} does not work here -->
- <exists>target17/classes/org/glassfish/jersey/jetty/JettyHttpContainer.class</exists>
- </file>
- <jdk>[11,17)</jdk>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <inherited>true</inherited>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Multi-Release>true</Multi-Release>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>copy-jdk17-classes</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${java11.build.outputDirectory}/classes/META-INF/versions/17</outputDirectory>
- <resources>
- <resource>
- <directory>${java17.build.outputDirectory}/classes</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-jdk17-sources</id>
- <phase>package</phase>
- <configuration>
- <target>
- <property name="sources-jar" value="${java11.build.outputDirectory}/${project.artifactId}-${project.version}-sources.jar"/>
- <echo>sources-jar: ${sources-jar}</echo>
- <zip destfile="${sources-jar}" update="true">
- <zipfileset dir="${java17.sourceDirectory}" prefix="META-INF/versions/17"/>
- </zip>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
+</project>
\ No newline at end of file
diff --git a/containers/jetty-http/src/main/java17/org/glassfish/jersey/jetty/JettyHttpContainer.java b/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpContainer.java
similarity index 99%
rename from containers/jetty-http/src/main/java17/org/glassfish/jersey/jetty/JettyHttpContainer.java
rename to containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpContainer.java
index dfe20f2..5bc55ff 100644
--- a/containers/jetty-http/src/main/java17/org/glassfish/jersey/jetty/JettyHttpContainer.java
+++ b/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpContainer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/containers/jetty-http/src/main/java17/org/glassfish/jersey/jetty/JettyHttpContainerFactory.java b/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpContainerFactory.java
similarity index 99%
rename from containers/jetty-http/src/main/java17/org/glassfish/jersey/jetty/JettyHttpContainerFactory.java
rename to containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpContainerFactory.java
index 26a4b79..8ce9599 100644
--- a/containers/jetty-http/src/main/java17/org/glassfish/jersey/jetty/JettyHttpContainerFactory.java
+++ b/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpContainerFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpContainerProvider.java b/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpContainerProvider.java
index 2e8b5c5..dcad978 100644
--- a/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpContainerProvider.java
+++ b/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpContainerProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -19,8 +19,6 @@
import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.core.Application;
-import org.glassfish.jersey.internal.util.JdkVersion;
-import org.glassfish.jersey.jetty.internal.LocalizationMessages;
import org.glassfish.jersey.server.spi.ContainerProvider;
/**
@@ -34,9 +32,6 @@
public static final String HANDLER_NAME = "org.eclipse.jetty.server.Handler";
@Override
public <T> T createContainer(final Class<T> type, final Application application) throws ProcessingException {
- if (JdkVersion.getJdkVersion().getMajor() < 17) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
if (type != null && (HANDLER_NAME.equalsIgnoreCase(type.getCanonicalName()) || JettyHttpContainer.class == type)) {
return type.cast(new JettyHttpContainer(application));
}
@@ -45,9 +40,6 @@
public <T> T createContainer(final Class<T> type, final Application application,
Object parentContext) throws ProcessingException {
- if (JdkVersion.getJdkVersion().getMajor() < 17) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
if (type != null && (HANDLER_NAME.equalsIgnoreCase(type.getCanonicalName()) || JettyHttpContainer.class == type)) {
return type.cast(new JettyHttpContainer(application, parentContext));
}
diff --git a/containers/jetty-http/src/main/java17/org/glassfish/jersey/jetty/JettyHttpServer.java b/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpServer.java
similarity index 98%
rename from containers/jetty-http/src/main/java17/org/glassfish/jersey/jetty/JettyHttpServer.java
rename to containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpServer.java
index 9734342..5dd1bd6 100644
--- a/containers/jetty-http/src/main/java17/org/glassfish/jersey/jetty/JettyHttpServer.java
+++ b/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpServer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018 Markus KARG. All rights reserved.
*
* This program and the accompanying materials are made available under the
diff --git a/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpServerProvider.java b/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpServerProvider.java
index 5022fee..25cc6a1 100644
--- a/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpServerProvider.java
+++ b/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpServerProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018 Markus KARG. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -21,8 +21,6 @@
import jakarta.ws.rs.SeBootstrap;
import jakarta.ws.rs.core.Application;
-import org.glassfish.jersey.internal.util.JdkVersion;
-import org.glassfish.jersey.jetty.internal.LocalizationMessages;
import org.glassfish.jersey.server.JerseySeBootstrapConfiguration;
import org.glassfish.jersey.server.spi.WebServer;
import org.glassfish.jersey.server.spi.WebServerProvider;
@@ -39,9 +37,6 @@
@Override
public <T extends WebServer> T createServer(final Class<T> type, final Application application,
final SeBootstrap.Configuration configuration) {
- if (JdkVersion.getJdkVersion().getMajor() < 17) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
return WebServerProvider.isSupportedWebServer(JettyHttpServer.class, type, configuration)
? type.cast(new JettyHttpServer(application, JerseySeBootstrapConfiguration.from(configuration)))
: null;
@@ -50,9 +45,6 @@
@Override
public <T extends WebServer> T createServer(final Class<T> type, final Class<? extends Application> applicationClass,
final SeBootstrap.Configuration configuration) {
- if (JdkVersion.getJdkVersion().getMajor() < 17) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
return WebServerProvider.isSupportedWebServer(JettyHttpServer.class, type, configuration)
? type.cast(new JettyHttpServer(applicationClass, JerseySeBootstrapConfiguration.from(configuration)))
: null;
diff --git a/containers/jetty-http/src/main/java11/org/glassfish/jersey/jetty/JettyHttpContainer.java b/containers/jetty-http/src/main/java11/org/glassfish/jersey/jetty/JettyHttpContainer.java
deleted file mode 100644
index 55258ea..0000000
--- a/containers/jetty-http/src/main/java11/org/glassfish/jersey/jetty/JettyHttpContainer.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * 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.jetty;
-
-import jakarta.ws.rs.ProcessingException;
-import jakarta.ws.rs.core.Application;
-import org.eclipse.jetty.server.Handler;
-import org.glassfish.jersey.jetty.internal.LocalizationMessages;
-import org.glassfish.jersey.server.ApplicationHandler;
-import org.glassfish.jersey.server.ResourceConfig;
-import org.glassfish.jersey.server.spi.Container;
-
-/**
- * Jersey {@code Container} implementation based on Jetty {@link Handler}.
- *
- * @author Arul Dhesiaseelan (aruld@acm.org)
- * @author Libor Kramolis
- * @author Marek Potociar
- */
-public final class JettyHttpContainer implements Container {
-
- @Override
- public ResourceConfig getConfiguration() {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-
- @Override
- public void reload() {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-
- @Override
- public void reload(final ResourceConfig configuration) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-
- @Override
- public ApplicationHandler getApplicationHandler() {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-
- /**
- * Create a new Jetty HTTP container.
- *
- * @param application JAX-RS / Jersey application to be deployed on Jetty HTTP container.
- * @param parentContext DI provider specific context with application's registered bindings.
- */
- JettyHttpContainer(final Application application, final Object parentContext) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-
- /**
- * Create a new Jetty HTTP container.
- *
- * @param application JAX-RS / Jersey application to be deployed on Jetty HTTP container.
- */
- JettyHttpContainer(final Application application) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-
- /**
- * Create a new Jetty HTTP container.
- *
- * @param applicationClass JAX-RS / Jersey class of application to be deployed on Jetty HTTP container.
- */
- JettyHttpContainer(final Class<? extends Application> applicationClass) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-
-}
diff --git a/containers/jetty-http/src/main/java11/org/glassfish/jersey/jetty/JettyHttpContainerFactory.java b/containers/jetty-http/src/main/java11/org/glassfish/jersey/jetty/JettyHttpContainerFactory.java
deleted file mode 100644
index 61e1977..0000000
--- a/containers/jetty-http/src/main/java11/org/glassfish/jersey/jetty/JettyHttpContainerFactory.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * 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.jetty;
-
-import jakarta.ws.rs.ProcessingException;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.util.ssl.SslContextFactory;
-import org.glassfish.jersey.jetty.internal.LocalizationMessages;
-import org.glassfish.jersey.server.ContainerFactory;
-import org.glassfish.jersey.server.ResourceConfig;
-import org.glassfish.jersey.server.spi.Container;
-
-import java.net.URI;
-
-/**
- * Factory for creating and starting Jetty server handlers. This returns
- * a handle to the started server as {@link Server} instances, which allows
- * the server to be stopped by invoking the {@link Server#stop()} method.
- * <p/>
- * To start the server in HTTPS mode an {@link SslContextFactory} can be provided.
- * This will be used to decrypt and encrypt information sent over the
- * connected TCP socket channel.
- *
- * @author Arul Dhesiaseelan (aruld@acm.org)
- * @author Marek Potociar
- */
-public final class JettyHttpContainerFactory {
-
- private JettyHttpContainerFactory() {
- }
-
- /**
- * Creates a {@link Server} instance that registers an {@link org.eclipse.jetty.server.Handler}.
- *
- * @param uri uri on which the {@link org.glassfish.jersey.server.ApplicationHandler} will be deployed. Only first path
- * segment will be used as context path, the rest will be ignored.
- * @return newly created {@link Server}.
- *
- * @throws ProcessingException in case of any failure when creating a new Jetty {@code Server} instance.
- * @throws IllegalArgumentException if {@code uri} is {@code null}.
- */
- public static Server createServer(final URI uri) throws ProcessingException {
- return createServer(uri, null, null, true);
- }
-
- /**
- * Creates a {@link Server} instance that registers an {@link org.eclipse.jetty.server.Handler}.
- *
- * @param uri uri on which the {@link org.glassfish.jersey.server.ApplicationHandler} will be deployed. Only first path
- * segment will be used as context path, the rest will be ignored.
- * @param start if set to false, server will not get started, which allows to configure the underlying transport
- * layer, see above for details.
- * @return newly created {@link Server}.
- *
- * @throws ProcessingException in case of any failure when creating a new Jetty {@code Server} instance.
- * @throws IllegalArgumentException if {@code uri} is {@code null}.
- */
- public static Server createServer(final URI uri, final boolean start) throws ProcessingException {
- return createServer(uri, null, null, start);
- }
-
- /**
- * Create a {@link Server} that registers an {@link org.eclipse.jetty.server.Handler} that
- * in turn manages all root resource and provider classes declared by the
- * resource configuration.
- * <p/>
- * This implementation defers to the
- * {@link ContainerFactory#createContainer(Class, jakarta.ws.rs.core.Application)} method
- * for creating an Container that manages the root resources.
- *
- * @param uri the URI to create the http server. The URI scheme must be
- * equal to "http". The URI user information and host
- * are ignored If the URI port is not present then port 80 will be
- * used. The URI path, query and fragment components are ignored.
- * @param config the resource configuration.
- * @return newly created {@link Server}.
- *
- * @throws ProcessingException in case of any failure when creating a new Jetty {@code Server} instance.
- * @throws IllegalArgumentException if {@code uri} is {@code null}.
- */
- public static Server createServer(final URI uri, final ResourceConfig config)
- throws ProcessingException {
-
- final JettyHttpContainer container = ContainerFactory.createContainer(JettyHttpContainer.class, config);
- return createServer(uri, null, container, true);
- }
-
- /**
- * Create a {@link Server} that registers an {@link org.eclipse.jetty.server.Handler} that
- * in turn manages all root resource and provider classes declared by the
- * resource configuration.
- * <p/>
- * This implementation defers to the
- * {@link ContainerFactory#createContainer(Class, jakarta.ws.rs.core.Application)} method
- * for creating an Container that manages the root resources.
- *
- * @param uri URI on which the Jersey web application will be deployed. Only first path segment will be
- * used as context path, the rest will be ignored.
- * @param configuration web application configuration.
- * @param start if set to false, server will not get started, which allows to configure the underlying
- * transport layer, see above for details.
- * @return newly created {@link Server}.
- *
- * @throws ProcessingException in case of any failure when creating a new Jetty {@code Server} instance.
- * @throws IllegalArgumentException if {@code uri} is {@code null}.
- */
- public static Server createServer(final URI uri, final ResourceConfig configuration, final boolean start)
- throws ProcessingException {
- return createServer(uri, null, ContainerFactory.createContainer(JettyHttpContainer.class, configuration), start);
- }
-
-
- /**
- * Create a {@link Server} that registers an {@link org.eclipse.jetty.server.Handler} that
- * in turn manages all root resource and provider classes declared by the
- * resource configuration.
- *
- * @param uri the URI to create the http server. The URI scheme must be
- * equal to "https". The URI user information and host
- * are ignored If the URI port is not present then port 143 will be
- * used. The URI path, query and fragment components are ignored.
- * @param config the resource configuration.
- * @param parentContext DI provider specific context with application's registered bindings.
- * @param start if set to false, server will not get started, this allows end users to set
- * additional properties on the underlying listener.
- * @return newly created {@link Server}.
- *
- * @throws ProcessingException in case of any failure when creating a new Jetty {@code Server} instance.
- * @throws IllegalArgumentException if {@code uri} is {@code null}.
- * @see JettyHttpContainer
- * @since 2.12
- */
- public static Server createServer(final URI uri, final ResourceConfig config, final boolean start,
- final Object parentContext) {
- return createServer(uri, null, new JettyHttpContainer(config, parentContext), start);
- }
-
-
- /**
- * Create a {@link Server} that registers an {@link org.eclipse.jetty.server.Handler} that
- * in turn manages all root resource and provider classes declared by the
- * resource configuration.
- *
- * @param uri the URI to create the http server. The URI scheme must be
- * equal to "https". The URI user information and host
- * are ignored If the URI port is not present then port 143 will be
- * used. The URI path, query and fragment components are ignored.
- * @param config the resource configuration.
- * @param parentContext DI provider specific context with application's registered bindings.
- * @return newly created {@link Server}.
- *
- * @throws ProcessingException in case of any failure when creating a new Jetty {@code Server} instance.
- * @throws IllegalArgumentException if {@code uri} is {@code null}.
- * @see JettyHttpContainer
- * @since 2.12
- */
- public static Server createServer(final URI uri, final ResourceConfig config, final Object parentContext) {
- return createServer(uri, null, new JettyHttpContainer(config, parentContext), true);
- }
-
- /**
- * Create a {@link Server} that registers an {@link org.eclipse.jetty.server.Handler} that
- * in turn manages all root resource and provider classes declared by the
- * resource configuration.
- * <p/>
- * This implementation defers to the
- * {@link ContainerFactory#createContainer(Class, jakarta.ws.rs.core.Application)} method
- * for creating an Container that manages the root resources.
- *
- * @param uri the URI to create the http server. The URI scheme must be
- * equal to {@code https}. The URI user information and host
- * are ignored. If the URI port is not present then port
- * {@value Container#DEFAULT_HTTPS_PORT} will be
- * used. The URI path, query and fragment components are ignored.
- * @param sslContextFactory this is the SSL context factory used to configure SSL connector
- * @param config the resource configuration.
- * @return newly created {@link Server}.
- *
- * @throws ProcessingException in case of any failure when creating a new Jetty {@code Server} instance.
- * @throws IllegalArgumentException if {@code uri} is {@code null}.
- */
- public static Server createServer(final URI uri, final SslContextFactory.Server sslContextFactory,
- final ResourceConfig config)
- throws ProcessingException {
- final JettyHttpContainer container = ContainerFactory.createContainer(JettyHttpContainer.class, config);
- return createServer(uri, sslContextFactory, container, true);
- }
-
- /**
- * Create a {@link Server} that registers an {@link org.eclipse.jetty.server.Handler} that
- * in turn manages all root resource and provider classes found by searching the
- * classes referenced in the java classpath.
- *
- * @param uri the URI to create the http server. The URI scheme must be
- * equal to {@code https}. The URI user information and host
- * are ignored. If the URI port is not present then port
- * {@value Container#DEFAULT_HTTPS_PORT} will be
- * used. The URI path, query and fragment components are ignored.
- * @param sslContextFactory this is the SSL context factory used to configure SSL connector
- * @param handler the container that handles all HTTP requests
- * @param start if set to false, server will not get started, this allows end users to set
- * additional properties on the underlying listener.
- * @return newly created {@link Server}.
- *
- * @throws ProcessingException in case of any failure when creating a new Jetty {@code Server} instance.
- * @throws IllegalArgumentException if {@code uri} is {@code null}.
- * @see JettyHttpContainer
- */
- public static Server createServer(final URI uri,
- final SslContextFactory.Server sslContextFactory,
- final JettyHttpContainer handler,
- final boolean start) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-}
diff --git a/containers/jetty-http/src/main/java11/org/glassfish/jersey/jetty/JettyHttpServer.java b/containers/jetty-http/src/main/java11/org/glassfish/jersey/jetty/JettyHttpServer.java
deleted file mode 100644
index 70fcc56..0000000
--- a/containers/jetty-http/src/main/java11/org/glassfish/jersey/jetty/JettyHttpServer.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2021, 2023 Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2018 Markus KARG. All rights reserved.
- *
- * 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.jetty;
-
-import jakarta.ws.rs.ProcessingException;
-import jakarta.ws.rs.core.Application;
-import org.glassfish.jersey.jetty.internal.LocalizationMessages;
-import org.glassfish.jersey.server.ContainerFactory;
-import org.glassfish.jersey.server.JerseySeBootstrapConfiguration;
-import org.glassfish.jersey.server.spi.WebServer;
-
-import java.util.concurrent.CompletableFuture;
-
-/**
- * Jersey {@code Server} implementation based on Jetty
- * {@link org.eclipse.jetty.server.Server Server}.
- *
- * @author Markus KARG (markus@headcrashing.eu)
- * @since 3.1.0
- */
-final class JettyHttpServer implements WebServer {
-
- private final JettyHttpContainer container;
-
- private final org.eclipse.jetty.server.Server httpServer;
-
- JettyHttpServer(final Application application, final JerseySeBootstrapConfiguration configuration) {
- this(ContainerFactory.createContainer(JettyHttpContainer.class, application), configuration);
- }
-
- JettyHttpServer(final Class<? extends Application> applicationClass,
- final JerseySeBootstrapConfiguration configuration) {
- this(new JettyHttpContainer(applicationClass), configuration);
- }
-
- JettyHttpServer(final JettyHttpContainer container, final JerseySeBootstrapConfiguration configuration) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-
- @Override
- public final JettyHttpContainer container() {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-
- @Override
- public final int port() {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-
- @Override
- public final CompletableFuture<Void> start() {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-
- @Override
- public final CompletableFuture<Void> stop() {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-
- @Override
- public final <T> T unwrap(final Class<T> nativeClass) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-
-}
diff --git a/containers/jetty-http/src/main/resources/org/glassfish/jersey/jetty/internal/localization.properties b/containers/jetty-http/src/main/resources/org/glassfish/jersey/jetty/internal/localization.properties
index 8d507d5..e678f3a 100644
--- a/containers/jetty-http/src/main/resources/org/glassfish/jersey/jetty/internal/localization.properties
+++ b/containers/jetty-http/src/main/resources/org/glassfish/jersey/jetty/internal/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
@@ -20,5 +20,4 @@
unable.to.close.response=Unable to close response output.
uri.cannot.be.null=The URI must not be null.
wrong.scheme.when.using.http=The URI scheme should be 'http' when not using SSL.
-wrong.scheme.when.using.https=The URI scheme should be 'https' when using SSL.
-not.supported=Jetty container is not supported on JDK version less than 17.
+wrong.scheme.when.using.https=The URI scheme should be 'https' when using SSL.
\ No newline at end of file
diff --git a/containers/jetty-http2/pom.xml b/containers/jetty-http2/pom.xml
index b2d8e46..6fa001c 100644
--- a/containers/jetty-http2/pom.xml
+++ b/containers/jetty-http2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
+ 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
@@ -32,13 +32,6 @@
<description>Jetty Http2 Container</description>
- <properties>
- <java11.build.outputDirectory>${project.basedir}/target</java11.build.outputDirectory>
- <java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory>
- <java17.build.outputDirectory>${project.basedir}/target17</java17.build.outputDirectory>
- <java17.sourceDirectory>${project.basedir}/src/main/java17</java17.sourceDirectory>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
@@ -70,6 +63,26 @@
</exclusions>
</dependency>
<dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.http2</groupId>
+ <artifactId>jetty-http2-server</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<scope>test</scope>
@@ -116,166 +129,4 @@
</resources>
</build>
- <profiles>
- <profile>
- <id>JettyExclude</id>
- <activation>
- <jdk>[11,17)</jdk>
- </activation>
- <properties>
- <jetty.version>${jetty11.version}</jetty.version>
- </properties>
- <build>
- <directory>${java11.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java11.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <testExcludes>
- <testExclude>org/glassfish/jersey/jetty/http2/*.java</testExclude>
- </testExcludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>JettyInclude</id>
- <activation>
- <jdk>[17,)</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty.http2</groupId>
- <artifactId>jetty-http2-server</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- <build>
- <directory>${java17.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java17.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>copyJDK17FilesToMultiReleaseJar</id>
- <activation>
- <file>
- <!-- ${java17.build.outputDirectory} does not work here -->
- <exists>target17/classes/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerFactory.class</exists>
- </file>
- <jdk>[11,17)</jdk>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <inherited>true</inherited>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Multi-Release>true</Multi-Release>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>copy-jdk17-classes</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${java11.build.outputDirectory}/classes/META-INF/versions/17</outputDirectory>
- <resources>
- <resource>
- <directory>${java17.build.outputDirectory}/classes</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-jdk17-sources</id>
- <phase>package</phase>
- <configuration>
- <target>
- <property name="sources-jar" value="${java11.build.outputDirectory}/${project.artifactId}-${project.version}-sources.jar"/>
- <echo>sources-jar: ${sources-jar}</echo>
- <zip destfile="${sources-jar}" update="true">
- <zipfileset dir="${java17.sourceDirectory}" prefix="META-INF/versions/17"/>
- </zip>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
</project>
\ No newline at end of file
diff --git a/containers/jetty-http2/src/main/java17/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerFactory.java b/containers/jetty-http2/src/main/java/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerFactory.java
similarity index 98%
rename from containers/jetty-http2/src/main/java17/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerFactory.java
rename to containers/jetty-http2/src/main/java/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerFactory.java
index b03f409..815e6d9 100644
--- a/containers/jetty-http2/src/main/java17/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerFactory.java
+++ b/containers/jetty-http2/src/main/java/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
+ * 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
diff --git a/containers/jetty-http2/src/main/java/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerProvider.java b/containers/jetty-http2/src/main/java/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerProvider.java
index 01c61fc..e0e5ec7 100644
--- a/containers/jetty-http2/src/main/java/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerProvider.java
+++ b/containers/jetty-http2/src/main/java/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -31,9 +31,6 @@
@Override
public <T> T createContainer(final Class<T> type, final Application application) throws ProcessingException {
- if (JdkVersion.getJdkVersion().getMajor() < 11) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
if (type != null && (HANDLER_NAME.equalsIgnoreCase(type.getCanonicalName()) || JettyHttpContainer.class == type)) {
return type.cast(new JettyHttpContainerProvider().createContainer(JettyHttpContainer.class, application));
}
diff --git a/containers/jetty-http2/src/main/java11/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerFactory.java b/containers/jetty-http2/src/main/java11/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerFactory.java
deleted file mode 100644
index cdea00a..0000000
--- a/containers/jetty-http2/src/main/java11/org/glassfish/jersey/jetty/http2/JettyHttp2ContainerFactory.java
+++ /dev/null
@@ -1,75 +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.jetty.http2;
-
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.util.ssl.SslContextFactory;
-
-import org.glassfish.jersey.internal.util.JdkVersion;
-import org.glassfish.jersey.jetty.JettyHttpContainer;
-import org.glassfish.jersey.jetty.http2.LocalizationMessages;
-import org.glassfish.jersey.server.ContainerFactory;
-import org.glassfish.jersey.server.ResourceConfig;
-
-import jakarta.ws.rs.ProcessingException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-public final class JettyHttp2ContainerFactory {
-
- private JettyHttp2ContainerFactory() {
-
- }
-
- public static Server createHttp2Server(final URI uri) throws ProcessingException {
- validateJdk();
- return null; // does not work at JDK lower than 17
- }
-
- public static Server createHttp2Server(final URI uri, final ResourceConfig configuration, final boolean start)
- throws ProcessingException {
- validateJdk();
- return null; // does not work at JDK lower than 17
- }
-
- public static Server createHttp2Server(final URI uri, final boolean start) throws ProcessingException {
- validateJdk();
- return null; // does not work at JDK lower than 17
- }
-
- public static Server createHttp2Server(final URI uri, final ResourceConfig config, final boolean start,
- final Object parentContext) {
- validateJdk();
- return null; // does not work at JDK lower than 17
- }
-
- public static Server createHttp2Server(final URI uri,
- final SslContextFactory.Server sslContextFactory,
- final JettyHttpContainer handler,
- final boolean start) {
-
- validateJdk();
- return null; // does not work at JDK lower than 17
- }
-
- private static void validateJdk() {
- if (JdkVersion.getJdkVersion().getMajor() < 17) {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
- }
-}
diff --git a/containers/jetty-http2/src/main/resources/org/glassfish/jersey/jetty/http2/localization.properties b/containers/jetty-http2/src/main/resources/org/glassfish/jersey/jetty/http2/localization.properties
index ba290bd..f0e6001 100644
--- a/containers/jetty-http2/src/main/resources/org/glassfish/jersey/jetty/http2/localization.properties
+++ b/containers/jetty-http2/src/main/resources/org/glassfish/jersey/jetty/http2/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
+# 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
@@ -15,5 +15,4 @@
#
# {0} - status code; {1} - status reason message
-error.when.creating.server=Exception thrown when trying to create jetty server.
-not.supported=Jetty container is not supported on JDK version less than 17.
\ No newline at end of file
+error.when.creating.server=Exception thrown when trying to create jetty server.
\ No newline at end of file
diff --git a/containers/jetty-servlet/pom.xml b/containers/jetty-servlet/pom.xml
index 4566249..057bfc1 100644
--- a/containers/jetty-servlet/pom.xml
+++ b/containers/jetty-servlet/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -32,13 +32,6 @@
<description>Jetty Servlet Container</description>
- <properties>
- <java11.build.outputDirectory>${project.basedir}/target</java11.build.outputDirectory>
- <java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory>
- <java17.build.outputDirectory>${project.basedir}/target17</java17.build.outputDirectory>
- <java17.sourceDirectory>${project.basedir}/src/main/java17</java17.sourceDirectory>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
@@ -96,176 +89,4 @@
</plugin>
</plugins>
</build>
-
- <profiles>
- <profile>
- <id>JettyExclude</id>
- <activation>
- <jdk>[11,17)</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-webapp</artifactId>
- <version>${jetty11.version}</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty.ee10</groupId>
- <artifactId>jetty-ee10-webapp</artifactId>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>*</groupId>
- <artifactId>*</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- <version>${jetty11.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.containers</groupId>
- <artifactId>jersey-container-jetty-http</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-server</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- <build>
- <directory>${java11.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java11.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>JettyInclude</id>
- <activation>
- <jdk>[17,)</jdk>
- </activation>
- <build>
- <directory>${java17.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java17.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>copyJDK17FilesToMultiReleaseJar</id>
- <activation>
- <file>
- <!-- ${java17.build.outputDirectory} does not work here -->
- <exists>target17/classes/org/glassfish/jersey/jetty/JettyWebContainerFactory.class</exists>
- </file>
- <jdk>[11,17)</jdk>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <inherited>true</inherited>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Multi-Release>true</Multi-Release>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>copy-jdk17-classes</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${java11.build.outputDirectory}/classes/META-INF/versions/17</outputDirectory>
- <resources>
- <resource>
- <directory>${java17.build.outputDirectory}/classes</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-jdk17-sources</id>
- <phase>package</phase>
- <configuration>
- <target>
- <property name="sources-jar" value="${java11.build.outputDirectory}/${project.artifactId}-${project.version}-sources.jar"/>
- <echo>sources-jar: ${sources-jar}</echo>
- <zip destfile="${sources-jar}" update="true">
- <zipfileset dir="${java17.sourceDirectory}" prefix="META-INF/versions/17"/>
- </zip>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
+</project>
\ No newline at end of file
diff --git a/containers/jetty-servlet/src/main/java17/org/glassfish/jersey/jetty/servlet/JettyWebContainerFactory.java b/containers/jetty-servlet/src/main/java/org/glassfish/jersey/jetty/servlet/JettyWebContainerFactory.java
similarity index 99%
rename from containers/jetty-servlet/src/main/java17/org/glassfish/jersey/jetty/servlet/JettyWebContainerFactory.java
rename to containers/jetty-servlet/src/main/java/org/glassfish/jersey/jetty/servlet/JettyWebContainerFactory.java
index 5ada3ed..206c415 100644
--- a/containers/jetty-servlet/src/main/java17/org/glassfish/jersey/jetty/servlet/JettyWebContainerFactory.java
+++ b/containers/jetty-servlet/src/main/java/org/glassfish/jersey/jetty/servlet/JettyWebContainerFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/containers/jetty-servlet/src/main/java11/org/glassfish/jersey/jetty/servlet/JettyWebContainerFactory.java b/containers/jetty-servlet/src/main/java11/org/glassfish/jersey/jetty/servlet/JettyWebContainerFactory.java
deleted file mode 100644
index afbec62..0000000
--- a/containers/jetty-servlet/src/main/java11/org/glassfish/jersey/jetty/servlet/JettyWebContainerFactory.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * 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.jetty.servlet;
-
-import jakarta.servlet.Servlet;
-import jakarta.ws.rs.ProcessingException;
-import org.eclipse.jetty.server.Server;
-import org.glassfish.jersey.jetty.internal.LocalizationMessages;
-import org.glassfish.jersey.servlet.ServletContainer;
-
-import java.net.URI;
-import java.util.Map;
-
-/**
- * Factory for creating and starting Jetty {@link Server} instances
- * for deploying a Servlet.
- * <p/>
- * The default deployed server is an instance of {@link ServletContainer}.
- * <p/>
- * If no initialization parameters are declared (or is null) then root
- * resource and provider classes will be found by searching the classes
- * referenced in the java classpath.
- *
- * @author Arul Dhesiaseelan (aruld at acm.org)
- */
-public final class JettyWebContainerFactory {
-
- private JettyWebContainerFactory() {
- }
-
- /**
- * Create a {@link Server} that registers the {@link ServletContainer}.
- *
- * @param u the URI to create the http server. The URI scheme must be
- * equal to "http". The URI user information and host
- * are ignored If the URI port is not present then port 80 will be
- * used. The URI query and fragment components are ignored. Only first path segment will be used
- * as context path, the rest will be ignored.
- * @return the http server, with the endpoint started.
- * @throws Exception if an error occurs creating the container.
- * @throws IllegalArgumentException if HTTP server URI is {@code null}.
- */
- public static Server create(String u)
- throws Exception {
- if (u == null) {
- throw new IllegalArgumentException("The URI must not be null");
- }
-
- return create(URI.create(u));
- }
-
- /**
- * Create a {@link Server} that registers the {@link ServletContainer}.
- *
- * @param u the URI to create the http server. The URI scheme must be
- * equal to "http". The URI user information and host
- * are ignored If the URI port is not present then port 80 will be
- * used. The URI query and fragment components are ignored. Only first path segment will be used
- * as context path, the rest will be ignored.
- * @param initParams the servlet initialization parameters.
- * @return the http server, with the endpoint started.
- * @throws Exception if an error occurs creating the container.
- * @throws IllegalArgumentException if HTTP server URI is {@code null}.
- */
- public static Server create(String u, Map<String, String> initParams)
- throws Exception {
- if (u == null) {
- throw new IllegalArgumentException("The URI must not be null");
- }
-
- return create(URI.create(u), initParams);
- }
-
- /**
- * Create a {@link Server} that registers the {@link ServletContainer}.
- *
- * @param u the URI to create the http server. The URI scheme must be
- * equal to "http". The URI user information and host
- * are ignored If the URI port is not present then port 80 will be
- * used. The URI query and fragment components are ignored. Only first path segment will be used
- * as context path, the rest will be ignored.
- * @return the http server, with the endpoint started.
- * @throws Exception if an error occurs creating the container.
- * @throws IllegalArgumentException if HTTP server URI is {@code null}.
- */
- public static Server create(URI u)
- throws Exception {
- return create(u, ServletContainer.class);
- }
-
- /**
- * Create a {@link Server} that registers the {@link ServletContainer}.
- *
- * @param u the URI to create the http server. The URI scheme must be
- * equal to "http". The URI user information and host
- * are ignored If the URI port is not present then port 80 will be
- * used. The URI query and fragment components are ignored. Only first path segment will be used
- * as context path, the rest will be ignored.
- * @param initParams the servlet initialization parameters.
- * @return the http server, with the endpoint started.
- * @throws Exception if an error occurs creating the container.
- * @throws IllegalArgumentException if HTTP server URI is {@code null}.
- */
- public static Server create(URI u, Map<String, String> initParams)
- throws Exception {
- return create(u, ServletContainer.class, initParams);
- }
-
- /**
- * Create a {@link Server} that registers the declared
- * servlet class.
- *
- * @param u the URI to create the http server. The URI scheme must be
- * equal to "http". The URI user information and host
- * are ignored If the URI port is not present then port 80 will be
- * used. The URI query and fragment components are ignored. Only first path segment will be used
- * as context path, the rest will be ignored.
- * @param c the servlet class.
- * @return the http server, with the endpoint started.
- * @throws Exception if an error occurs creating the container.
- * @throws IllegalArgumentException if HTTP server URI is {@code null}.
- */
- public static Server create(String u, Class<? extends Servlet> c)
- throws Exception {
- if (u == null) {
- throw new IllegalArgumentException("The URI must not be null");
- }
-
- return create(URI.create(u), c);
- }
-
- /**
- * Create a {@link Server} that registers the declared
- * servlet class.
- *
- * @param u the URI to create the http server. The URI scheme must be
- * equal to "http". The URI user information and host
- * are ignored If the URI port is not present then port 80 will be
- * used. The URI query and fragment components are ignored. Only first path segment will be used
- * as context path, the rest will be ignored.
- * @param c the servlet class.
- * @param initParams the servlet initialization parameters.
- * @return the http server, with the endpoint started.
- * @throws Exception if an error occurs creating the container.
- * @throws IllegalArgumentException if HTTP server URI is {@code null}.
- */
- public static Server create(String u, Class<? extends Servlet> c,
- Map<String, String> initParams)
- throws Exception {
- if (u == null) {
- throw new IllegalArgumentException("The URI must not be null");
- }
-
- return create(URI.create(u), c, initParams);
- }
-
- /**
- * Create a {@link Server} that registers the declared
- * servlet class.
- *
- * @param u the URI to create the http server. The URI scheme must be
- * equal to "http". The URI user information and host
- * are ignored If the URI port is not present then port 80 will be
- * used. The URI query and fragment components are ignored. Only first path segment will be used
- * as context path, the rest will be ignored.
- * @param c the servlet class.
- * @return the http server, with the endpoint started.
- * @throws Exception if an error occurs creating the container.
- * @throws IllegalArgumentException if HTTP server URI is {@code null}.
- */
- public static Server create(URI u, Class<? extends Servlet> c)
- throws Exception {
- return create(u, c, null);
- }
-
- /**
- * Create a {@link Server} that registers the declared
- * servlet class.
- *
- * @param u the URI to create the http server. The URI scheme must be
- * equal to "http". The URI user information and host
- * are ignored If the URI port is not present then port 80 will be
- * used. The URI query and fragment components are ignored. Only first path segment will be used
- * as context path, the rest will be ignored.
- * @param c the servlet class.
- * @param initParams the servlet initialization parameters.
- * @return the http server, with the endpoint started.
- * @throws Exception if an error occurs creating the container.
- * @throws IllegalArgumentException if HTTP server URI is {@code null}.
- */
- public static Server create(URI u, Class<? extends Servlet> c, Map<String, String> initParams)
- throws Exception {
- return create(u, c, null, initParams, null);
- }
-
- private static Server create(URI u, Class<? extends Servlet> c, Servlet servlet,
- Map<String, String> initParams, Map<String, String> contextInitParams)
- throws Exception {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-
- /**
- * Create a {@link Server} that registers the declared
- * servlet instance.
- *
- * @param u the URI to create the HTTP server. The URI scheme must be
- * equal to "http". The URI user information and host
- * are ignored If the URI port is not present then port 80 will be
- * used. The URI query and fragment components are ignored. Only first path segment will be used
- * as context path, the rest will be ignored.
- * @param servlet the servlet instance.
- * @param initParams the servlet initialization parameters.
- * @param contextInitParams the servlet context initialization parameters.
- * @return the http server, with the endpoint started.
- * @throws Exception if an error occurs creating the container.
- * @throws IllegalArgumentException if HTTP server URI is {@code null}.
- */
- public static Server create(URI u, Servlet servlet, Map<String, String> initParams, Map<String, String> contextInitParams)
- throws Exception {
- if (servlet == null) {
- throw new IllegalArgumentException("The servlet must not be null");
- }
- return create(u, null, servlet, initParams, contextInitParams);
- }
-}
\ No newline at end of file
diff --git a/containers/jetty-servlet/src/main/resources/org/glassfish/jersey/jetty/servlet/internal/localization.properties b/containers/jetty-servlet/src/main/resources/org/glassfish/jersey/jetty/servlet/internal/localization.properties
deleted file mode 100644
index 6504f0e..0000000
--- a/containers/jetty-servlet/src/main/resources/org/glassfish/jersey/jetty/servlet/internal/localization.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (c) 2020, 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/ext/spring6/pom.xml b/ext/spring6/pom.xml
index 9c2bdff..a210e12 100644
--- a/ext/spring6/pom.xml
+++ b/ext/spring6/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -38,10 +38,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <java.build.outputDirectory>${project.basedir}/target</java.build.outputDirectory>
- <javaPre17.sourceDirectory>${project.basedir}/src/main/javaPre17</javaPre17.sourceDirectory>
- <java17.build.outputDirectory>${project.basedir}/target17</java17.build.outputDirectory>
- <java17.sourceDirectory>${project.basedir}/src/main/java17</java17.sourceDirectory>
</properties>
<repositories>
@@ -210,140 +206,6 @@
<profiles>
<profile>
- <id>SpringExclude</id>
- <activation>
- <jdk>[1.8,17)</jdk>
- </activation>
- <build>
- <directory>${java.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${javaPre17.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <testExcludes>
- <testExclude>org/glassfish/jersey/server/spring/**/*.java</testExclude>
- </testExcludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>SpringInclude</id>
- <activation>
- <jdk>[17,)</jdk>
- </activation>
- <build>
- <directory>${java17.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java17.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>copyJDK17FilesToMultiReleaseJar</id>
- <activation>
- <file>
- <!-- ${java17.build.outputDirectory} does not work here -->
- <exists>target17/classes/org/glassfish/jersey/server/spring/SpringWebApplicationInitializer.class</exists>
- </file>
- <jdk>[1.8,17)</jdk>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <inherited>true</inherited>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Multi-Release>true</Multi-Release>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>copy-jdk17-classes</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${java.build.outputDirectory}/classes/META-INF/versions/17</outputDirectory>
- <resources>
- <resource>
- <directory>${java17.build.outputDirectory}/classes</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-jdk17-sources</id>
- <phase>package</phase>
- <configuration>
- <target>
- <property name="sources-jar" value="${java.build.outputDirectory}/${project.artifactId}-${project.version}-sources.jar"/>
- <echo>sources-jar: ${sources-jar}</echo>
- <zip destfile="${sources-jar}" update="true">
- <zipfileset dir="${java17.sourceDirectory}" prefix="META-INF/versions/17"/>
- </zip>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
<id>delayed-strategy-skip-test</id>
<activation>
<property>
@@ -364,4 +226,4 @@
</build>
</profile>
</profiles>
-</project>
+</project>
\ No newline at end of file
diff --git a/ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/AutowiredInjectResolver.java b/ext/spring6/src/main/java/org/glassfish/jersey/server/spring/AutowiredInjectResolver.java
similarity index 98%
rename from ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/AutowiredInjectResolver.java
rename to ext/spring6/src/main/java/org/glassfish/jersey/server/spring/AutowiredInjectResolver.java
index aca66c9..f5d5d6d 100644
--- a/ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/AutowiredInjectResolver.java
+++ b/ext/spring6/src/main/java/org/glassfish/jersey/server/spring/AutowiredInjectResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/SpringComponentProvider.java b/ext/spring6/src/main/java/org/glassfish/jersey/server/spring/SpringComponentProvider.java
similarity index 98%
rename from ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/SpringComponentProvider.java
rename to ext/spring6/src/main/java/org/glassfish/jersey/server/spring/SpringComponentProvider.java
index 358f488..d047203 100644
--- a/ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/SpringComponentProvider.java
+++ b/ext/spring6/src/main/java/org/glassfish/jersey/server/spring/SpringComponentProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/SpringLifecycleListener.java b/ext/spring6/src/main/java/org/glassfish/jersey/server/spring/SpringLifecycleListener.java
similarity index 96%
rename from ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/SpringLifecycleListener.java
rename to ext/spring6/src/main/java/org/glassfish/jersey/server/spring/SpringLifecycleListener.java
index b47ba09..3b6637d 100644
--- a/ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/SpringLifecycleListener.java
+++ b/ext/spring6/src/main/java/org/glassfish/jersey/server/spring/SpringLifecycleListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/SpringWebApplicationInitializer.java b/ext/spring6/src/main/java/org/glassfish/jersey/server/spring/SpringWebApplicationInitializer.java
similarity index 96%
rename from ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/SpringWebApplicationInitializer.java
rename to ext/spring6/src/main/java/org/glassfish/jersey/server/spring/SpringWebApplicationInitializer.java
index 8e21bda..935c3d1 100644
--- a/ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/SpringWebApplicationInitializer.java
+++ b/ext/spring6/src/main/java/org/glassfish/jersey/server/spring/SpringWebApplicationInitializer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/scope/JaxrsRequestAttributes.java b/ext/spring6/src/main/java/org/glassfish/jersey/server/spring/scope/JaxrsRequestAttributes.java
similarity index 97%
rename from ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/scope/JaxrsRequestAttributes.java
rename to ext/spring6/src/main/java/org/glassfish/jersey/server/spring/scope/JaxrsRequestAttributes.java
index 35a9e26..18525b9 100644
--- a/ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/scope/JaxrsRequestAttributes.java
+++ b/ext/spring6/src/main/java/org/glassfish/jersey/server/spring/scope/JaxrsRequestAttributes.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/scope/JaxrsServletRequestAttributes.java b/ext/spring6/src/main/java/org/glassfish/jersey/server/spring/scope/JaxrsServletRequestAttributes.java
similarity index 96%
rename from ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/scope/JaxrsServletRequestAttributes.java
rename to ext/spring6/src/main/java/org/glassfish/jersey/server/spring/scope/JaxrsServletRequestAttributes.java
index 4c2d0c2..844a579 100644
--- a/ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/scope/JaxrsServletRequestAttributes.java
+++ b/ext/spring6/src/main/java/org/glassfish/jersey/server/spring/scope/JaxrsServletRequestAttributes.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
diff --git a/ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/scope/RequestContextFilter.java b/ext/spring6/src/main/java/org/glassfish/jersey/server/spring/scope/RequestContextFilter.java
similarity index 98%
rename from ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/scope/RequestContextFilter.java
rename to ext/spring6/src/main/java/org/glassfish/jersey/server/spring/scope/RequestContextFilter.java
index a489695..12ec571 100644
--- a/ext/spring6/src/main/java17/org/glassfish/jersey/server/spring/scope/RequestContextFilter.java
+++ b/ext/spring6/src/main/java/org/glassfish/jersey/server/spring/scope/RequestContextFilter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/ext/spring6/src/main/javaPre17/org/glassfish/jersey/server/spring/AutowiredInjectResolver.java b/ext/spring6/src/main/javaPre17/org/glassfish/jersey/server/spring/AutowiredInjectResolver.java
deleted file mode 100644
index 747c607..0000000
--- a/ext/spring6/src/main/javaPre17/org/glassfish/jersey/server/spring/AutowiredInjectResolver.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-package org.glassfish.jersey.server.spring;
-
-import jakarta.inject.Singleton;
-import org.glassfish.jersey.internal.inject.Injectee;
-import org.glassfish.jersey.internal.inject.InjectionResolver;
-
-@Singleton
-public class AutowiredInjectResolver implements InjectionResolver {
-
- @Override
- public Object resolve(Injectee injectee) {
- return null;
- }
-
- @Override
- public boolean isConstructorParameterIndicator() {
- return false;
- }
-
- @Override
- public boolean isMethodParameterIndicator() {
- return false;
- }
-
- @Override
- public Class getAnnotation() {
- return null;
- }
-}
diff --git a/ext/spring6/src/main/javaPre17/org/glassfish/jersey/server/spring/SpringComponentProvider.java b/ext/spring6/src/main/javaPre17/org/glassfish/jersey/server/spring/SpringComponentProvider.java
deleted file mode 100644
index 5f85ffb..0000000
--- a/ext/spring6/src/main/javaPre17/org/glassfish/jersey/server/spring/SpringComponentProvider.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package org.glassfish.jersey.server.spring;
-
-import org.glassfish.jersey.internal.inject.InjectionManager;
-import org.glassfish.jersey.internal.util.JdkVersion;
-import org.glassfish.jersey.server.spi.ComponentProvider;
-
-import java.util.Set;
-
-/**
- * Custom ComponentProvider class.
- * Responsible for 1) bootstrapping Jersey 3 Spring integration and
- * 2) making Jersey skip JAX-RS Spring component life-cycle management and leave it to us.
- *
- * @author Marko Asplund (marko.asplund at yahoo.com)
- */
-public class SpringComponentProvider implements ComponentProvider {
-
- @Override
- public void initialize(InjectionManager injectionManager) {
- if (JdkVersion.getJdkVersion().getMajor() < 17) {
- throw new IllegalStateException(LocalizationMessages.NOT_SUPPORTED());
- }
- }
-
- @Override
- public boolean bind(Class<?> component, Set<Class<?>> providerContracts) {
- return false;
- }
-
- @Override
- public void done() {
-
- }
-}
diff --git a/ext/spring6/src/main/javaPre17/org/glassfish/jersey/server/spring/SpringLifecycleListener.java b/ext/spring6/src/main/javaPre17/org/glassfish/jersey/server/spring/SpringLifecycleListener.java
deleted file mode 100644
index 15dd493..0000000
--- a/ext/spring6/src/main/javaPre17/org/glassfish/jersey/server/spring/SpringLifecycleListener.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package org.glassfish.jersey.server.spring;
-
-import jakarta.ws.rs.ext.Provider;
-import org.glassfish.jersey.internal.util.JdkVersion;
-import org.glassfish.jersey.server.spi.Container;
-import org.glassfish.jersey.server.spi.ContainerLifecycleListener;
-
-@Provider
-public class SpringLifecycleListener implements ContainerLifecycleListener {
-
- @Override
- public void onStartup(Container container) {
- if (JdkVersion.getJdkVersion().getMajor() < 17) {
- throw new IllegalStateException(LocalizationMessages.NOT_SUPPORTED());
- }
- }
-
- @Override
- public void onReload(Container container) {
- }
-
- @Override
- public void onShutdown(Container container) {
- }
-}
diff --git a/ext/spring6/src/main/javaPre17/org/glassfish/jersey/server/spring/scope/RequestContextFilter.java b/ext/spring6/src/main/javaPre17/org/glassfish/jersey/server/spring/scope/RequestContextFilter.java
deleted file mode 100644
index 9a41f80..0000000
--- a/ext/spring6/src/main/javaPre17/org/glassfish/jersey/server/spring/scope/RequestContextFilter.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available at
- * https://www.gnu.org/software/classpath/license.html.
- *
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- */
-
-package org.glassfish.jersey.server.spring.scope;
-
-import jakarta.ws.rs.container.ContainerRequestContext;
-import jakarta.ws.rs.container.ContainerRequestFilter;
-import jakarta.ws.rs.container.ContainerResponseContext;
-import jakarta.ws.rs.container.ContainerResponseFilter;
-import jakarta.ws.rs.container.PreMatching;
-import jakarta.ws.rs.ext.Provider;
-import org.glassfish.jersey.internal.util.JdkVersion;
-import org.glassfish.jersey.server.spring.LocalizationMessages;
-
-import java.io.IOException;
-
-/**
- * Spring filter to provide a bridge between JAX-RS and Spring request attributes.
- *
- * @author Marko Asplund (marko.asplund at yahoo.com)
- * @author Jakub Podlesak
- * @author Marek Potociar
- */
-@Provider
-@PreMatching
-public final class RequestContextFilter implements ContainerRequestFilter, ContainerResponseFilter {
-
- @Override
- public void filter(ContainerRequestContext requestContext) throws IOException {
- if (JdkVersion.getJdkVersion().getMajor() < 17) {
- throw new IllegalStateException(LocalizationMessages.NOT_SUPPORTED());
- }
- }
-
- @Override
- public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException {
- if (JdkVersion.getJdkVersion().getMajor() < 17) {
- throw new IllegalStateException(LocalizationMessages.NOT_SUPPORTED());
- }
- }
-}
diff --git a/ext/spring6/src/main/resources/org/glassfish/jersey/server/spring/localization.properties b/ext/spring6/src/main/resources/org/glassfish/jersey/server/spring/localization.properties
index 333129d..2658556 100644
--- a/ext/spring6/src/main/resources/org/glassfish/jersey/server/spring/localization.properties
+++ b/ext/spring6/src/main/resources/org/glassfish/jersey/server/spring/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
@@ -20,7 +20,6 @@
ctx.lookup.sucessful=Spring context lookup done.
spring.component.provider.initialized=Spring component provider initialized.
none.or.multiple.beans.available=None or multiple beans found in Spring context for type {0}, skipping the type.
-not.supported=Spring component is not supported on JDK version less than 17.
bean.registered=Spring managed bean, {0}, registered with HK2.
registering.ctx.loader.listener=Registering Spring ContextLoaderListener
skipping.ctx.lodaer.listener.registration=Presuming Spring ContextLoaderListener was manually registered. Skipping context loader registration.
diff --git a/ext/wadl-doclet/pom.xml b/ext/wadl-doclet/pom.xml
index 769651a..33898e1 100644
--- a/ext/wadl-doclet/pom.xml
+++ b/ext/wadl-doclet/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -35,159 +35,9 @@
<properties>
<java.sourceDirectory>${project.basedir}/src/main/java</java.sourceDirectory>
- <java8_11.build.outputDirectory>${project.basedir}/target</java8_11.build.outputDirectory>
- <java8_11.sourceDirectory>${project.basedir}/src/main/java8_11</java8_11.sourceDirectory>
- <java12.build.outputDirectory>${project.basedir}/target-java12</java12.build.outputDirectory>
- <java12.sourceDirectory>${project.basedir}/src/main/java12</java12.sourceDirectory>
</properties>
- <profiles>
- <profile>
- <id>jdk1.8</id>
- <activation>
- <jdk>1.8</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>com.sun</groupId>
- <artifactId>tools</artifactId>
- <version>1.8.0</version>
- <scope>system</scope>
- <systemPath>${java.home}/../lib/tools.jar</systemPath>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>jdk1.8_11</id>
- <activation>
- <jdk>[1.8,12)</jdk>
- </activation>
- <build>
- <directory>${java8_11.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java.sourceDirectory}</source>
- <source>${java8_11.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>jdk12+</id>
- <activation>
- <jdk>[12,)</jdk>
- </activation>
- <build>
- <directory>${java12.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java.sourceDirectory}</source>
- <source>${java12.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <!-- Only multi-release is supported when compiling from higher version to lower -->
- <profile>
- <id>copyJDK12FilesToMultiReleaseJar</id>
- <activation>
- <file>
- <!-- ${java12.build.outputDirectory} does not work here -->
- <exists>target-java12/classes/org/glassfish/jersey/wadl/doclet/ResourceDoclet.class</exists>
- </file>
- <jdk>[1.8,12)</jdk>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <inherited>true</inherited>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Multi-Release>true</Multi-Release>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>copy-jdk12-classes</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${java8_11.build.outputDirectory}/classes/META-INF/versions/12</outputDirectory>
- <resources>
- <resource>
- <directory>${java12.build.outputDirectory}/classes</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-jdk12-sources</id>
- <phase>package</phase>
- <configuration>
- <target>
- <property name="sources-jar" value="${java8_11.build.outputDirectory}/${project.artifactId}-${project.version}-sources.jar"/>
- <echo>sources-jar: ${sources-jar}</echo>
- <zip destfile="${sources-jar}" update="true">
- <zipfileset dir="${java12.sourceDirectory}" prefix="META-INF/versions/12"/>
- </zip>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
<dependencies>
<dependency>
<groupId>jakarta.xml.bind</groupId>
diff --git a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/DocProcessor.java b/ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/DocProcessor.java
similarity index 98%
rename from ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/DocProcessor.java
rename to ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/DocProcessor.java
index feb1f43..d19b49a 100644
--- a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/DocProcessor.java
+++ b/ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/DocProcessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/DocProcessorWrapper.java b/ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/DocProcessorWrapper.java
similarity index 98%
rename from ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/DocProcessorWrapper.java
rename to ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/DocProcessorWrapper.java
index 03407db..fdbf362 100644
--- a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/DocProcessorWrapper.java
+++ b/ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/DocProcessorWrapper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/Loader.java b/ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/Loader.java
similarity index 94%
rename from ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/Loader.java
rename to ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/Loader.java
index 43f2515..27b598d 100644
--- a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/Loader.java
+++ b/ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/Loader.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/OptionClasspath.java b/ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/OptionClasspath.java
similarity index 95%
rename from ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/OptionClasspath.java
rename to ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/OptionClasspath.java
index c11da14..b7f2585 100644
--- a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/OptionClasspath.java
+++ b/ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/OptionClasspath.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/OptionDocprocessor.java b/ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/OptionDocprocessor.java
similarity index 95%
rename from ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/OptionDocprocessor.java
rename to ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/OptionDocprocessor.java
index 1372e8e..f6dbcb8 100644
--- a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/OptionDocprocessor.java
+++ b/ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/OptionDocprocessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/OptionOutput.java b/ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/OptionOutput.java
similarity index 94%
rename from ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/OptionOutput.java
rename to ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/OptionOutput.java
index 822d275..9f16c7b 100644
--- a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/OptionOutput.java
+++ b/ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/OptionOutput.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/ResourceDoclet.java b/ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/ResourceDoclet.java
similarity index 99%
rename from ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/ResourceDoclet.java
rename to ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/ResourceDoclet.java
index 763fb8d..2cd8e07 100644
--- a/ext/wadl-doclet/src/main/java12/org/glassfish/jersey/wadl/doclet/ResourceDoclet.java
+++ b/ext/wadl-doclet/src/main/java/org/glassfish/jersey/wadl/doclet/ResourceDoclet.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -190,7 +190,6 @@
}
result.getDocs().add(classDocType);
success = DocletUtils.createOutputFile(optionOutput.getValue(), docProcessor, result);
-
}
}
} finally {
diff --git a/ext/wadl-doclet/src/main/java8_11/org/glassfish/jersey/wadl/doclet/DocProcessor.java b/ext/wadl-doclet/src/main/java8_11/org/glassfish/jersey/wadl/doclet/DocProcessor.java
deleted file mode 100644
index 962b065..0000000
--- a/ext/wadl-doclet/src/main/java8_11/org/glassfish/jersey/wadl/doclet/DocProcessor.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
- *
- * 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.wadl.doclet;
-
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.ClassDocType;
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.MethodDocType;
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.ParamDocType;
-
-import com.sun.javadoc.ClassDoc;
-import com.sun.javadoc.MethodDoc;
-import com.sun.javadoc.ParamTag;
-import com.sun.javadoc.Parameter;
-
-/**
- * A doc processor is handed over javadoc elements so that it can turn this into
- * resource doc elements, even self defined.
- *
- * @author Martin Grotzke (martin.grotzke at freiheit.com)
- */
-public interface DocProcessor {
-
- /**
- * Specify jaxb classes of instances that you add to the {@code resourcedoc} model.
- * These classes are added to the list of classes when creating the jaxb context
- * with {@code JAXBContext.newInstance( clazzes );}.
- *
- * @return a list of classes or {@code null}
- */
- Class<?>[] getRequiredJaxbContextClasses();
-
- /**
- * specify which of your elements you want to be handled as CDATA.
- * The use of the '^' between the {@code namespaceURI} and the {@code localname}
- * seems to be an implementation detail of the xerces code.
- * When processing xml that doesn't use namespaces, simply omit the
- * namespace prefix as shown in the third CDataElement below.
- *
- * @return an Array of element descriptors or {@code null}
- */
- String[] getCDataElements();
-
- /**
- * Use this method to extend the provided {@link ClassDocType} with the information from
- * the given {@link ClassDoc}.
- *
- * @param classDoc the class javadoc
- * @param classDocType the {@link ClassDocType} to extend. This will later be processed by the
- * {@link org.glassfish.jersey.server.wadl.WadlGenerator}s.
- */
- void processClassDoc(ClassDoc classDoc, ClassDocType classDocType);
-
- /**
- * Process the provided methodDoc and add your custom information to the methodDocType.<br>
- * Use e.g. {@link MethodDocType#getAny()} to store custom elements.
- *
- * @param methodDoc the {@link MethodDoc} representing the docs of your method.
- * @param methodDocType the related {@link MethodDocType} that will later be processed by the
- * {@link org.glassfish.jersey.server.wadl.WadlGenerator}s.
- */
- void processMethodDoc(MethodDoc methodDoc, MethodDocType methodDocType);
-
- /**
- * Use this method to extend the provided {@link ParamDocType} with the information from the
- * given {@link ParamTag} and {@link Parameter}.
- *
- * @param paramTag the parameter javadoc
- * @param parameter the parameter (that is documented or not)
- * @param paramDocType the {@link ParamDocType} to extend. This will later be processed by the
- * {@link org.glassfish.jersey.server.wadl.WadlGenerator}s.
- */
- void processParamTag(ParamTag paramTag, Parameter parameter, ParamDocType paramDocType);
-
-}
diff --git a/ext/wadl-doclet/src/main/java8_11/org/glassfish/jersey/wadl/doclet/DocProcessorWrapper.java b/ext/wadl-doclet/src/main/java8_11/org/glassfish/jersey/wadl/doclet/DocProcessorWrapper.java
deleted file mode 100644
index e982e84..0000000
--- a/ext/wadl-doclet/src/main/java8_11/org/glassfish/jersey/wadl/doclet/DocProcessorWrapper.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
- *
- * 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.wadl.doclet;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.ClassDocType;
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.MethodDocType;
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.ParamDocType;
-
-import com.sun.javadoc.ClassDoc;
-import com.sun.javadoc.MethodDoc;
-import com.sun.javadoc.ParamTag;
-import com.sun.javadoc.Parameter;
-
-/**
- * This {@link DocProcessor} wraps multiple {@code DocProcessor}s.
- *
- * @author Martin Grotzke (martin.grotzke at freiheit.com)
- */
-public class DocProcessorWrapper implements DocProcessor {
-
- private final List<DocProcessor> _docProcessors;
-
- /**
- * Create new {@code DocProcessorWrapper} instance.
- */
- public DocProcessorWrapper() {
- _docProcessors = new ArrayList<>();
- }
-
- /**
- * Add a new {@code DocProcessor} instance to the list of wrapped instances.
- *
- * @param docProcessor {@code DocProcessor} instance to wrap.
- */
- void add(DocProcessor docProcessor) {
- _docProcessors.add(docProcessor);
- }
-
- @Override
- public Class<?>[] getRequiredJaxbContextClasses() {
- final List<Class<?>> result = new ArrayList<>();
- for (DocProcessor docProcessor : _docProcessors) {
- final Class<?>[] requiredJaxbContextClasses = docProcessor.getRequiredJaxbContextClasses();
- if (requiredJaxbContextClasses != null && requiredJaxbContextClasses.length > 0) {
- result.addAll(Arrays.asList(requiredJaxbContextClasses));
- }
- }
- return result.toArray(new Class<?>[result.size()]);
- }
-
- @Override
- public String[] getCDataElements() {
- final List<String> result = new ArrayList<>();
- for (DocProcessor docProcessor : _docProcessors) {
- final String[] cdataElements = docProcessor.getCDataElements();
- if (cdataElements != null && cdataElements.length > 0) {
- result.addAll(Arrays.asList(cdataElements));
- }
- }
- return result.toArray(new String[result.size()]);
- }
-
- @Override
- public void processClassDoc(ClassDoc classDoc, ClassDocType classDocType) {
- for (DocProcessor docProcessor : _docProcessors) {
- docProcessor.processClassDoc(classDoc, classDocType);
- }
- }
-
- @Override
- public void processMethodDoc(MethodDoc methodDoc,
- MethodDocType methodDocType) {
- for (DocProcessor docProcessor : _docProcessors) {
- docProcessor.processMethodDoc(methodDoc, methodDocType);
- }
- }
-
- @Override
- public void processParamTag(ParamTag paramTag, Parameter parameter,
- ParamDocType paramDocType) {
- for (DocProcessor docProcessor : _docProcessors) {
- docProcessor.processParamTag(paramTag, parameter, paramDocType);
- }
- }
-
-}
diff --git a/ext/wadl-doclet/src/main/java8_11/org/glassfish/jersey/wadl/doclet/ResourceDoclet.java b/ext/wadl-doclet/src/main/java8_11/org/glassfish/jersey/wadl/doclet/ResourceDoclet.java
deleted file mode 100644
index 89667c4..0000000
--- a/ext/wadl-doclet/src/main/java8_11/org/glassfish/jersey/wadl/doclet/ResourceDoclet.java
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- * Copyright (c) 2010, 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.wadl.doclet;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.OutputStream;
-import java.io.StringWriter;
-import java.lang.reflect.Array;
-import java.lang.reflect.Field;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.xml.namespace.QName;
-
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.AnnotationDocType;
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.ClassDocType;
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.MethodDocType;
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.NamedValueType;
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.ParamDocType;
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.RepresentationDocType;
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.RequestDocType;
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.ResourceDocType;
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.ResponseDocType;
-import org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.WadlParamType;
-
-import org.apache.xml.serialize.OutputFormat;
-import org.apache.xml.serialize.XMLSerializer;
-
-import com.sun.javadoc.AnnotationDesc;
-import com.sun.javadoc.AnnotationDesc.ElementValuePair;
-import com.sun.javadoc.ClassDoc;
-import com.sun.javadoc.DocErrorReporter;
-import com.sun.javadoc.MemberDoc;
-import com.sun.javadoc.MethodDoc;
-import com.sun.javadoc.ParamTag;
-import com.sun.javadoc.Parameter;
-import com.sun.javadoc.RootDoc;
-import com.sun.javadoc.SeeTag;
-import com.sun.javadoc.Tag;
-
-/**
- * Creates a resourcedoc XML file.
- * <p/>
- * <p>
- * The ResourceDoc file contains the javadoc documentation
- * of resource classes, so that this can be used for extending generated wadl with useful
- * documentation.
- * </p>
- *
- * @author <a href="mailto:martin.grotzke@freiheit.com">Martin Grotzke</a>
- */
-public class ResourceDoclet {
-
- private static final Pattern PATTERN_RESPONSE_REPRESENTATION = Pattern.compile("@response\\.representation\\.([\\d]+)\\..*");
- private static final String OPTION_OUTPUT = "-output";
- private static final String OPTION_CLASSPATH = "-classpath";
- private static final String OPTION_DOC_PROCESSORS = "-processors";
-
- private static final Logger LOG = Logger.getLogger(ResourceDoclet.class.getName());
-
- /**
- * Start the doclet.
- *
- * @param root the root JavaDoc document.
- * @return true if no exception is thrown.
- */
- public static boolean start(final RootDoc root) {
- boolean success = true;
- final String output = getOptionArg(root.options(), OPTION_OUTPUT);
-
- final String classpath = getOptionArg(root.options(), OPTION_CLASSPATH);
- // LOG.info( "Have classpath: " + classpath );
- final String[] classpathElements = classpath.split(File.pathSeparator);
-
- final ClassLoader cl = Thread.currentThread().getContextClassLoader();
- final ClassLoader ncl = new Loader(classpathElements,
- ResourceDoclet.class.getClassLoader());
- Thread.currentThread().setContextClassLoader(ncl);
-
- final String docProcessorOption = getOptionArg(root.options(), OPTION_DOC_PROCESSORS);
- final String[] docProcessors = docProcessorOption != null ? docProcessorOption.split(":") : null;
- final DocProcessorWrapper docProcessor = new DocProcessorWrapper();
- try {
- if (docProcessors != null && docProcessors.length > 0) {
- final Class<?> clazz = Class.forName(docProcessors[0], true, Thread.currentThread().getContextClassLoader());
- final Class<? extends DocProcessor> dpClazz = clazz.asSubclass(DocProcessor.class);
- docProcessor.add(dpClazz.newInstance());
- }
- } catch (final Exception e) {
- LOG.log(Level.SEVERE, "Could not load docProcessors " + docProcessorOption, e);
- }
-
- try {
- final ResourceDocType result = new ResourceDocType();
-
- final ClassDoc[] classes = root.classes();
- for (final ClassDoc classDoc : classes) {
- LOG.fine("Writing class " + classDoc.qualifiedTypeName());
- final ClassDocType classDocType = new ClassDocType();
- classDocType.setClassName(classDoc.qualifiedTypeName());
- classDocType.setCommentText(classDoc.commentText());
- docProcessor.processClassDoc(classDoc, classDocType);
-
- for (final MethodDoc methodDoc : classDoc.methods()) {
-
- final MethodDocType methodDocType = new MethodDocType();
- methodDocType.setMethodName(methodDoc.name());
- methodDocType.setMethodSignature(methodDoc.signature());
- methodDocType.setCommentText(methodDoc.commentText());
- docProcessor.processMethodDoc(methodDoc, methodDocType);
-
- addParamDocs(methodDoc, methodDocType, docProcessor);
-
- addRequestRepresentationDoc(methodDoc, methodDocType);
-
- addResponseDoc(methodDoc, methodDocType);
-
- classDocType.getMethodDocs().add(methodDocType);
- }
-
- result.getDocs().add(classDocType);
- }
-
- success = DocletUtils.createOutputFile(output, docProcessor, result);
- } finally {
- Thread.currentThread().setContextClassLoader(cl);
- }
-
- return success;
- }
-
- private static void addResponseDoc(final MethodDoc methodDoc,
- final MethodDocType methodDocType) {
-
- final ResponseDocType responseDoc = new ResponseDocType();
-
- final Tag returnTag = getSingleTagOrNull(methodDoc, "return");
- if (returnTag != null) {
- responseDoc.setReturnDoc(returnTag.text());
- }
-
- final Tag[] responseParamTags = methodDoc.tags("response.param");
- for (final Tag responseParamTag : responseParamTags) {
- // LOG.info( "Have responseparam tag: " + print( responseParamTag ) );
- final WadlParamType wadlParam = new WadlParamType();
- for (final Tag inlineTag : responseParamTag.inlineTags()) {
- final String tagName = inlineTag.name();
- final String tagText = inlineTag.text();
- /* skip empty tags
- */
- if (isEmpty(tagText)) {
- if (LOG.isLoggable(Level.FINE)) {
- LOG.fine("Skipping empty inline tag of @response.param in method "
- + methodDoc.qualifiedName() + ": " + tagName);
- }
- continue;
- }
- switch (tagName) {
- case "@name":
- wadlParam.setName(tagText);
- break;
- case "@style":
- wadlParam.setStyle(tagText);
- break;
- case "@type":
- wadlParam.setType(QName.valueOf(tagText));
- break;
- case "@doc":
- wadlParam.setDoc(tagText);
- break;
- default:
- LOG.warning("Unknown inline tag of @response.param in method "
- + methodDoc.qualifiedName() + ": " + tagName
- + " (value: " + tagText + ")");
- break;
- }
- }
- responseDoc.getWadlParams().add(wadlParam);
- }
-
- final Map<String, List<Tag>> tagsByStatus = getResponseRepresentationTags(methodDoc);
- for (final Entry<String, List<Tag>> entry : tagsByStatus.entrySet()) {
- final RepresentationDocType representationDoc = new RepresentationDocType();
- representationDoc.setStatus(Long.valueOf(entry.getKey()));
- for (final Tag tag : entry.getValue()) {
- if (tag.name().endsWith(".qname")) {
- representationDoc.setElement(QName.valueOf(tag.text()));
- } else if (tag.name().endsWith(".mediaType")) {
- representationDoc.setMediaType(tag.text());
- } else if (tag.name().endsWith(".example")) {
- representationDoc.setExample(getSerializedExample(tag));
- } else if (tag.name().endsWith(".doc")) {
- representationDoc.setDoc(tag.text());
- } else {
- LOG.warning("Unknown response representation tag " + tag.name());
- }
- }
- responseDoc.getRepresentations().add(representationDoc);
- }
-
- methodDocType.setResponseDoc(responseDoc);
- }
-
- private static boolean isEmpty(final String value) {
- return value == null || value.isEmpty() || value.trim().isEmpty();
- }
-
- private static void addRequestRepresentationDoc(final MethodDoc methodDoc,
- final MethodDocType methodDocType) {
- final Tag requestElement = getSingleTagOrNull(methodDoc, "request.representation.qname");
- final Tag requestExample = getSingleTagOrNull(methodDoc, "request.representation.example");
- if (requestElement != null || requestExample != null) {
- final RequestDocType requestDoc = new RequestDocType();
- final RepresentationDocType representationDoc = new RepresentationDocType();
-
- /* requestElement exists
- */
- if (requestElement != null) {
- representationDoc.setElement(QName.valueOf(requestElement.text()));
- }
-
- /* requestExample exists
- */
- if (requestExample != null) {
- final String example = getSerializedExample(requestExample);
- if (!isEmpty(example)) {
- representationDoc.setExample(example);
- } else {
- LOG.warning("Could not get serialized example for method " + methodDoc.qualifiedName());
- }
- }
-
- requestDoc.setRepresentationDoc(representationDoc);
- methodDocType.setRequestDoc(requestDoc);
- }
- }
-
- private static Map<String, List<Tag>> getResponseRepresentationTags(final MethodDoc methodDoc) {
- final Map<String, List<Tag>> tagsByStatus = new HashMap<>();
- for (final Tag tag : methodDoc.tags()) {
- final Matcher matcher = PATTERN_RESPONSE_REPRESENTATION.matcher(tag.name());
- if (matcher.matches()) {
- final String status = matcher.group(1);
- List<Tag> tags = tagsByStatus.get(status);
- if (tags == null) {
- tags = new ArrayList<>();
- tagsByStatus.put(status, tags);
- }
- tags.add(tag);
- }
- }
- return tagsByStatus;
- }
-
- /**
- * Searches an <code>@link</code> tag within the inline tags of the specified tag
- * and serializes the referenced instance.
- *
- * @param tag the tag containing the inline tags to be searched.
- * @return the {@code String} representation of the {@link com.sun.javadoc.Tag} or null if the parameter is null.
- */
- private static String getSerializedExample(final Tag tag) {
- if (tag != null) {
- final Tag[] inlineTags = tag.inlineTags();
- if (inlineTags != null && inlineTags.length > 0) {
- for (final Tag inlineTag : inlineTags) {
- if (LOG.isLoggable(Level.FINE)) {
- LOG.fine("Have inline tag: " + print(inlineTag));
- }
- if ("@link".equals(inlineTag.name())) {
- if (LOG.isLoggable(Level.FINE)) {
- LOG.fine("Have link: " + print(inlineTag));
- }
- final SeeTag linkTag = (SeeTag) inlineTag;
- return getSerializedLinkFromTag(linkTag);
- } else if (!isEmpty(inlineTag.text())) {
- return inlineTag.text();
- }
- }
- } else {
- LOG.fine("Have example: " + print(tag));
- return tag.text();
- }
- }
- return null;
- }
-
- private static Tag getSingleTagOrNull(final MethodDoc methodDoc, final String tagName) {
- final Tag[] tags = methodDoc.tags(tagName);
- if (tags != null && tags.length == 1) {
- return tags[0];
- }
- return null;
- }
-
- private static void addParamDocs(final MethodDoc methodDoc,
- final MethodDocType methodDocType,
- final DocProcessor docProcessor) {
- final Parameter[] parameters = methodDoc.parameters();
- final ParamTag[] paramTags = methodDoc.paramTags();
-
- /* only use both javadoc and reflection information when the number
- * of params are the same
- */
- if (parameters != null && paramTags != null
- && parameters.length == paramTags.length) {
-
- for (int i = 0; i < parameters.length; i++) {
- final Parameter parameter = parameters[i];
-
- /* TODO: this only works if the params and tags are in the same
- * order. If the param tags are mixed up, the comments for parameters
- * will be wrong.
- */
- final ParamTag paramTag = paramTags[i];
-
- final ParamDocType paramDocType = new ParamDocType();
- paramDocType.setParamName(paramTag.parameterName());
- paramDocType.setCommentText(paramTag.parameterComment());
- docProcessor.processParamTag(paramTag, parameter, paramDocType);
-
- final AnnotationDesc[] annotations = parameter.annotations();
- if (annotations != null) {
- for (final AnnotationDesc annotationDesc : annotations) {
- final AnnotationDocType annotationDocType = new AnnotationDocType();
- final String typeName = annotationDesc.annotationType().qualifiedName();
- annotationDocType.setAnnotationTypeName(typeName);
- for (final ElementValuePair elementValuePair : annotationDesc.elementValues()) {
- final NamedValueType namedValueType = new NamedValueType();
- namedValueType.setName(elementValuePair.element().name());
- namedValueType.setValue(elementValuePair.value().value().toString());
- annotationDocType.getAttributeDocs().add(namedValueType);
- }
- paramDocType.getAnnotationDocs().add(annotationDocType);
- }
- }
-
- methodDocType.getParamDocs().add(paramDocType);
-
- }
-
- }
- }
-
- private static String getSerializedLinkFromTag(final SeeTag linkTag) {
- final MemberDoc referencedMember = linkTag.referencedMember();
-
- if (referencedMember == null) {
- throw new NullPointerException("Referenced member of @link " + print(linkTag) + " cannot be resolved.");
- }
-
- if (!referencedMember.isStatic()) {
- LOG.warning("Referenced member of @link " + print(linkTag) + " is not static."
- + " Right now only references to static members are supported.");
- return null;
- }
-
- /* Get referenced example bean
- */
- final ClassDoc containingClass = referencedMember.containingClass();
- return DocletUtils.getLinkClass(containingClass.qualifiedName(), referencedMember.name());
- }
-
- private static String print(final Tag tag) {
- return String.valueOf(tag.getClass()) + "["
- + "firstSentenceTags=" + toCSV(tag.firstSentenceTags())
- + ", inlineTags=" + toCSV(tag.inlineTags())
- + ", kind=" + tag.kind()
- + ", name=" + tag.name()
- + ", text=" + tag.text()
- + "]";
- }
-
- static String toCSV(final Tag[] items) {
- if (items == null) {
- return null;
- }
- return toCSV(Arrays.asList(items));
- }
-
- static String toCSV(final Collection<Tag> items) {
- return toCSV(items, ", ", null);
- }
-
- static String toCSV(final Collection<Tag> items, final String separator, final String delimiter) {
- if (items == null) {
- return null;
- }
- if (items.isEmpty()) {
- return "";
- }
- final StringBuilder sb = new StringBuilder();
- for (final Iterator<Tag> iter = items.iterator(); iter.hasNext(); ) {
- if (delimiter != null) {
- sb.append(delimiter);
- }
- final Tag item = iter.next();
- sb.append(item.name());
- if (delimiter != null) {
- sb.append(delimiter);
- }
- if (iter.hasNext()) {
- sb.append(separator);
- }
- }
- return sb.toString();
- }
-
- /**
- * Return array length for given option: 1 + the number of arguments that
- * the option takes.
- *
- * @param option option
- * @return the number of args for the specified option
- */
- public static int optionLength(final String option) {
- LOG.fine("Invoked with option " + option);
-
- if (OPTION_OUTPUT.equals(option)
- || OPTION_CLASSPATH.equals(option)
- || OPTION_DOC_PROCESSORS.equals(option)) {
- return 2;
- }
-
- return 0;
- }
-
- /**
- * Validate options.
- *
- * @param options options to be validated
- * @param reporter {@link com.sun.javadoc.DocErrorReporter} for collecting eventual errors
- * @return if the specified options are valid
- */
- public static boolean validOptions(final String[][] options, final DocErrorReporter reporter) {
- return validOption(OPTION_OUTPUT, "<path-to-file>", options, reporter)
- && validOption(OPTION_CLASSPATH, "<path>", options, reporter);
- }
-
- private static boolean validOption(final String optionName,
- final String reportOptionName,
- final String[][] options,
- final DocErrorReporter reporter) {
- final String option = getOptionArg(options, optionName);
-
- final boolean foundOption = option != null && !option.trim().isEmpty();
- if (!foundOption) {
- reporter.printError(optionName + " " + reportOptionName + " must be specified.");
- }
- return foundOption;
- }
-
- private static String getOptionArg(final String[][] options, final String option) {
-
- for (final String[] opt : options) {
- if (opt[0].equals(option)) {
- return opt[1];
- }
- }
-
- return null;
- }
-
- static class Loader extends URLClassLoader {
-
- public Loader(final String[] paths, final ClassLoader parent) {
- super(getURLs(paths), parent);
- }
-
- Loader(final String[] paths) {
- super(getURLs(paths));
- }
-
- private static URL[] getURLs(final String[] paths) {
- final List<URL> urls = new ArrayList<>();
- for (final String path : paths) {
- try {
- urls.add(new File(path).toURI().toURL());
- } catch (final MalformedURLException e) {
- throw new RuntimeException(e);
- }
- }
- return urls.toArray(new URL[urls.size()]);
- }
-
- }
-
-}
diff --git a/pom.xml b/pom.xml
index c779155..ad0c7c9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2295,7 +2295,7 @@
<guava.version>31.1-jre</guava.version>
<hamcrest.version>2.2</hamcrest.version>
- <helidon.jersey.connector.version>3.0.2</helidon.jersey.connector.version>
+ <helidon.jersey.connector.version>3.2.5</helidon.jersey.connector.version>
<xmlunit.version>2.9.1</xmlunit.version>
<httpcore.version>4.4.16</httpcore.version>
<httpclient.version>4.5.14</httpclient.version>
diff --git a/test-framework/providers/jetty-http2/pom.xml b/test-framework/providers/jetty-http2/pom.xml
index 20a49c4..50c0b4a 100644
--- a/test-framework/providers/jetty-http2/pom.xml
+++ b/test-framework/providers/jetty-http2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
+ 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
@@ -31,13 +31,6 @@
<description>Jersey Test Framework - Jetty HTTP2 container</description>
- <properties>
- <java11.build.outputDirectory>${project.basedir}/target</java11.build.outputDirectory>
- <java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory>
- <java17.build.outputDirectory>${project.basedir}/target17</java17.build.outputDirectory>
- <java17.sourceDirectory>${project.basedir}/src/main/java17</java17.sourceDirectory>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.test-framework</groupId>
@@ -51,144 +44,4 @@
</dependency>
</dependencies>
- <profiles>
- <profile>
- <id>JettyExclude</id>
- <activation>
- <jdk>[11,17)</jdk>
- </activation>
- <properties>
- <jetty.version>${jetty11.version}</jetty.version>
- </properties>
- <build>
- <directory>${java11.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java11.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <testExcludes>
- <testExclude>org/glassfish/jersey/test/jetty/http2/*.java</testExclude>
- </testExcludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>Jetty17</id>
- <activation>
- <jdk>[17,)</jdk>
- </activation>
- <build>
- <directory>${java17.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java17.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>copyJDK17FilesToMultiReleaseJar</id>
- <activation>
- <file>
- <!-- ${java11.build.outputDirectory} does not work here -->
- <exists>target17/classes/org/glassfish/jersey/test/jetty/http2/JettyHttp2TestContainerFactory.class</exists>
- </file>
- <jdk>[11,17)</jdk>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <inherited>true</inherited>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Multi-Release>true</Multi-Release>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>copy-jdk17-classes</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${java11.build.outputDirectory}/classes/META-INF/versions/17</outputDirectory>
- <resources>
- <resource>
- <directory>${java17.build.outputDirectory}/classes</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-jdk17-sources</id>
- <phase>package</phase>
- <configuration>
- <target>
- <property name="sources-jar" value="${java11.build.outputDirectory}/${project.artifactId}-${project.version}-sources.jar"/>
- <echo>sources-jar: ${sources-jar}</echo>
- <zip destfile="${sources-jar}" update="true">
- <zipfileset dir="${java17.sourceDirectory}" prefix="META-INF/versions/17"/>
- </zip>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
</project>
\ No newline at end of file
diff --git a/test-framework/providers/jetty-http2/src/main/java17/org/glassfish/jersey/test/jetty/http2/JettyHttp2TestContainerFactory.java b/test-framework/providers/jetty-http2/src/main/java/org/glassfish/jersey/test/jetty/http2/JettyHttp2TestContainerFactory.java
similarity index 98%
rename from test-framework/providers/jetty-http2/src/main/java17/org/glassfish/jersey/test/jetty/http2/JettyHttp2TestContainerFactory.java
rename to test-framework/providers/jetty-http2/src/main/java/org/glassfish/jersey/test/jetty/http2/JettyHttp2TestContainerFactory.java
index e63f057..b132dc1 100644
--- a/test-framework/providers/jetty-http2/src/main/java17/org/glassfish/jersey/test/jetty/http2/JettyHttp2TestContainerFactory.java
+++ b/test-framework/providers/jetty-http2/src/main/java/org/glassfish/jersey/test/jetty/http2/JettyHttp2TestContainerFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
+ * 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
diff --git a/test-framework/providers/jetty-http2/src/main/java11/org/glassfish/jersey/test/jetty/http2/JettyHttp2TestContainerFactory.java b/test-framework/providers/jetty-http2/src/main/java11/org/glassfish/jersey/test/jetty/http2/JettyHttp2TestContainerFactory.java
deleted file mode 100644
index 44fa02a..0000000
--- a/test-framework/providers/jetty-http2/src/main/java11/org/glassfish/jersey/test/jetty/http2/JettyHttp2TestContainerFactory.java
+++ /dev/null
@@ -1,36 +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.jetty.http2;
-
-import jakarta.ws.rs.ProcessingException;
-import org.glassfish.jersey.jetty.http2.LocalizationMessages;
-import org.glassfish.jersey.test.DeploymentContext;
-import org.glassfish.jersey.test.spi.TestContainer;
-import org.glassfish.jersey.test.spi.TestContainerFactory;
-
-import java.net.URI;
-/**
- * Factory for testing {@link JettyHttp2ContainerFactory}.
- *
- */
-public final class JettyHttp2TestContainerFactory implements TestContainerFactory {
-
- @Override
- public TestContainer create(final URI baseUri, final DeploymentContext context) throws IllegalArgumentException {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-}
diff --git a/test-framework/providers/jetty-http2/src/main/resources/org/glassfish/jersey/test/jetty11/http2/localization.properties b/test-framework/providers/jetty-http2/src/main/resources/org/glassfish/jersey/test/jetty11/http2/localization.properties
deleted file mode 100644
index f10b03c..0000000
--- a/test-framework/providers/jetty-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/jetty/pom.xml b/test-framework/providers/jetty/pom.xml
index 3aeccfb..77394b2 100644
--- a/test-framework/providers/jetty/pom.xml
+++ b/test-framework/providers/jetty/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -49,151 +49,4 @@
</dependency>
</dependencies>
- <properties>
- <java11.build.outputDirectory>${project.basedir}/target</java11.build.outputDirectory>
- <java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory>
- <java17.build.outputDirectory>${project.basedir}/target17</java17.build.outputDirectory>
- <java17.sourceDirectory>${project.basedir}/src/main/java17</java17.sourceDirectory>
- </properties>
-
- <profiles>
- <profile>
- <id>JettyExclude</id>
- <activation>
- <jdk>[11,17)</jdk>
- </activation>
- <properties>
- <jetty.version>${jetty11.version}</jetty.version>
- </properties>
- <build>
- <directory>${java11.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java11.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <testExcludes>
- <testExclude>org/glassfish/jersey/test/jetty/*.java</testExclude>
- </testExcludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>Jetty17</id>
- <activation>
- <jdk>[17,)</jdk>
- </activation>
- <build>
- <directory>${java17.build.outputDirectory}</directory>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${java17.sourceDirectory}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>copyJDK17FilesToMultiReleaseJar</id>
- <activation>
- <file>
- <!-- ${java11.build.outputDirectory} does not work here -->
- <exists>target17/classes/org/glassfish/jersey/test/jetty/JettyTestContainerFactory.class</exists>
- </file>
- <jdk>[11,17)</jdk>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <inherited>true</inherited>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Multi-Release>true</Multi-Release>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>copy-jdk17-classes</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${java11.build.outputDirectory}/classes/META-INF/versions/17</outputDirectory>
- <resources>
- <resource>
- <directory>${java17.build.outputDirectory}/classes</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-jdk17-sources</id>
- <phase>package</phase>
- <configuration>
- <target>
- <property name="sources-jar" value="${java11.build.outputDirectory}/${project.artifactId}-${project.version}-sources.jar"/>
- <echo>sources-jar: ${sources-jar}</echo>
- <zip destfile="${sources-jar}" update="true">
- <zipfileset dir="${java17.sourceDirectory}" prefix="META-INF/versions/17"/>
- </zip>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
+</project>
\ No newline at end of file
diff --git a/test-framework/providers/jetty/src/main/java17/org/glassfish/jersey/test/jetty/JettyTestContainerFactory.java b/test-framework/providers/jetty/src/main/java/org/glassfish/jersey/test/jetty/JettyTestContainerFactory.java
similarity index 98%
rename from test-framework/providers/jetty/src/main/java17/org/glassfish/jersey/test/jetty/JettyTestContainerFactory.java
rename to test-framework/providers/jetty/src/main/java/org/glassfish/jersey/test/jetty/JettyTestContainerFactory.java
index de1ba2c..5c35746 100644
--- a/test-framework/providers/jetty/src/main/java17/org/glassfish/jersey/test/jetty/JettyTestContainerFactory.java
+++ b/test-framework/providers/jetty/src/main/java/org/glassfish/jersey/test/jetty/JettyTestContainerFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/test-framework/providers/jetty/src/main/java11/org/glassfish/jersey/test/jetty/JettyTestContainerFactory.java b/test-framework/providers/jetty/src/main/java11/org/glassfish/jersey/test/jetty/JettyTestContainerFactory.java
deleted file mode 100644
index 1632869..0000000
--- a/test-framework/providers/jetty/src/main/java11/org/glassfish/jersey/test/jetty/JettyTestContainerFactory.java
+++ /dev/null
@@ -1,33 +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.jetty;
-
-import jakarta.ws.rs.ProcessingException;
-import org.glassfish.jersey.jetty.internal.LocalizationMessages;
-import org.glassfish.jersey.test.DeploymentContext;
-import org.glassfish.jersey.test.spi.TestContainer;
-import org.glassfish.jersey.test.spi.TestContainerFactory;
-
-import java.net.URI;
-
-public class JettyTestContainerFactory implements TestContainerFactory {
-
- @Override
- public TestContainer create(final URI baseUri, final DeploymentContext context) throws IllegalArgumentException {
- throw new ProcessingException(LocalizationMessages.NOT_SUPPORTED());
- }
-}
diff --git a/test-framework/providers/jetty/src/main/resources/org/glassfish/jersey/jetty/internal/localization.properties b/test-framework/providers/jetty/src/main/resources/org/glassfish/jersey/jetty/internal/localization.properties
deleted file mode 100644
index 6504f0e..0000000
--- a/test-framework/providers/jetty/src/main/resources/org/glassfish/jersey/jetty/internal/localization.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright (c) 2020, 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.