Expand my Community achievements bar.

SOLVED

Uploading JAR in CRXDE

Avatar

Level 3

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. 

1 Accepted Solution

Avatar

Correct answer by
Level 10

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? 

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

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? 

Avatar

Level 10

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. 

Avatar

Level 10

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/