Skip to content

Commit

Permalink
v1.1.18 test dependency Jetty 12
Browse files Browse the repository at this point in the history
  • Loading branch information
nhenneaux committed Oct 7, 2024
1 parent 4f4bac5 commit 91b28be
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 20 deletions.
35 changes: 20 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.nhenneaux.jersey.connector.httpclient</groupId>
<artifactId>jersey-httpclient-connector</artifactId>
<version>1.1.17</version>
<version>1.1.18</version>

<name>Jersey Connector using java.net.http.HttpClient</name>
<description>A Jersey connector using java.net.http.HttpClient and supporting HTTP/1.1 and HTTP/2.0 with the same
Expand All @@ -25,7 +25,7 @@
<sonar.host.url>https://sonarcloud.io</sonar.host.url>

<jersey.version>3.1.8</jersey.version>
<jetty.version>11.0.24</jetty.version>
<jetty.version>12.0.14</jetty.version>
<weld-se-core.version>5.1.3.Final</weld-se-core.version>
<log4j.version>2.24.1</log4j.version>
</properties>
Expand Down Expand Up @@ -72,33 +72,38 @@

<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-server</artifactId>
<artifactId>jetty-http2-server</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-server</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-java-server</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-servlet</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<artifactId>jersey-container-jetty-servlet</artifactId>
<version>${jersey.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>osgi-resource-locator</artifactId>
<groupId>org.glassfish.hk2</groupId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jetty*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -136,7 +141,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.2</version>
<version>5.11.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -148,7 +153,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.12.0</version>
<version>5.14.1</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.github.nhenneaux.jersey.connector.httpclient;

import org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory;
import org.eclipse.jetty.ee10.servlet.ServletContextHandler;
import org.eclipse.jetty.ee10.servlet.ServletHolder;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory;
import org.eclipse.jetty.server.*;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.util.MultiException;
import org.eclipse.jetty.util.ExceptionUtil;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.servlet.ServletContainer;
Expand Down Expand Up @@ -47,7 +47,7 @@ public class JettyServer implements AutoCloseable {
http2Connector.setPort(port);
server.addConnector(http2Connector);

ServletContextHandler context = new ServletContextHandler(server, "/");
ServletContextHandler context = new ServletContextHandler("/");
contexts.addHandler(context);
final ResourceConfig resourceConfig = new ResourceConfig();
for (Class<?> serviceClass : serviceClasses) {
Expand All @@ -64,7 +64,7 @@ public class JettyServer implements AutoCloseable {
try {
close();
} catch (RuntimeException closeException) {
MultiException multiException = new MultiException();
ExceptionUtil.MultiException multiException = new ExceptionUtil.MultiException();
multiException.add(e);
multiException.add(closeException);
multiException.ifExceptionThrowRuntime();
Expand Down

0 comments on commit 91b28be

Please sign in to comment.