Search code examples
osgiapache-karafapache-felix

Equivalent of feature:repo-add and feature:install in Apache Felix


I am familiar of feature:repo-add and feature:install in Karaf. I am looking for similar thing in Apache Felix or any alternate way to do the same.


Solution

  • If you want to deploy on plain felix without karaf then I recommend using the bnd packaging.

    It is used in the enroute tutorials (you need to switch to felix as they use equinox by default). You give it a repository of the bundles to draw from (pom file) and a bndrun file. The output is a runnable jar with all bundles and felix included. When looking at the bndrun ignore the runbundles .. you do not have to write them. Threy are automatically generated.

    When deciding between karaf and bnd packaging keep in mind that you do not have the pre defined features of karaf. So finding the set of bundles for the repo is a bit more work. You can use the list of bundles from the karaf features you use as a good starting point.

    See https://github.com/osgi/osgi.enroute/tree/master/examples/quickstart/app