Search code examples
osgiapache-felixosgi-bundlekarafblueprint-osgi

How can I run OSGi blueprint in Felix in Scala?


I am able to get OSGi blueprint to work in Karaf, but I don't understand how to do it in Apache Felix, or my question can be also defined as how can I use OSGi blueprint in plain OSGi?

I made an example here https://github.com/PhilAndrew/sbt-osgi-felix-akka-blueprint-camel using https://github.com/doolse/sbt-osgi-felix in which Akka is working but Blueprint and Camel not yet working.

This question may help Is Apache Aries running in Felix?


Solution

  • It's not starting Blueprint because your bundle's code doesn't actually rely on any of the classes in blueprint, so you either need to add "Require-Bundle" header to your manifest:

    requireBundle := Seq("org.apache.aries.blueprint")
    

    or add the bundles that needed to be started to the osgiDependencies of run:

    osgiDependencies in run := bundleReqs("org.apache.aries.blueprint.core", 
    "org.apache.aries.proxy")