I see, thank you for the explanation and for adding a more permissive behaviour 
to the karaf-maven-plugin. 

Just to know a little bit better how to control the refreshes, in general my 
understanding is the following
<bundle>/<feature> directives will install the bundle or the feature, no matter 
what is already installed
dependency=“true" will install the bundle/feature if and only if it is required 
by the resolver and it is not already installed
prerequisite=“true" will guarantee the prerequisite feature will be installed 
before the other stuff in the feature declaration
Is this correct? Is there any other attribute that can be used to control 
feature-based provisioning?

Thank you very much,
Matteo

> On 26 Jul 2019, at 13:12, Jean-Baptiste Onofré <j...@nanthrax.net> wrote:
> 
> Actually, your features is causing a refresh (the flairkit-alarm-rest
> for instance).
> 
> So, the features resolver tries to uninstall a bundle to reinstall it.
> 
> It happens here:
> 
> https://github.com/apache/karaf/blob/karaf-4.2.x/features/core/src/main/java/org/apache/karaf/features/internal/service/StaticInstallSupport.java#L50
> 
> So, your feature will could work at runtime, but with a refresh.
> 
> I would recommend to fix your bundles to avoid the refresh.
> 
> Anyway, instead of failing, I can log a WARN message with the bundles in
> cause.
> 
> I created KARAF-6370 about that.
> 
> Regards
> JB
> 
> On 26/07/2019 11:40, Matteo Rulli wrote:
>> Hello,
>> 
>> Thanks. Yes we use the verify step of the karat-maven-plugin. Does this mean 
>> that the “verify” step can fail at build-time but the feature will work in a 
>> real deployment? If this is the case, what is the right approach to verify a 
>> feature before it is used or deployed? 
>> 
>> Thanks,
>> Matteo
>> 
>>> On 26 Jul 2019, at 11:31, Jean-Baptiste Onofré <j...@nanthrax.net> wrote:
>>> 
>>> Hi,
>>> 
>>> I guess you have this with karaf-maven-plugin, right ?
>>> 
>>> The reason is that we use a "simplified" resolver in the plugin, not
>>> implementing all methods. That's why you have UnsupportedOperationException.
>>> 
>>> Regards
>>> JB
>>> 
>>> On 26/07/2019 11:05, Matteo Rulli wrote:
>>>> Hello,
>>>> 
>>>> Karaf feature resolution fails due to
>>>> java.lang.UnsupportedOperationException. It is hard to understand the
>>>> root cause.
>>>> 
>>>> I managed to reproduce the issue in a relatively simple settings, you
>>>> can find it here: 
>>>> https://github.com/mrulli/karaf-426-feature-unsupported-op
>>>> 
>>>> Could you please help me to understand what is it happening here? 
>>>> 
>>>> Thanks,
>>>> Matteo
>>> 
>>> -- 
>>> Jean-Baptiste Onofré
>>> jbono...@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Reply via email to