You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2021/04/05 14:47:58 UTC
[GitHub] [cxf] ffang commented on a change in pull request #767: CXF-8377: Update to Apache Karaf 4.3.1
ffang commented on a change in pull request #767:
URL: https://github.com/apache/cxf/pull/767#discussion_r607129654
##########
File path: osgi/karaf/features/src/main/resources/features.xml
##########
@@ -216,8 +216,9 @@
</capability>
</feature>
<feature name="cxf-http-undertow" version="${project.version}">
- <feature version="${project.version}">cxf-http</feature>
+ <feature version="${project.version}">cxf-core</feature>
Review comment:
Hi @reta ,
Thanks for bringing this up, and this part is tricky indeed. The problem from that some features in CXF now still require servlet api 3.x(like jetty), but others require servlet 4.x
To address this, we need to introduce a servlet-compatibility fragment bundle, which is like
```
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
<Fragment-Host>javax.servlet-api</Fragment-Host>
<Export-Package>
javax.servlet;uses:="javax.servlet.annotation,javax.servlet.descriptor";version=3.1.0,
javax.servlet.annotation;uses:=javax.servlet;version=3.1.0,
javax.servlet.http;uses:=javax.servlet;version=3.1.0,
javax.servlet.descriptor;version=3.1.0
</Export-Package>
</instructions>
</configuration>
</plugin>
```
And in the org.apache.karaf.features.xml, we need to patch pax-http-undertow features with this fragment bundle like
```
<featureReplacements>
<replacement mode="merge">
<feature name="pax-http-undertow" version="7.3.13">
<f:bundle start-level="35">mvn:groupId/servlet-compatibility/version</f:bundle>
</feature>
</replacement>
</featureReplacements>
```
This is the solution we used in FUSE, and we have this fragment bundle from Red Hat maven repo. We can reuse this from FUSE(need to add Red Hat maven repo in build), or we can add this fragment bundle in CXF(for now). Or something I think better, we should add this in the OPS4J PAX-WEB, to avoid patching pax-http-undertow feature downstream.
Best Regards
Freeman
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org