Expand my Community achievements bar.

SOLVED

including exeternal jar while creating a bundle using CRXDE

Avatar

Level 5

I am reading documentation and it says to use an external jar, just create a libs folder under src and use "Import -> file".  There is no import file option if I right click a folder in crxde.

http://helpx.adobe.com/experience-manager/using/creating-osgi-bundles-digital-marketing.html

Here at the "include external jar" step it lists how to include the jar.

Then I read the following documentation:

http://wem.help.adobe.com/enterprise/en_US/10-0/core/developing/development_tools/developing_with_cr...

It says I can copy the jar file and paste it at any node. NOPE, I hit copy on the jar and right click on the libs folder and no option to paste. It also says i can drag and drop, again a NO!

How do I somehow have this jar file moved to the libs folder>

1 Accepted Solution

Avatar

Correct answer by
Level 10

These documents are now outdated. We will update them to mention that. When they were written - it was recommended to create an OSGi bundle using CRXDE. 

Now it's recommended to use Maven to create an OSGi bundle - not CRXDE. See this document instead:

Creating your first AEM Service using an Adobe Maven Archetype project

Also - to include an External JAR file in AEM, you now create an Eclipse plug-in project to create an OSGi bundle fragment. We have a community article that shows you how to do this. See this community article. It builds a Sling Servlet that uses the JSON SImple JAR file. It also covers how to wrap the Simple JSON JAR in an OSGi bundle fragment and deploy to AEM as a separate bundle. See:

Submitting Adobe CQ form data to Java Sling Servlets

To summarize:

1 - use Maven to create an OSGi bundle that contains Java classes that contain app logic (a service, a servlet, etc)

2 - use an Eclipse plug-in project to wrap 3rd party JARs into a bundle fragment. Deploy to AEM. 

The 2nd article covers points 1 and 2. The 1st article covers point 1 (it creates a service).  

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

These documents are now outdated. We will update them to mention that. When they were written - it was recommended to create an OSGi bundle using CRXDE. 

Now it's recommended to use Maven to create an OSGi bundle - not CRXDE. See this document instead:

Creating your first AEM Service using an Adobe Maven Archetype project

Also - to include an External JAR file in AEM, you now create an Eclipse plug-in project to create an OSGi bundle fragment. We have a community article that shows you how to do this. See this community article. It builds a Sling Servlet that uses the JSON SImple JAR file. It also covers how to wrap the Simple JSON JAR in an OSGi bundle fragment and deploy to AEM as a separate bundle. See:

Submitting Adobe CQ form data to Java Sling Servlets

To summarize:

1 - use Maven to create an OSGi bundle that contains Java classes that contain app logic (a service, a servlet, etc)

2 - use an Eclipse plug-in project to wrap 3rd party JARs into a bundle fragment. Deploy to AEM. 

The 2nd article covers points 1 and 2. The 1st article covers point 1 (it creates a service).  

Avatar

Level 10

This document was updated. 

http://helpx.adobe.com/experience-manager/using/creating-osgi-bundles-digital-marketing.html

It points to the Maven article (specified above) as the way to create OSGi bundles for AEM.  

Avatar

Level 10

Also - to include an External JAR file in AEM, you now create an Eclipse plug-in project to create an OSGi bundle fragment. We have a community article that shows you how to do this. See this community article. It builds a Sling Servlet that uses the JSON SImple JAR file. It also covers how to wrap the Simple JSON JAR in an OSGi bundle fragment and deploy to AEM as a separate bundle. See:

Submitting Adobe CQ form data to Java Sling Servlets

To summarize:

1 - use Maven to create an OSGi bundle that contains Java classes that contain app logic (a service, a servlet, etc)

2 - use an Eclipse plug-in project to wrap 3rd party JARs into a bundle fragment. Deploy to AEM. 

The above article covers points 1 and 2.