0

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?

Community
  • 1
  • 1
Phil
  • 46,436
  • 33
  • 110
  • 175

2 Answers2

1

Apache Karaf also runs on felix. So for the most part you just need to install the correct bundles and maybe do the necessary system package exports if you hit package use constraint violations.

Check what karaf installs and try to do the same.

Christian Schneider
  • 19,420
  • 2
  • 39
  • 64
1

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")
Community
  • 1
  • 1
  • Thanks for the attempt to help me, that didn't make the blueprint start, how can I reason about this to get it to work? – Phil Oct 18 '15 at 09:37
  • Try the following dependencies, they worked for me: `osgiDependencies in run := bundleReqs("org.apache.aries.blueprint.core", "org.apache.aries.proxy")` – Jolse Maginnis Oct 19 '15 at 04:17
  • Thanks very much Jolse, how do you know that? I updated my project and that makes Camel work. – Phil Oct 21 '15 at 13:17