Skip to main content
viren_pushpanay
Level 2
Oct 16, 2015 2:27 AM UTC
Solved

How to add external jars in to the OSGI bundle?

Hello,

I am planning on using Jackson to process JSON. How can I include Jackson libraries in to the OSGI bundle? I am using IntelliJ. Adding the Jackson library as a Maven dependency does not work.

Thank you.

Cheers,

Viren.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Ojjis
OjjisAccepted solution
Level 7
Oct 16, 2015 2:27 AM UTC

Hi Viren.
I've explained something about this in this thread : http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__uatx-i_need_to_writeacu.html

There I've included the jar as a dependency and then exported the classes of interest in the export packages section in the pom. I hope this will help you :)

/Johan

3 replies

smacdonald2008
Level 10
Oct 16, 2015 2:27 AM UTC

We have many community articles that cover this topic and walk you through how to do this. See this one.

http://scottsdigitalcommunity.blogspot.ca/2013/06/posting-form-data-to-adobe-cq-using.html

IN this article -- there was a dependency on a JSON Java library. Therefore we had to get the JSON JAR into a bundle and deployed to AEM. In this article - this is explained here (step by step using the Eclipse plug-in):

[img]Abundle.png[/img]

This provides step by step for maruthid's response above (which is correct). Ojjis provides another correct answer as well. 

Hope this helps

Translate
Ojjis
OjjisAccepted solution
Level 7
Oct 16, 2015 2:27 AM UTC

Hi Viren.
I've explained something about this in this thread : http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__uatx-i_need_to_writeacu.html

There I've included the jar as a dependency and then exported the classes of interest in the export packages section in the pom. I hope this will help you :)

/Johan

Translate
Oct 16, 2015 2:27 AM UTC

First convert those jars in to bundles and add them as dependencies. If you are using eclipse you can use Plug-in Development >>>>>> Plugin Project. After creating bundles deploy them as seperate bundles in your felix. At compile time you can refer them by using system path in your dependencies.

Translate