This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 4.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 183c4efb52f5c0388aeb6ebf24fdf8b3aff3fd27
Author: Matt Pavlovich <[email protected]>
AuthorDate: Wed Dec 2 08:27:19 2026 -0600

    Fix OSGi Import-Package ranges for jakarta.xml.ws, jakarta.ws.rs, 
jakarta.xml.soap and jakarta.servlet (#3808)
    
    The OSGi import ranges did not follow the Jakarta EE 11 API versions CXF 4.2
    builds against, so the affected bundles could not resolve (or silently lost
    optional imports) in an OSGi container:
    
    - cxf.osgi.jakarta.xml.ws.version was [3,4) while jakarta.xml.ws-api is 
4.0.x.
      cxf-core imports jakarta.xml.ws optionally, so the import is never wired 
and
      every CXF feature (AbstractFeature extends WebServiceFeature), e.g.
      LoggingFeature, fails with NoClassDefFoundError. Now [4,5), consistent 
with
      cxf.osgi.jakarta.jwsapi.version (jakarta.jws ships in the same API jar).
    - cxf-rt-frontend-jaxrs and cxf-integration-cdi hard-coded jakarta.ws.rs* at
      [3,4) while CXF builds against jakarta.ws.rs-api 4.0.0 (the other JAX-RS
      modules already import [4.0,5)). Adds cxf.osgi.jakarta.ws.rs.version=[4,5)
      and uses it in both.
    - cxf.osgi.saaj.version was [2,3) while jakarta.xml.soap-api is 3.0.x
      (affects cxf-rt-bindings-soap, frontend-jaxws, ws-security, ws-rm,
      ws-eventing).
    - cxf-rt-transports-http-netty-server hard-coded jakarta.servlet* at [5,6)
      while CXF builds against jakarta.servlet-api 6.1.0; it now uses
      cxf.osgi.jakarta.servlet.version ([6,7)) like the other servlet modules.
    
    No hard-coded jakarta.* range remains in the module poms. Verified by 
building
    the reactor (-Pfastinstall) and checking every jakarta.* Import-Package 
range
    in the 93 generated bundle manifests against the package versions exported 
by
    the API jars in dependencyManagement: none fall outside (the same check 
flags
    26 imports in the 4.2.4 release jars). The JAX-RS bundles with these ranges
    also run in Apache Karaf 4.5.0 on JDK 25.
    
    (cherry picked from commit 23c5cf5e759ede54ee5931f9de024e24222f3722)
    
    # Conflicts:
    #       parent/pom.xml
---
 integration/cdi/pom.xml                       | 2 +-
 rt/frontend/jaxrs/pom.xml                     | 3 +--
 rt/transports/http-netty/netty-server/pom.xml | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/integration/cdi/pom.xml b/integration/cdi/pom.xml
index 3dbc9f5a274..b7aa342fc86 100644
--- a/integration/cdi/pom.xml
+++ b/integration/cdi/pom.xml
@@ -36,7 +36,7 @@
         <cxf.osgi.import>
             jakarta.servlet*;version="${cxf.osgi.jakarta.servlet.version}",
             jakarta.enterprise*;version="${cxf.osgi.cdi.version}",
-            jakarta.ws.rs*;version="[3,4)",
+            jakarta.ws.rs*;version="${cxf.osgi.jakarta.ws.rs.version}",
             org.apache.cxf.interceptor;resolution:=optional
         </cxf.osgi.import>
         <cxf.osgi.export>
diff --git a/rt/frontend/jaxrs/pom.xml b/rt/frontend/jaxrs/pom.xml
index 20bad88439d..e664a6ca5c4 100644
--- a/rt/frontend/jaxrs/pom.xml
+++ b/rt/frontend/jaxrs/pom.xml
@@ -37,8 +37,7 @@
             
jakarta.activation;version="${cxf.osgi.jakarta.activation.version}",
             
org.springframework*;resolution:="optional";version="${cxf.osgi.spring.version}",
             
jakarta.validation*;resolution:=optional;version="${cxf.validation.api.package.version}",
-            jakarta.ws.rs.client;version="[3,4)",
-            jakarta.ws.rs*;version="[3,4)",
+            jakarta.ws.rs*;version="${cxf.osgi.jakarta.ws.rs.version}",
             jakarta.xml.bind*;version="${cxf.osgi.jakarta.bind.version}",
             
jakarta.annotation*;version="${cxf.osgi.jakarta.annotation.version}"
         </cxf.osgi.import>
diff --git a/rt/transports/http-netty/netty-server/pom.xml 
b/rt/transports/http-netty/netty-server/pom.xml
index 933eac33785..62b20c55e6a 100644
--- a/rt/transports/http-netty/netty-server/pom.xml
+++ b/rt/transports/http-netty/netty-server/pom.xml
@@ -33,7 +33,7 @@
     <properties>
         
<cxf.module.name>org.apache.cxf.transport.http.netty.server</cxf.module.name>
         <cxf.osgi.import>
-            jakarta.servlet*;version="[5,6)",
+            jakarta.servlet*;version="${cxf.osgi.jakarta.servlet.version}",
             io.netty.*;version="${cxf.osgi.netty.version}",
             
jakarta.annotation;version="${cxf.osgi.jakarta.annotation.version}",
             
org.springframework*;resolution:="optional";version="${cxf.osgi.spring.version}",

Reply via email to