karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: karaf-maven-plugin verify - ignore missing blueprint references
Date Thu, 29 Nov 2018 14:14:49 GMT
AFAIR, if you have at least one feature providing the service, it should

Does it mean that today, your features repo just contains the "service"
client feature, not at least one feature providing the service ?

I think I understand your use case: you want to verify an "open"
feature, meaning that the feature expects some resources at runtime, not
yet defined in the features repository. The verify goal is more designed
for "close" features.

If there's no way to you to provide at least one feature (in the
karaf-maven-plugin configuration), then, maybe, I can add a
flag/configuration on the feature to notify that the feature expects
resources at runtime.

Thoughts ?


On 29/11/2018 14:54, Jesse White wrote:
> Hi JB,
> Yeah, that is correct.
> Thanks,
> Jesse
> On 2018-11-29 12:14 a.m., Jean-Baptiste Onofré wrote:
>> Hi Jesse,
>> just to understand your use case.
>> Verify is failing because you have a requirement on service active right ?
>> So that's why you have to add a features containing a bundle providing
>> this service. However, you have several service implementations
>> available and it's the user who decide the one he wants at runtime.
>> Correct ?
>> Regards
>> JB
>> On 29/11/2018 04:23, Jesse White wrote:
>>> Hi,
>>> We're currently leveraging the verify goal of the karaf-maven-plugin to
>>> validate our feature definitions but we're having trouble using it to
>>> test features that:
>>>  1) Import services via Blueprint
>>>  2) Do not explicitly depend on an implementation in the feature definition
>>> For example, in this Blueprint we reference an implementation of the
>>> AlarmDatasource:
>>> https://github.com/OpenNMS/oce/blob/4258f0791e8e4e8f7d6af9e4951ad0a237e80617/driver/main/src/main/resources/OSGI-INF/blueprint/blueprint.xml#L4
>>> But the feature has no explicit dependency on a bundle that provides
>>> such an implementation:
>>> https://github.com/OpenNMS/oce/blob/4258f0791e8e4e8f7d6af9e4951ad0a237e80617/karaf-features/src/main/resources/features.xml#L92
>>> In this case, there are many implementations available and we want to
>>> give the user the option which one to use.
>>> Is there any way to leverage the verify goal for these cases? We know
>>> that the service references will not be available, but would like to
>>> verify that everything else is correct.
>>> Thanks,
>>> Jesse

Jean-Baptiste Onofré
Talend - http://www.talend.com

View raw message