Thanks JB,

I tried your suggestion, but still having problems.  I added to file 
etc/org.apache.karaf.features.xml 

    <blacklistedFeatures>
        <feature>jetty</feature>
    </blacklistedFeatures> 

But 1) the two versions of Jetty are still included in the system directory of 
my custom distribution archive,  and 2) at runtime, the two versions of Jetty 
are deployed.

206 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Asynchronous HTTP Client
207 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Asynchronous HTTP Client
208 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Continuation
209 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Continuation
210 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Deployers
211 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Deployers
212 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Http Utility
213 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Http Utility
214 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: IO Utility
215 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: IO Utility
216 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: JAAS
217 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: JAAS
218 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: JMX Management
219 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: JMX Management
220 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: JNDI Naming
221 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: JNDI Naming
222 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Plus
223 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Plus
224 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Proxy
225 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Proxy
226 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Rewrite Handler
227 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Rewrite Handler
228 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Security
229 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Security
230 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: JASPI Security
231 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: JASPI Security
232 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Server Core
233 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Server Core
234 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Servlet Handling
235 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Servlet Handling
236 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Utility Servlets and 
Filters
237 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Utility Servlets and 
Filters
238 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Utilities
239 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Utilities
240 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Utilities :: Ajax(JSON)
241 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Utilities :: Ajax(JSON)
242 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Webapp Application 
Support
243 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Webapp Application 
Support
244 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Websocket :: API
245 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Websocket :: API
246 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Websocket :: Client
247 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Websocket :: Client
248 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Websocket :: Common
249 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Websocket :: Common
250 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Websocket :: 
javax.websocket :: Client Implementation
251 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Websocket :: 
javax.websocket :: Client Implementation
252 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Websocket :: 
javax.websocket.server :: Server Implementation
253 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Websocket :: 
javax.websocket.server :: Server Implementation
254 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Websocket :: Server
255 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Websocket :: Server
256 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: Websocket :: Servlet 
Interface
257 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: Websocket :: Servlet 
Interface
258 │ Active   │  30 │ 9.4.20.v20190813      │ Jetty :: XML utilities
259 │ Active   │  30 │ 9.4.22.v20191022      │ Jetty :: XML utilities

BTW, I am using Camel, but not CFX, and not Camel-Jetty, only using:

                <feature>camel-core</feature>
                <feature>camel-servlet</feature>
                <feature>camel-blueprint</feature>
                <feature>camel-jackson</feature>
                <feature>camel-http</feature>
                <feature>camel-jaxb</feature>
                <feature>camel-quartz</feature>
                <feature>camel-json-api</feature>

so I don’t know why it should adding Jetty in this case.  

I would argue that independently of  whether or not this is fixed in the Karaf 
feature, Camel feature, CFX feature, or whatever other third party feature,  it 
still  a good troubleshooting aid to be able to see where a feature is imported.

As os now, I cannot upgrade Camel for they dropped support of Java 8, and I 
cannot upgrade from Java 8 at the moment, due to  other issues.  Any advise 
will be appreciated.   Thanks!

Best regards,
Alex soto




> On Jun 11, 2020, at 2:54 PM, Jean-Baptiste Onofre <j...@nanthrax.net> wrote:
> 
> Hi,
> 
> OK, that’s the problem with Jetty and pax-http-jetty feature.
> 
> Most of third party projects (especially CXF and Camel) use the Karaf 
> provided jetty feature.
> They should NOT do that and use pax-http-jetty. Actually the Karaf jetty 
> feature should be removed.
> This can lead to two issues:
> 
> 1. You can have different jetty versions installed if Karaf jetty feature and 
> pax-http-jetty feature are not "aligned"
> 2. You can have refresh as the resolver see the same resources provided by 
> two features (see https://issues.apache.org/jira/browse/KARAF-6732 
> <https://issues.apache.org/jira/browse/KARAF-6732> for instance).
> 
> So, mid term the fix that I gonna do is to change third party projects to use 
> pax-http-jetty and remove the Karaf jetty feature.
> 
> Short term, you can blacklist jetty feature for instance (as I explain in 
> https://issues.apache.org/jira/browse/KARAF-6732 
> <https://issues.apache.org/jira/browse/KARAF-6732>).
> 
> Regards
> JB
> 
>> Le 11 juin 2020 à 18:58, Alex Soto <alex.s...@envieta.com 
>> <mailto:alex.s...@envieta.com>> a écrit :
>> 
>> Hi JB, 
>> 
>> No, it is not Camel 3.3.0. It is Jetty.  Here is the output from the Maven 
>> build:
>> 
>> 
>> [INFO]    Feature pax-jetty/9.4.28.v20200408 is defined as a boot feature
>> [INFO]       adding maven artifact: 
>> mvn:org.eclipse.jetty/jetty-util-ajax/9.4.28.v20200408
>> [INFO]       adding maven artifact: 
>> mvn:javax.annotation/javax.annotation-api/1.3
>> [INFO]       adding maven artifact: 
>> mvn:org.eclipse.jetty.websocket/javax-websocket-client-impl/9.4.28.v20200408
>> 
>> And
>> 
>> 
>> [INFO]    Feature pax-jetty/9.4.20.v20190813 is defined as a boot feature
>> [INFO]       adding maven artifact: 
>> mvn:org.eclipse.jetty/jetty-jaspi/9.4.20.v20190813
>> [INFO]       adding maven artifact: 
>> mvn:javax.annotation/javax.annotation-api/1.3
>> 
>> 
>> I do not explicitly add Jetty, so it must be at a lower level.  What would 
>> be nice, though, is to have a flag or something so that Karaf’s plugin can 
>> display the hierarchy so I can easily spot who’s is bringing the dependency. 
>> 
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>> 
>>> On Jun 11, 2020, at 12:34 PM, Jean-Baptiste Onofre <j...@nanthrax.net 
>>> <mailto:j...@nanthrax.net>> wrote:
>>> 
>>> Hi,
>>> 
>>> You maybe have a range in another feature using <repository/> ?
>>> 
>>> If you talk about Camel 3.3.0 and Karaf feature, I already saw the issue 
>>> and created a Jira at Camel to fix that: 
>>> https://issues.apache.org/jira/browse/CAMEL-15166 
>>> <https://issues.apache.org/jira/browse/CAMEL-15166>
>>> 
>>> It works fine with Camel 2.25.1 but with the "move" to the new 
>>> feature/repository, it’s weird ;)
>>> I have to do a cleanup/fix.
>>> 
>>> Regards
>>> JB
>>> 
>>>> Le 11 juin 2020 à 18:31, Alex Soto <alex.s...@envieta.com 
>>>> <mailto:alex.s...@envieta.com>> a écrit :
>>>> 
>>>> Hello,
>>>> 
>>>> I have a Karaf custom distribution project, using karaf-maven-plugin 
>>>> plugin.  For some reason, 2 versions of the same feature are added to the 
>>>> final distribution as boot features.  I’d like to clean it up so only on 
>>>> version is used, but I don’t know why is being added.  Is there a way to 
>>>> figure out why a particular feature is added to the distribution?  Some 
>>>> tree output of the dependency hierarchy would be nice.  Thanks!
>>>> 
>>>> Best regards,
>>>> Alex soto
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>> 
> 

Reply via email to