This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/main by this push:
new 23c5cf5e759 Fix OSGi Import-Package ranges for jakarta.xml.ws,
jakarta.ws.rs, jakarta.xml.soap and jakarta.servlet (#3808)
23c5cf5e759 is described below
commit 23c5cf5e759ede54ee5931f9de024e24222f3722
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.
---
integration/cdi/pom.xml | 2 +-
parent/pom.xml | 5 +++--
rt/frontend/jaxrs/pom.xml | 3 +--
rt/transports/http-netty/netty-server/pom.xml | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/integration/cdi/pom.xml b/integration/cdi/pom.xml
index efd69334a1e..2141ff1d70d 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/parent/pom.xml b/parent/pom.xml
index 6de45e03b46..58caa805754 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -75,10 +75,11 @@
<cxf.osgi.jakarta.activation.version>[2,3)</cxf.osgi.jakarta.activation.version>
<cxf.osgi.jakarta.mail.version>[2,3)</cxf.osgi.jakarta.mail.version>
<cxf.osgi.jakarta.servlet.version>[6,7)</cxf.osgi.jakarta.servlet.version>
-
<cxf.osgi.jakarta.xml.ws.version>[3,4)</cxf.osgi.jakarta.xml.ws.version>
+
<cxf.osgi.jakarta.xml.ws.version>[4,5)</cxf.osgi.jakarta.xml.ws.version>
+ <cxf.osgi.jakarta.ws.rs.version>[4,5)</cxf.osgi.jakarta.ws.rs.version>
<cxf.osgi.cdi.version>[4,5)</cxf.osgi.cdi.version>
<cxf.osgi.jakarta.jwsapi.version>[4,5)</cxf.osgi.jakarta.jwsapi.version>
- <cxf.osgi.saaj.version>[2,3)</cxf.osgi.saaj.version>
+ <cxf.osgi.saaj.version>[3,4)</cxf.osgi.saaj.version>
<cxf.opensaml.osgi.version>[5,6)</cxf.opensaml.osgi.version>
<cxf.ehcache.osgi.version>[3,4)</cxf.ehcache.osgi.version>
<cxf.jetty.osgi.version>[12,13)</cxf.jetty.osgi.version>
diff --git a/rt/frontend/jaxrs/pom.xml b/rt/frontend/jaxrs/pom.xml
index 2ce9b439d1a..a5dd6251842 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 bf0c8c17e6f..3315f5ae0bd 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}",