Search code examples
javaosgiapache-felixapache-karafosgi-bundle

In Karaf, is there any way to control the order in which kar files load? Regarding cross-kar file dependencies


It appears in karaf, that if kar file A has a feature that depends on a feature in kar file B, and kar file A loads before B, the install of the features in kar file A will fail, saying there is an unresolved dependency.

bundle start-levels don't seem to make a difference.

Is there any way of controlling which kar file loads first? Or a way to resolve cross-kar dependencies? Or even a way to make karaf not try to install any bundles/features until all the kar files are loaded?


Solution

  • To my knowledge it's not possible right now since the KAR deployer thinks of a KAR file to be complete. If you need such dependencies I recomend using plain features.xml files.