Skip to content

Commit

Permalink
Build with Java 22-23ea
Browse files Browse the repository at this point in the history
Libraries update
  • Loading branch information
nhenneaux committed Mar 29, 2024
1 parent db41304 commit f73caa9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
18 changes: 13 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<sonar.host.url>https://sonarcloud.io</sonar.host.url>

<jersey.version>3.1.3</jersey.version>
<jetty.version>12.0.7</jetty.version>
<jetty.version>11.0.20</jetty.version>
<weld-se-core.version>5.1.2.Final</weld-se-core.version>
<log4j.version>2.23.1</log4j.version>
</properties>
Expand Down Expand Up @@ -72,19 +72,27 @@

<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>jetty-http2-server</artifactId>
<artifactId>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.ee10</groupId>
<artifactId>jetty-ee10-servlet</artifactId>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
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.util.ExceptionUtil;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.util.MultiException;
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("/");
ServletContextHandler context = new ServletContextHandler(server, "/");
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) {
ExceptionUtil.MultiException multiException = new ExceptionUtil.MultiException();
MultiException multiException = new MultiException();
multiException.add(e);
multiException.add(closeException);
multiException.ifExceptionThrowRuntime();
Expand Down

0 comments on commit f73caa9

Please sign in to comment.