Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ name: "Validate"
on: [pull_request, push]

env:
JAVA_VERSION: '17'
JAVA_VERSION: '21'
JAVA_DISTRO: 'temurin'

concurrency:
Expand Down
2 changes: 1 addition & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ KineticJS, v4.7.1
* Project: http://www.kineticjs.com, https://github.com/ericdrowell/KineticJS
* Copyright: Eric Rowell

org.objectweb.asm Version 9.9
org.objectweb.asm Version 9.9.1
* License: Modified BSD (https://asm.ow2.io/license.html)
* Copyright (c) 2000-2011 INRIA, France Telecom. All rights reserved.

Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.7.2</version>
<version>1.7.3</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

package org.glassfish.jersey.jetty.connector;

import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.core.Configuration;
import jakarta.ws.rs.core.MultivaluedMap;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.FilterInputStream;
Expand All @@ -39,27 +44,31 @@
import java.util.logging.Level;
import java.util.logging.Logger;

import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.core.Configuration;
import jakarta.ws.rs.core.MultivaluedMap;

import javax.net.ssl.SSLContext;

import org.eclipse.jetty.client.AuthenticationStore;
import org.eclipse.jetty.client.BasicAuthentication;
import org.eclipse.jetty.client.ByteBufferRequestContent;
import org.eclipse.jetty.client.CompletableResponseListener;
import org.eclipse.jetty.client.ContentResponse;
import org.eclipse.jetty.client.FutureResponseListener;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.HttpClientTransport;
import org.eclipse.jetty.client.HttpProxy;
import org.eclipse.jetty.client.OutputStreamRequestContent;
import org.eclipse.jetty.client.ProxyConfiguration;
import org.eclipse.jetty.client.Request;
import org.eclipse.jetty.client.Response;
import org.eclipse.jetty.client.Result;
import org.eclipse.jetty.client.transport.HttpClientTransportOverHTTP;
import org.eclipse.jetty.client.transport.HttpRequest;
import org.eclipse.jetty.http.HttpCookieStore;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.util.Jetty;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.ClientRequest;
import org.glassfish.jersey.client.ClientResponse;
Expand All @@ -72,16 +81,6 @@
import org.glassfish.jersey.message.internal.OutboundMessageContext;
import org.glassfish.jersey.message.internal.Statuses;

import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.HttpProxy;
import org.eclipse.jetty.client.ProxyConfiguration;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.util.Jetty;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.util.thread.QueuedThreadPool;

/**
* A {@link Connector} that utilizes the Jetty HTTP Client to send and receive
* HTTP request and responses.
Expand Down Expand Up @@ -294,10 +293,11 @@ public ClientResponse apply(final ClientRequest jerseyRequest) throws Processing
jettyResponse = jettyRequest.send();
}
else {
final FutureResponseListener listener
= new FutureResponseListener(jettyRequest, syncListenerResponseMaxSize.get());
jettyRequest.send(listener);
jettyResponse = listener.get();
jettyResponse = new CompletableResponseListener(
jettyRequest,
syncListenerResponseMaxSize.get())
.send()
.get();
}
HeaderUtils.checkHeaderChanges(clientHeadersSnapshot, jerseyRequest.getHeaders(),
JettyConnector.this.getClass().getName(), jerseyRequest.getConfiguration());
Expand Down
90 changes: 45 additions & 45 deletions core-server/src/main/resources/META-INF/NOTICE.markdown
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
# Notice for Jersey Core Server module
This content is produced and maintained by the Eclipse Jersey project.
* https://projects.eclipse.org/projects/ee4j.jersey
## Trademarks
Eclipse Jersey is a trademark of the Eclipse Foundation.
## Copyright
All content is the property of the respective authors or their employers. For
more information regarding authorship of content, please consult the listed
source code repository logs.
## Declared Project Licenses
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
## Source Code
The project maintains the following source code repositories:
* https://github.com/eclipse-ee4j/jersey
## Third-party Content
org.glassfish.jersey.server.internal.monitoring.core
* License: Apache License, 2.0
* Copyright (c) 2015-2018 Oracle and/or its affiliates. All rights reserved.
* Copyright 2010-2013 Coda Hale and Yammer, Inc.
org.objectweb.asm Version 9.9
* License: Modified BSD (https://asm.ow2.io/license.html)
* Copyright: (c) 2000-2011 INRIA, France Telecom. All rights reserved.
W3.org documents
* License: W3C License
* Copyright: Copyright (c) 1994-2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/
# Notice for Jersey Core Server module
This content is produced and maintained by the Eclipse Jersey project.

* https://projects.eclipse.org/projects/ee4j.jersey

## Trademarks
Eclipse Jersey is a trademark of the Eclipse Foundation.

## Copyright

All content is the property of the respective authors or their employers. For
more information regarding authorship of content, please consult the listed
source code repository logs.

## Declared Project Licenses

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

## Source Code
The project maintains the following source code repositories:

* https://github.com/eclipse-ee4j/jersey

## Third-party Content

org.glassfish.jersey.server.internal.monitoring.core
* License: Apache License, 2.0
* Copyright (c) 2015-2018 Oracle and/or its affiliates. All rights reserved.
* Copyright 2010-2013 Coda Hale and Yammer, Inc.

org.objectweb.asm Version 9.9.1
* License: Modified BSD (https://asm.ow2.io/license.html)
* Copyright: (c) 2000-2011 INRIA, France Telecom. All rights reserved.

W3.org documents
* License: W3C License
* Copyright: Copyright (c) 1994-2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/
2 changes: 1 addition & 1 deletion examples/NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ KineticJS, v4.7.1
* Project: http://www.kineticjs.com, https://github.com/ericdrowell/KineticJS
* Copyright: Eric Rowell

org.objectweb.asm Version 9.9
org.objectweb.asm Version 9.9.1
* License: Modified BSD (https://asm.ow2.io/license.html)
* Copyright (c) 2000-2011 INRIA, France Telecom. All rights reserved.

Expand Down
2 changes: 1 addition & 1 deletion incubator/html-json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</description>

<properties>
<net.java.html.version>1.8.1</net.java.html.version>
<net.java.html.version>1.8.2</net.java.html.version>
<enforcer.skip>true</enforcer.skip>
<surefire.coverage.argline>
--add-exports org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED
Expand Down
24 changes: 14 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.9.6</version>
</requireMavenVersion>
<requireJavaVersion>
<version>${java.version}</version>
</requireJavaVersion>
Expand Down Expand Up @@ -1861,7 +1864,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
<version>${jackson.version2}</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -2196,8 +2199,8 @@
<mvn.ant.version>1.10.15</mvn.ant.version>
<assembly.mvn.plugin.version>3.7.1</assembly.mvn.plugin.version>
<clean.mvn.plugin.version>3.5.0</clean.mvn.plugin.version>
<enforcer.mvn.plugin.version>3.6.1</enforcer.mvn.plugin.version>
<exec.mvn.plugin.version>3.5.1</exec.mvn.plugin.version>
<enforcer.mvn.plugin.version>3.6.2</enforcer.mvn.plugin.version>
<exec.mvn.plugin.version>3.6.3</exec.mvn.plugin.version>
<buildhelper.mvn.plugin.version>3.6.1</buildhelper.mvn.plugin.version>
<buildnumber.mvn.plugin.version>3.2.1</buildnumber.mvn.plugin.version>
<checkstyle.mvn.plugin.version>3.6.0</checkstyle.mvn.plugin.version>
Expand All @@ -2207,7 +2210,7 @@
<dependency.mvn.plugin.version>3.8.1</dependency.mvn.plugin.version>
<deploy.mvn.plugin.version>3.1.4</deploy.mvn.plugin.version>
<ear.mvn.plugin.version>3.4.0</ear.mvn.plugin.version>
<failsafe.mvn.plugin.version>3.5.3</failsafe.mvn.plugin.version>
<failsafe.mvn.plugin.version>3.5.5</failsafe.mvn.plugin.version>
<felix.mvn.plugin.version>5.1.9</felix.mvn.plugin.version> <!-- newer versions are not supported by JDK 11- -->
<findbugs.mvn.plugin.version>3.0.5</findbugs.mvn.plugin.version>
<gfembedded.mvn.plugin.version>5.1</gfembedded.mvn.plugin.version>
Expand All @@ -2221,7 +2224,7 @@
<resources.mvn.plugin.version>3.3.1</resources.mvn.plugin.version>
<shade.mvn.plugin.version>3.6.0</shade.mvn.plugin.version>
<source.mvn.plugin.version>3.3.1</source.mvn.plugin.version>
<surefire.mvn.plugin.version>3.5.3</surefire.mvn.plugin.version>
<surefire.mvn.plugin.version>3.5.5</surefire.mvn.plugin.version>
<war.mvn.plugin.version>3.4.0</war.mvn.plugin.version>
<wiremock.mvn.plugin.version>2.11.0</wiremock.mvn.plugin.version>
<xml.mvn.plugin.version>1.1.0</xml.mvn.plugin.version>
Expand All @@ -2234,7 +2237,7 @@
<arquillian.weld.version>4.0.0.Final</arquillian.weld.version> <!-- 3.0.2.Final fails microprofile TCK tests -->
<!-- asm is now source integrated - keeping this property to see the version -->
<!-- see core-server/src/main/java/jersey/repackaged/asm/.. -->
<asm.version>9.9</asm.version>
<asm.version>9.9.1</asm.version>
<!--required for spring (ext) modules integration -->
<aspectj.weaver.version>1.9.24</aspectj.weaver.version>
<bouncycastle.version>1.70</bouncycastle.version>
Expand Down Expand Up @@ -2275,6 +2278,7 @@
<httpclient.version>4.5.14</httpclient.version>
<httpclient5.version>5.5</httpclient5.version>
<jackson.version>2.19.1</jackson.version>
<jackson.version2>2.19.1</jackson.version2>
<javassist.version>3.30.2-GA</javassist.version>
<jettison.version>1.3.7</jettison.version> <!-- TODO: 1.3.8 doesn't work; AbstractJsonTest complexBeanWithAttributes -->
<jboss.vfs.version>3.3.2.Final</jboss.vfs.version>
Expand Down Expand Up @@ -2325,7 +2329,7 @@
<cdi.api.version>5.0.0.Alpha3</cdi.api.version>
<cdi.osgi.version>jakarta.enterprise.*;version="[4.0,6)"</cdi.osgi.version>
<ejb.version>4.0.1</ejb.version>
<grizzly2.version>4.0.2</grizzly2.version>
<grizzly2.version>5.0.0</grizzly2.version>
<grizzly.client.version>1.16</grizzly.client.version>
<grizzly.npn.version>2.0.0</grizzly.npn.version>
<hk2.version>4.0.0-M3</hk2.version>
Expand Down Expand Up @@ -2353,13 +2357,13 @@
<jakarta.jsonp.version>2.1.3</jakarta.jsonp.version>
<jakarta.persistence.version>4.0.0-M1</jakarta.persistence.version>
<jakarta.validation.api.version>4.0.0-M1</jakarta.validation.api.version>
<jakarta.jaxb.api.version>4.0.2</jakarta.jaxb.api.version>
<jaxb.ri.version>4.0.5</jaxb.ri.version>
<jakarta.jaxb.api.version>4.0.5</jakarta.jaxb.api.version>
<jaxb.ri.version>4.0.6</jaxb.ri.version>
<jaxrs.api.spec.version>4.0.0</jaxrs.api.spec.version>
<jaxrs.api.impl.version>4.0.0</jaxrs.api.impl.version>
<jakarta.rest.osgi.version>jakarta.ws.rs;version="[3.1,5)",jakarta.ws.rs.client;version="[3.1,5)",jakarta.ws.rs.container;version="[3.1,5)",jakarta.ws.rs.core;version="[3.1,5)",jakarta.ws.rs.ext;version="[3.1,5)",jakarta.ws.rs.sse;version="[3.1,5)"</jakarta.rest.osgi.version>
<jetty.osgi.version>org.eclipse.jetty.*;version="[11,15)"</jetty.osgi.version>
<jetty.version>12.0.27</jetty.version>
<jetty.version>12.1.7</jetty.version>
<jetty9.version>9.4.58.v20250814</jetty9.version>
<jetty.servlet.api.version>5.0.2</jetty.servlet.api.version>
<jetty11.version>11.0.26</jetty11.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,49 @@

import org.apache.maven.model.Dependency;
import org.apache.maven.model.Model;
import org.junit.Assert;
import org.junit.Test;

import static org.glassfish.jersey.test.artifacts.MavenUtil.getModelFromFile;
import static org.junit.Assert.assertEquals;

// We test that org.ow2.asm:asm and org.eclipse.persistence:org.eclipse.persistence.asm are to some degree
// equal.
//
// It's not exactly clear what the tolerance is, and why we are checking this.
public class MoxyAsmTest {

@Test
public void testAsmInMoxy() throws Exception {
String moxyPomFile = "../../media/moxy/pom.xml";
Model moxyPom = MavenUtil.getModelFromFile(moxyPomFile);
final Dependency moxyAsmDependency = moxyPom.getDependencies().stream()
Dependency moxyAsmDependency =
getModelFromFile("../../media/moxy/pom.xml")
.getDependencies()
.stream()
.filter(dependency -> dependency.getArtifactId().equals("org.eclipse.persistence.asm"))
.findFirst().get();

Model projectPom = MavenUtil.getModelFromFile("../../pom.xml");
final String asmVersion = projectPom.getProperties().getProperty("asm.version");
final String moxyAsmVersion = findVersionInModel(moxyAsmDependency.getVersion(), projectPom);

final String lastTwo = moxyAsmVersion.substring(moxyAsmVersion.length() - 2);
final String msg = "org.eclipse.persistence.asm version " + moxyAsmVersion
+ " differs from asm version " + asmVersion + " in /media/moxy/pom.xml";
Assert.assertEquals(msg, asmVersion + lastTwo, moxyAsmVersion);
// org.ow2.asm:asm can be 9.9 or 9.9.1
String asmVersion = projectPom.getProperties().getProperty("asm.version").substring(0, 4);

// org.eclipse.persistence:org.eclipse.persistence.asm can be 9.7.1, 9.8.0, 9.9.1
String moxyAsmVersion = findVersionInModel(moxyAsmDependency.getVersion(), projectPom).substring(0, 4);

assertEquals(
"org.eclipse.persistence.asm version " + moxyAsmVersion
+ " differs from asm version " + asmVersion + " in /media/moxy/pom.xml",
asmVersion, moxyAsmVersion);

System.out.println("Found expected Moxy ASM version " + moxyAsmVersion);
}

private static String findVersionInModel(String version, Model model) {
if (version.startsWith("${")) {
String _version = version.substring(2, version.length() - 1);
return model.getProperties().getProperty(_version);
} else {
return version;
return
model.getProperties()
.getProperty(version.substring(2, version.length() - 1));
}

return version;
}
}
2 changes: 1 addition & 1 deletion tests/version-agnostic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.2</version>
<version>3.5.5</version>
<configuration>
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
Expand Down
Loading