Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

kautuk_sahni
Community Manager
Community Manager

BlogImage.jpg

Create/build and install OSGi bundle of third party APIs/dependency using maven plugins by 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.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies