Create/build and install OSGi bundle of third party APIs/dependency using maven plugins | AEM Community Blog Seeding | Community
Skip to main content
kautuk_sahni
Community Manager
Community Manager
February 26, 2021

Create/build and install OSGi bundle of third party APIs/dependency using maven plugins | AEM Community Blog Seeding

  • February 26, 2021
  • 0 replies
  • 703 views

BlogImage.jpg

Create/build and install OSGi bundle of third party APIs/dependency using maven plugins by My AEM Learnings

Abstract

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
1. 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  in official plugin page (Mentioned the link at the end in Reference section)

2. transitive dependencies (dependencies which our third party API is dependent on - highlighted in green in below screenshot is responsible for the same)
With this plugin information in the  tag + third party dependency of our interest in  section along with details like group id, artifact id in pom.xml file will help create OSGi bundle using the command - mvn package or mvn clean package

Read Full Blog

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

Q&A

Please use this thread to ask the related questions.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.