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/02 16:50:32 UTC

[GitHub] [cxf] reta opened a new pull request #767: CXF-8377: Update to Apache Karaf 4.3.1

reta opened a new pull request #767:
URL: https://github.com/apache/cxf/pull/767


   


-- 
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



[GitHub] [cxf] reta commented on a change in pull request #767: CXF-8377: Update to Apache Karaf 4.3.1

Posted by GitBox <gi...@apache.org>.
reta commented on a change in pull request #767:
URL: https://github.com/apache/cxf/pull/767#discussion_r607428676



##########
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:
       Thanks a mill @ffang , I have also tried slightly different approach with `featureReplacements` but did not succeed, the trick with the  fragment bundle is definitely a great one, refactoring the PR .... 




-- 
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



[GitHub] [cxf] reta commented on a change in pull request #767: CXF-8377: Update to Apache Karaf 4.3.1

Posted by GitBox <gi...@apache.org>.
reta commented on a change in pull request #767:
URL: https://github.com/apache/cxf/pull/767#discussion_r608159082



##########
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:
       @ffang my apologies, mind please taking another look, refactored the change to use compatibility bundle and feature processing, thanks a lot!




-- 
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



[GitHub] [cxf] reta commented on a change in pull request #767: CXF-8377: Update to Apache Karaf 4.3.1

Posted by GitBox <gi...@apache.org>.
reta commented on a change in pull request #767:
URL: https://github.com/apache/cxf/pull/767#discussion_r606322578



##########
File path: osgi/karaf/features/src/main/resources/org.apache.karaf.features.xml
##########
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+      http://www.apache.org/licenses/LICENSE-2.0
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<featuresProcessing xmlns="http://karaf.apache.org/xmlns/features-processing/v1.0.0" xmlns:f="http://karaf.apache.org/xmlns/features/v1.6.0">
+    <blacklistedBundles>
+        <bundle>mvn:org.ops4j.pax.web/pax-web-undertow/7.3.13</bundle>

