Karaf includes a deployer that is able to deploy plain blueprint or spring-dm configuration files. The deployer will transform on the fly any spring configuration file dropped into the deploy folder into a valid OSGi bundle. The generated OSGi manifest will contain the following headers:
Manifest-Version: 2 Bundle-SymbolicName: [name of the file] Bundle-Version: [version of the file] Spring-Context: *;publish-context:=false;create-asynchronously:=true Import-Package: [required packages] DynamicImport-Package: *
The name and version of the file are extracted using a heuristic that will match common patterns. For example
my-config-1.0.1.xml will lead to name = my-config and version = 1.0.1.
The default imported packages are extracted from the Spring file definition and includes all classes referenced directly.
If you need to customize the generated manifest, you can do so by including an xml element in your Spring configuration:
<spring:beans ...> <manifest> Require-Bundle= my-bundle </manifest> ... </spring:beans>