Merge pull request #6058 from dmatej/maven-central-snapshots

Maven central snapshots - BOM  plus few minor fixes
diff --git a/examples/open-tracing/README.MD b/examples/open-tracing/README.MD
index e8dc701..0143e41 100644
--- a/examples/open-tracing/README.MD
+++ b/examples/open-tracing/README.MD
@@ -1,3 +1,4 @@
+[//]: # " Copyright 2026 Contributors to the Eclipse Foundation. "
 [//]: # " Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. "
 [//]: # " "
 [//]: # " This program and the accompanying materials are made available under the "
@@ -20,7 +21,7 @@
 Example can be launched as is, but does not perform any interesting action out of the box.
 To be able to visualise the traces, it is recommended to start Jaeger (and th UI) locally, e.g. in Docker:
 
->     docker run -d -p 5775:5775/udp -p 16686:16686 jaegertracing/all-in-one:travis-1278
+>     docker run -d -p 5775:5775/udp -p 16686:16686 jaegertracing/all-in-one:1.76.0
 
 Check the UI on [localhost:16686](http://localhost:16686), there should be no traces visible.
 
@@ -34,51 +35,45 @@
 The first example should be visible in the Jaeger UI right after the example application is started. Others can be created by
 doing rest calls to the exposed resource.
 
-1. On start, the example application sends one request demonstrating more complex tracing
-- jersey client (w/ registered OpenTracingFeature) creates the "jersey-client-GET" span
-- the span is propagated to server (via http headers), jersey server (w/ registered OpenTracinfFeature) automatically creates a
- child span of the client span
-- in the resource method, child span of the server span is manually created and propagated into managed client calls
-- the managed clients are also tracing-enabled, so each one creates its own child span, that is propagated to the server, and
-so on
+0. On start, the example application sends one request demonstrating more complex tracing
+    - jersey client (w/ registered OpenTracingFeature) creates the "jersey-client-GET" span
+    - the span is propagated to server (via http headers), jersey server (w/ registered OpenTracinfFeature) automatically creates a child span of the client span
+    - in the resource method, child span of the server span is manually created and propagated into managed client calls
+    - the managed clients are also tracing-enabled, so each one creates its own child span, that is propagated to the server, and so on
 
-2. No explicit (user-defined) spans.
-- one automatically created "root" span, that measures the processing on the Jersey side and one "resource-level" span to be
-used for logging events on the application level
-- the "root" contains several tags with request and response metadata, such as request headers, status code, etc
-- also, several technical Jersey-level events have been logged
-- to see this simple case, call
->     curl localhost:8080/opentracing/resource/defaultTrace
+0. No explicit (user-defined) spans.
+    - one automatically created "root" span, that measures the processing on the Jersey side and one "resource-level" span to be used for logging events on the application level
+    - the "root" contains several tags with request and response metadata, such as request headers, status code, etc
+    - also, several technical Jersey-level events have been logged
+    - to see this simple case, call
+        `curl localhost:8080/opentracing/resource/defaultTrace`
 
-3. Explicit logging into resource-level span
-- same as above, but the "resource-level" span was resolved within the application logic, an event was logged and a tag was added
->     curl localhost:8080/opentracing/resource/appLevelLogging
+0. Explicit logging into resource-level span
+    - same as above, but the "resource-level" span was resolved within the application logic, an event was logged and a tag was added
+        `curl localhost:8080/opentracing/resource/appLevelLogging`
+    - similar call with POST:
+        `curl -X POST -d "Jersey Rocks" localhost:8080/opentracing/resource/appLevelPost`
 
-- similar call with POST:
->     curl -X POST -d "Jersey Rocks" localhost:8080/opentracing/resource/appLevelPost
+0. Explicit child span creation
+    - same as above, but instead of "resource-level" span, a child span was created and used for logging and adding tags
+    - note, that such a span needs to be finished manually, otherwise it won't propagate (the tracing info will be lost)
+        `curl localhost:8080/opentracing/resource/childSpan`
 
+0. Client calls from the resource
+    - more complex case, the resource method invokes two client calls using managed client
+    - one request via managed client is triggered within the "provided", resource-level span
+    - child span is created and another request via managed client is triggered within the child span
+    - the span context needs to be propagated manually using the OpenTracingFeature.SPAN_CONTEXT_PROPERTY
+    - in both cases, the span context is propagated using http headers to the server and back to the client
+    - the child span (created in the resource) needs to be explicitly finished in the resource (or elsewhere, but needs to be finished)
+        `curl localhost:8080/opentracing/resource/traceWithManagedClient`
 
-4. Explicit child span creation
-- same as above, but instead of "resource-level" span, a child span was created and used for logging and adding tags
-- note, that such a span needs to be finished manually, otherwise it won't propagate (the tracing info will be lost)
->     curl localhost:8080/opentracing/resource/childSpan
+0. Asynchronous processing
+    - either basic case, but using asynchronous request processing
+    - there should be no practical difference visible in the tracing info
+        `curl localhost:8080/opentracing/resource/async`
 
-
-4. Client calls from the resource
-- more complex case, the resource method invokes two client calls using managed client
-- one request via managed client is triggered within the "provided", resource-level span
-- child span is created and another request via manged client is triggered within the child span
-- the span context needs to be propagated manually using the OpenTracingFeature.SPAN_CONTEXT_PROPERTY
-- in both cases, the span context is propagated using http headers to the server and back to the client
-- the child span (created in the resource) needs to be explicitly finished in the resource (or elsewhere, but needs to be finished)
->     curl localhost:8080/opentracing/resource/traceWithManagedClient
-
-5. Asynchronous processing
-- either basic case, but using asynchronous request processing
-- there should be no practical difference visible in the tracing info
->     curl localhost:8080/opentracing/resource/async
-
-6. Failing resource
-- demonstrates exception thrown in the resource method
-- Jaeger shows failed spans with the exclamation mark symbol and the exception is logged in the request span
->     curl localhost:8080/opentracing/resource/error
\ No newline at end of file
+0. Failing resource
+    - demonstrates exception thrown in the resource method
+    - Jaeger shows failed spans with the exclamation mark symbol and the exception is logged in the request span
+        `curl localhost:8080/opentracing/resource/error`
diff --git a/examples/open-tracing/pom.xml b/examples/open-tracing/pom.xml
index d6afe57..58660e6 100644
--- a/examples/open-tracing/pom.xml
+++ b/examples/open-tracing/pom.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-
+    Copyright 2026 Contributors to the Eclipse Foundation.
     Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
 
     This program and the accompanying materials are made available under the
@@ -43,44 +43,31 @@
             <groupId>io.opentracing</groupId>
             <artifactId>opentracing-api</artifactId>
         </dependency>
-
         <dependency>
             <groupId>io.opentracing</groupId>
             <artifactId>opentracing-util</artifactId>
         </dependency>
 
         <dependency>
-            <groupId>com.uber.jaeger</groupId>
+            <groupId>io.jaegertracing</groupId>
             <artifactId>jaeger-core</artifactId>
-            <version>${com.uber.jaeger.version}</version>
+            <version>${jaeger.version}</version>
             <exclusions>
                 <exclusion>
                     <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-api</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.httpcomponents</groupId>
-                    <artifactId>httpcore</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>io.opentracing</groupId>
-                    <artifactId>opentracing-api</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>io.opentracing</groupId>
-                    <artifactId>opentracing-util</artifactId>
+                    <artifactId>*</artifactId>
                 </exclusion>
                 <exclusion>
                     <groupId>com.google.code.gson</groupId>
                     <artifactId>gson</artifactId>
                 </exclusion>
-                <exclusion>
-                    <groupId>org.apache.httpcomponents</groupId>
-                    <artifactId>httpclient</artifactId>
-                </exclusion>
             </exclusions>
         </dependency>
-
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency>
 
         <dependency>
             <groupId>org.glassfish.jersey.test-framework</groupId>
diff --git a/examples/open-tracing/src/main/java/org/glassfish/jersey/examples/opentracing/App.java b/examples/open-tracing/src/main/java/org/glassfish/jersey/examples/opentracing/App.java
index c92f440..cd092f7 100644
--- a/examples/open-tracing/src/main/java/org/glassfish/jersey/examples/opentracing/App.java
+++ b/examples/open-tracing/src/main/java/org/glassfish/jersey/examples/opentracing/App.java
@@ -1,4 +1,5 @@
 /*
+ * Copyright (c) 2026 Contributors to the Eclipse Foundation.
  * Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
@@ -10,10 +11,12 @@
 
 package org.glassfish.jersey.examples.opentracing;
 
-import java.io.IOException;
-import java.net.URI;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import io.jaegertracing.Configuration;
+import io.jaegertracing.Configuration.ReporterConfiguration;
+import io.jaegertracing.Configuration.SamplerConfiguration;
+import io.jaegertracing.Configuration.SenderConfiguration;
+import io.opentracing.Span;
+import io.opentracing.util.GlobalTracer;
 
 import jakarta.ws.rs.client.Client;
 import jakarta.ws.rs.client.ClientBuilder;
@@ -22,20 +25,18 @@
 import jakarta.ws.rs.container.ContainerResponseContext;
 import jakarta.ws.rs.container.ContainerResponseFilter;
 
+import java.io.IOException;
+import java.net.URI;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.glassfish.grizzly.http.server.HttpServer;
 import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory;
 import org.glassfish.jersey.opentracing.OpenTracingFeature;
 import org.glassfish.jersey.opentracing.OpenTracingUtils;
 import org.glassfish.jersey.server.ResourceConfig;
 
-import org.glassfish.grizzly.http.server.HttpServer;
-
-import com.uber.jaeger.Configuration;
-
-import io.opentracing.Span;
-import io.opentracing.util.GlobalTracer;
-
 /**
- * Open tracing example application.
  * <p>
  * Exposes OpenTracing-enabled REST application (with Jaeger registered as the Tracer)
  * and invokes one request from (also OpenTracing-enabled) Jersey client.
@@ -89,18 +90,17 @@
      * Configures Jaeger tracer as the {@link GlobalTracer}.
      */
     private static void prepare() {
-        GlobalTracer.register(
-                new com.uber.jaeger.Configuration(
-                        "OpenTracingTemporaryTest",
-                        new Configuration.SamplerConfiguration("const", 1),
-                        new Configuration.ReporterConfiguration(
-                                true,
-                                "localhost",
-                                5775,
-                                1000,
-                                10000)
-                ).getTracer()
-        );
+        SamplerConfiguration sampler = new SamplerConfiguration().withType("const").withParam(1);
+        SenderConfiguration sender = new SenderConfiguration().withAgentHost("localhost").withAgentPort(5775);
+        ReporterConfiguration reporter = new ReporterConfiguration()
+            .withLogSpans(true)
+            .withFlushInterval(1000)
+            .withMaxQueueSize(10000)
+            .withSender(sender);
+        Configuration configuration = new Configuration("OpenTracingTemporaryTest")
+            .withSampler(sampler)
+            .withReporter(reporter);
+        GlobalTracer.registerIfAbsent(configuration.getTracer());
     }
 
     /**
diff --git a/incubator/open-tracing/src/main/java/org/glassfish/jersey/opentracing/OpenTracingApplicationEventListener.java b/incubator/open-tracing/src/main/java/org/glassfish/jersey/opentracing/OpenTracingApplicationEventListener.java
index b6c6feb..315c598 100644
--- a/incubator/open-tracing/src/main/java/org/glassfish/jersey/opentracing/OpenTracingApplicationEventListener.java
+++ b/incubator/open-tracing/src/main/java/org/glassfish/jersey/opentracing/OpenTracingApplicationEventListener.java
@@ -1,4 +1,5 @@
 /*
+ * Copyright (c) 2026 Contributors to the Eclipse Foundation.
  * Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
@@ -107,7 +108,7 @@
 
     class OpenTracingRequestEventListener implements RequestEventListener {
         private Span requestSpan;
-        private Span resourceSpan = null;
+        private Span resourceSpan;
 
         OpenTracingRequestEventListener(final Span requestSpan) {
             this.requestSpan = requestSpan;
@@ -171,7 +172,9 @@
                     // processing; resourceSpan will be finished and the span in the context will be switched back to the
                     // resource span before any further tracing can occur.
                     event.getContainerRequest().setProperty(OpenTracingFeature.SPAN_CONTEXT_PROPERTY, requestSpan);
-                    resourceSpan.finish();
+                    if (resourceSpan != null) {
+                        resourceSpan.finish();
+                    }
                     logVerbose(LocalizationMessages.OPENTRACING_LOG_RESPONSE_FILTERING_STARTED());
                     break;
 
@@ -225,6 +228,11 @@
                         requestSpan.finish();
                     }
                     break;
+                case START:
+                    // This is already handled in onRequest
+                    break;
+                default:
+                    break;
             }
         }
 
diff --git a/pom.xml b/pom.xml
index a47c16f..b083817 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2275,11 +2275,8 @@
         <groovy.version>5.0.0-alpha-12</groovy.version>
         <gson.version>2.13.1</gson.version>
 
-        <!--versions, extracted here due to maven-enforcer-plugin -->
-        <!--        <commons.codec.version>1.15</commons.codec.version>-->
-        <com.uber.jaeger.version>0.27.0</com.uber.jaeger.version>
+        <jaeger.version>1.8.1</jaeger.version>
         <org.codehaus.gmavenplus.version>4.2.0</org.codehaus.gmavenplus.version>
-        <!-- end of versions extracted here due to maven-enforcer-plugin -->
 
         <!-- micrometer -->
         <micrometer.version>1.15.1</micrometer.version>