Expand my Community achievements bar.

SOLVED

How to add external jars in to the OSGI bundle?

Avatar

Level 3

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.

1 Accepted Solution

Avatar

Correct answer by
Level 7

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

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

View solution in original post

3 Replies

Avatar

Former Community Member

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.

Avatar

Correct answer by
Level 7

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

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

Avatar

Level 10

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