Posts

Showing posts from February, 2021

Create/build and install OSGi bundle of third party APIs/dependency using maven plugins

Image
This post details the steps to create and deploy OSGI bundle out of third party API/dependency using relevant plugins in simple maven project. We would have been in situation where OSGi bundle created out of third party jar is added/available in our instance and our project code base using the third party bundle being in active state. However at the time of execution, ClassNotFound or NoClassDefFound error pops up. This is the case when the dependencies of our desired third party API is not included/available when it is added as an OSGi bundle. We can overcome this by creating the bundle using maven-bundle-plugin which has option to include direct (desired third party dependency - highlighted in red in below screenshot -  * -  to include all the dependency entry in the pom.xml file or  artifactId name if we would like to mention explicitly  Note : There are several other possible options documented for <Embed-Dependency> in official plugin page (Mentioned the link at the end in