Skip to content

Commit 47ad012

Browse files
Bump org.eclipse.jetty:jetty-server from 11.0.21 to 12.0.14 (#1142)
* Bump org.eclipse.jetty:jetty-server from 11.0.21 to 12.0.14 Bumps org.eclipse.jetty:jetty-server from 11.0.21 to 12.0.14. --- updated-dependencies: - dependency-name: org.eclipse.jetty:jetty-server dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * fix jetty Signed-off-by: Gregor Zeitlinger <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Gregor Zeitlinger <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gregor Zeitlinger <[email protected]>
1 parent daf3628 commit 47ad012

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

integration-tests/it-exporter/it-exporter-servlet-jetty-sample/pom.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
<description>
1515
Jetty Sample for the Exporter Integration Test
1616
</description>
17+
<properties>
18+
<jetty-server.version>12.0.14</jetty-server.version>
19+
<java.version>17</java.version>
20+
</properties>
1721

1822
<dependencies>
1923
<dependency>
@@ -29,12 +33,12 @@
2933
<dependency>
3034
<groupId>org.eclipse.jetty</groupId>
3135
<artifactId>jetty-server</artifactId>
32-
<version>11.0.21</version>
36+
<version>${jetty-server.version}</version>
3337
</dependency>
3438
<dependency>
35-
<groupId>org.eclipse.jetty</groupId>
36-
<artifactId>jetty-servlet</artifactId>
37-
<version>11.0.21</version>
39+
<groupId>org.eclipse.jetty.ee10</groupId>
40+
<artifactId>jetty-ee10-servlet</artifactId>
41+
<version>${jetty-server.version}</version>
3842
</dependency>
3943
</dependencies>
4044

integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import io.prometheus.metrics.model.registry.Collector;
88
import io.prometheus.metrics.model.registry.PrometheusRegistry;
99
import io.prometheus.metrics.model.snapshots.Unit;
10+
import org.eclipse.jetty.ee10.servlet.ServletContextHandler;
1011
import org.eclipse.jetty.server.Connector;
1112
import org.eclipse.jetty.server.Server;
1213
import org.eclipse.jetty.server.ServerConnector;
13-
import org.eclipse.jetty.servlet.ServletHandler;
1414

1515
/** Sample application using the {@link PrometheusMetricsServlet} in Jetty. */
1616
public class ExporterServletJettySample {
@@ -73,8 +73,8 @@ public static void main(String[] args) throws Exception {
7373
server.setConnectors(new Connector[] {connector});
7474

7575
// register servlet
76-
ServletHandler servletHandler = new ServletHandler();
77-
servletHandler.addServletWithMapping(PrometheusMetricsServlet.class, "/metrics");
76+
ServletContextHandler servletHandler = new ServletContextHandler("/");
77+
servletHandler.addServlet(PrometheusMetricsServlet.class, "/metrics");
7878
server.setHandler(servletHandler);
7979

8080
System.out.println("Running on http://localhost:" + port + "/metrics");

0 commit comments

Comments
 (0)