Review comment:
       The issue with servlet dependencies (see please http://karaf.922171.n3.nabble.com/karaf-4-3-0-unable-to-install-hawtio-core-with-pax-http-undertow-td4059219.html).
   
   ```
   [ERROR]                                                                                                                               
   [ERROR] Chain 1:                                                                                                                      
   [ERROR]   org.ops4j.pax.web.pax-web-undertow [org.ops4j.pax.web.pax-web-undertow/7.3.13]                                              
   [ERROR]     import: (&(osgi.wiring.package=javax.servlet)(version>=3.1.0)(!(version>=5.0.0)))                                         
   [ERROR]      |                                                                                                                        
   [ERROR]     export: osgi.wiring.package: javax.servlet                                                                                
   [ERROR]   javax.servlet-api [javax.servlet-api/3.1.0]                                                                                 
   [ERROR]                                                                                                                               
   [ERROR] Chain 2:                                                                                                                      
   [ERROR]   org.ops4j.pax.web.pax-web-undertow [org.ops4j.pax.web.pax-web-undertow/7.3.13]                                              
   [ERROR]     import: (&(osgi.wiring.package=io.undertow.servlet)(version>=2.0.0)(!(version>=2.1.0)))                                   
   [ERROR]      |                                                                                                                        
   [ERROR]     export: osgi.wiring.package=io.undertow.servlet; uses:=javax.servlet                                                      
   [ERROR]   io.undertow.servlet [io.undertow.servlet/2.0.33.Final]                                                                      
   [ERROR]     import: (&(osgi.wiring.package=javax.servlet)(version>=4.0.0)(!(version>=5.0.0)))                                         
   [ERROR]      |                                                                                                                        
   [ERROR]     export: osgi.wiring.package: javax.servlet                                                                                
   [ERROR]   javax.servlet-api [javax.servlet-api/4.0.0]                                                                                 
   [ERROR] Repositories: {                                                                                                               
   [ERROR]         file:C:\Users\retab\Workspaces\apache-cxf-git\cxf-git\osgi\karaf\features\target/classes/features.xml                 
   [ERROR]         mvn:org.apache.karaf.features/framework/4.3.1/xml/features                                                            
   [ERROR]         mvn:org.apache.karaf.features/spring/4.3.1/xml/features                                                               
   [ERROR]         mvn:org.apache.karaf.features/standard/4.3.1/xml/features                                                             
   [ERROR]         mvn:org.ops4j.pax.cdi/pax-cdi-features/1.1.4/xml/features                                                             
   [ERROR]         mvn:org.ops4j.pax.web/pax-web-features/7.3.13/xml/features                                                            
   [ERROR] }                                                                                                                             
   ```
   Looking for the proper way to solve that but blacklisting `pax-web-undertow` for now (cannot blacklist `javax.servlet/3.1.0` , breaks whole bunch of features at the moment)




-- 
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



[GitHub] [cxf] ffang commented on a change in pull request #767: CXF-8377: Update to Apache Karaf 4.3.1

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [cxf] ffang commented on a change in pull request #767: CXF-8377: Update to Apache Karaf 4.3.1

Posted by GitBox <gi...@apache.org>.
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 Servicemix.
   
   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



[GitHub] [cxf] ffang commented on a change in pull request #767: CXF-8377: Update to Apache Karaf 4.3.1

Posted by GitBox <gi...@apache.org>.
ffang commented on a change in pull request #767:
URL: https://github.com/apache/cxf/pull/767#discussion_r608161912



##########
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:
       LGTM, thanks a lot!




-- 
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



[GitHub] [cxf] reta merged pull request #767: CXF-8377: Update to Apache Karaf 4.3.1

Posted by GitBox <gi...@apache.org>.
reta merged pull request #767:
URL: https://github.com/apache/cxf/pull/767


   


-- 
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



[GitHub] [cxf] reta commented on a change in pull request #767: CXF-8377: Update to Apache Karaf 4.3.1

Posted by GitBox <gi...@apache.org>.
reta commented on a change in pull request #767:
URL: https://github.com/apache/cxf/pull/767#discussion_r606355477



##########
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:
       @ffang would appreciate you input on this change. 
   
   Had to remove the dependency on the `http` feature. It causes the issue with `servlet-api` dependencies (see please http://karaf.922171.n3.nabble.com/karaf-4-3-0-unable-to-install-hawtio-core-with-pax-http-undertow-td4059219.html).
   
   [ERROR]                                                                                                                               
   [ERROR] Chain 1:                                                                                                                      
   [ERROR]   org.ops4j.pax.web.pax-web-undertow [org.ops4j.pax.web.pax-web-undertow/7.3.13]                                              
   [ERROR]     import: (&(osgi.wiring.package=javax.servlet)(version>=3.1.0)(!(version>=5.0.0)))                                         
   [ERROR]      |                                                                                                                        
   [ERROR]     export: osgi.wiring.package: javax.servlet                                                                                
   [ERROR]   javax.servlet-api [javax.servlet-api/3.1.0]                                                                                 
   [ERROR]                                                                                                                               
   [ERROR] Chain 2:                                                                                                                      
   [ERROR]   org.ops4j.pax.web.pax-web-undertow [org.ops4j.pax.web.pax-web-undertow/7.3.13]                                              
   [ERROR]     import: (&(osgi.wiring.package=io.undertow.servlet)(version>=2.0.0)(!(version>=2.1.0)))                                   
   [ERROR]      |                                                                                                                        
   [ERROR]     export: osgi.wiring.package=io.undertow.servlet; uses:=javax.servlet                                                      
   [ERROR]   io.undertow.servlet [io.undertow.servlet/2.0.33.Final]                                                                      
   [ERROR]     import: (&(osgi.wiring.package=javax.servlet)(version>=4.0.0)(!(version>=5.0.0)))                                         
   [ERROR]      |                                                                                                                        
   [ERROR]     export: osgi.wiring.package: javax.servlet                                                                                
   [ERROR]   javax.servlet-api [javax.servlet-api/4.0.0]                                                                                 
   [ERROR] Repositories: {                                                                                                               
   [ERROR]         file:C:\Users\retab\Workspaces\apache-cxf-git\cxf-git\osgi\karaf\features\target/classes/features.xml                 
   [ERROR]         mvn:org.apache.karaf.features/framework/4.3.1/xml/features                                                            
   [ERROR]         mvn:org.apache.karaf.features/spring/4.3.1/xml/features                                                               
   [ERROR]         mvn:org.apache.karaf.features/standard/4.3.1/xml/features                                                             
   [ERROR]         mvn:org.ops4j.pax.cdi/pax-cdi-features/1.1.4/xml/features                                                             
   [ERROR]         mvn:org.ops4j.pax.web/pax-web-features/7.3.13/xml/features                                                            
   [ERROR] }                                                                                                                             
   
   What do you think?
   




-- 
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