Including Third Party Bundles in AEM | Community
Skip to main content
Level 3
August 8, 2023
Solved

Including Third Party Bundles in AEM

  • August 8, 2023
  • 3 replies
  • 1414 views

Hey Guys,

 

I want to add a third party bundle to my AEM project, Please let me know how it can be done and also I want to know when to use an embedded dependency. 

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

Hello @prashanthal ,

For most of the third-party bundles adding maven dependency in main pom.xml and core pom.xml the dependency bundle should be resolved.

However sometimes for some dependencies, the process is not done automatically. In that case, you need to make it OSGI-ready and embed the dependency. To do this you can follow this documentation:

Again if this documentation seems complex and not understandable exactly where to change you can follow this GitHub commit. Here this is shown the exact changes and processes:

https://github.com/Sady-Rifat/aem-demo/commit/65f8ce112744134728bf2f85d7bc5f131a2ef290 

Hope this helps you.

3 replies

aanchal-sikka
Community Advisor
Community Advisor
August 8, 2023

Sharing a blog which explains how to use Third-party bundles when:

  • Hosted in restricted Maven repo
  • Local repo (i.e. when maven repositories cannot be used)

https://techrevel.blog/2023/09/27/managing-third-party-dependencies-in-aem/

Aanchal Sikka
Sady_Rifat
Community Advisor
Sady_RifatCommunity AdvisorAccepted solution
Community Advisor
August 8, 2023

Hello @prashanthal ,

For most of the third-party bundles adding maven dependency in main pom.xml and core pom.xml the dependency bundle should be resolved.

However sometimes for some dependencies, the process is not done automatically. In that case, you need to make it OSGI-ready and embed the dependency. To do this you can follow this documentation:

Again if this documentation seems complex and not understandable exactly where to change you can follow this GitHub commit. Here this is shown the exact changes and processes:

https://github.com/Sady-Rifat/aem-demo/commit/65f8ce112744134728bf2f85d7bc5f131a2ef290 

Hope this helps you.

arunpatidar
Community Advisor
Community Advisor
August 8, 2023

You can check the below file for an example, I have added external sdi bundle in below project

 

https://github.com/arunpatidar02/aemaacs-aemlab/pull/21/files#diff-a2abfa682139cc5b49185d1f793b1e8865a4f9a2affdd04fdd7c4b66d9896e18 

Arun Patidar