Uploading JAR in CRXDE | Community
Skip to main content
hitesh_m
Level 3
February 5, 2016
Solved

Uploading JAR in CRXDE

  • February 5, 2016
  • 3 replies
  • 1996 views

Hi, 

I am creating an OSGI bundle from CRXDE. I am able to create bundle and use this in my component. It works. 

But the problem is when I have to use eternal jar (third party jar), I am getting no way to add it. 

I tried to create OSGI bundle to that JAR and upload in web console, its still not working. Though my OSGI bundle created successfully and installed successfully. 

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 smacdonald2008

First - its not best practice to build OSGi bundles using CRXDE. That is depreciated and not recommended

You should always use Maven. 

You should never upload JARs into CRXDE lite. If your bundle needs to use a 3rd party JAR - like simple JSON Jar, you should wrap that into an OSGi bundle. We document how to use an Eclipse plug-in project to wrap a 3rd party JAR into an OSGi bundle. Then deploy the OSGi bundle to AEM so the depedencies are in AEM. 

Getting back to CRXDE - why are you using that to build OSGi bundles? 

3 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
February 5, 2016

First - its not best practice to build OSGi bundles using CRXDE. That is depreciated and not recommended

You should always use Maven. 

You should never upload JARs into CRXDE lite. If your bundle needs to use a 3rd party JAR - like simple JSON Jar, you should wrap that into an OSGi bundle. We document how to use an Eclipse plug-in project to wrap a 3rd party JAR into an OSGi bundle. Then deploy the OSGi bundle to AEM so the depedencies are in AEM. 

Getting back to CRXDE - why are you using that to build OSGi bundles? 

smacdonald2008
Level 10
February 5, 2016

See this new community article to learn how to build OSGi bunldes using Maven and then how to handle 3rd party Java dependencies with Experience Manager.

Notice that we build the main OSGi service bundle using Maven. Then notice how we use an Eclipse plug-in project to wrap the 3 JARs that represent the dependencies that we need to get into AEM.

See: 

https://helpx.adobe.com/experience-manager/using/aem_wordpress.html

Hope this helps

PS - as stated above - never use CRXDE to build OSGi. 

Lokesh_Shivalingaiah
Level 10
February 5, 2016

I agree with @scott, CRXDE should be used for a quick fixes around components and templates.

For building OSGi bundles, please use maven projects and you can refer the above link mentioned.

You can also use AEM plugin if you are using Eclipse and find details about it here [1]

[1] http://adobeaemclub.com/how-to-set-up-aem-projects-using-eclipse-plugin/