Reputation: 3503
I am moving my spring-java project to osgi.
I have some dependencies which are not available as bundles in the spring ebr repo or in maven repo. What are the best ways to handle them?
The options I can think of are
Any other suggestions or which of the above is advisable?
Upvotes: 1
Views: 284
Reputation: 19626
If you use apache karaf there is an option to bundle any jar from a maven repo on the fly. You just use the uri install -s wrap:mvn:groupId/artifactId/version. This will use bnd to bundle the jar with default settings and installs it. This works for example with the oracle jdbc driver.
Upvotes: 0
Reputation: 8275
The most advisable way is your first option, because that is the 'OSGi way'. This way you can better modularise your application and share the same bundle in different client bundles. You can also benefit from the version management inherent in OSGi.
You don't necessarily have to use Maven to create bundles from the JARs, although that may help. You can also use bnd to wrap a JAR as an OSGi bundle.
Upvotes: 4