Hi,
you should create feature, which contains all your bundles and all the
features your bundle needs. There are cxf and camel features. Blueprint
should be installed by default in Karaf.

If feature definition is missing on karaf (e.g. camel) then you should add
repository containing it via:

<repository>mvn:org.apache.camel.karaf/apache-camel/2.17.
1/xml/features</repository>

If other bundles are still missing then you should find features which
contains such bundles and add feature enrty in xml or write bundle entry
instead.

Look at my simple example here:
https://github.com/alien11689/feature-toggle/tree/master/
featuretoogle-karaf-feature

I think your feature xml should be similar to:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0";
name="your_features_repo_name">
    <feature name="your_feature_name" description="..." version="...">
        <repository>mvn:org.apache.
camel.karaf/apache-camel/your_camel_version/xml/features</repository>
        <feature dependency="camel">wrap</feature>
        <feature dependency="cxf">wrap</feature>
        <bundle start-level="80">your_bundle</bundle>
        ...
    </feature>
</features>

2017-02-05 10:53 GMT+01:00 Thomas Vandahl <[email protected]>:

> Hi folks,
>
> I'm a newbie in the OSGi area, so please excuse if I ask silly
> questions. However, even intensive googling did not help.
>
> We've created an application that consists of eight bundles based on
> Camel, CXF and Blueprint. We could run it in Karaf 4.0.7 just fine when
> all dependency features/bundles were installed manually.
>
> The obvious idea was to combine all bundles and their dependencies in a
> Karaf-feature for automatic installation. From reading the docs, I
> thought that having my bundles as dependencies of the feature artifact
> would do the trick. The feature file looked promising but Karaf could
> not resolve several packages, nor could I get the feature to
> karaf:verify successfully.
>
> What else did I try:
> - building the feature file by hand as an exact copy of what had been
> done manually at the Karaf console -> no success (the usual suspects you
> find when searching the internet: missing blueprint container, spring
> beans, jaxb AnnotationReader, aop alliance Advice etc)
> - reducing the complexity to just one basic bundle -> no success
> - defining boot-features and prerequisites as mentioned in some postings
> -> no success
> - adding required features as Maven dependencies -> no success
> - copy the structure of existing feature files -> no success
> - build a KAR instead of a feature -> no success
>
> Did I even get the whole idea right? Could you please point me to a
> tutorial-kind-of-thing that explains step by step how a feature artifact
> is supposed to work? Or to some help with debugging?
>
> Thanks in advance for any hint you can give.
> Bye, Thomas
>



-- 
Pozdrawiam / Regards,
Dominik Przybysz

Reply via email to