Hi All,,
In one of my sling servlet we are parsing a xml for this we are using dom4j.
To compile these classes i have included below Maven dependency.
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.3</version>
</dependency>
When i create bundle and installing through Maven bulid script this classes in this jar are not reflecting.
Do i need to make any changes build script to automatically deploy into CQ server?
Thanks,
Kishore
Solved! Go to Solution.
Views
Replies
Total Likes
Use Eclipse plug-in project to wrap the JAR into an OSGi bundle and deploy the bundle to AEM. See this article to learn how to wrap a JAR into an OSGi using Eclipse plug-in project:
https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html
As an example - notice how we wrap the simple JSON JAR into an OSGi bundle.
Views
Replies
Total Likes
You need either to embed this dependency into your jar or deploy an osgi-version of that jar into AEM. Google says, that Apache servicemix provides an OSGI version of dom4j, so you can deploy it together with your bundles into AEM.
kind regards,
Jörg
Views
Replies
Total Likes
Jörg Hoh wrote...
You need either to embed this dependency into your jar or deploy an osgi-version of that jar into AEM. Google says, that Apache servicemix provides an OSGI version of dom4j, so you can deploy it together with your bundles into AEM.
kind regards,
Jörg
Thanks Jorg,
Could you please explain in detail, and how to do this?
Views
Replies
Total Likes
Please refer to the following links for more details on how you can achieve this:
How to embed a jar: https://github.com/cytoscape/cytoscape-app-samples/blob/master/sample-embed-dependencies/pom.xml
Few basic concepts: http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html
Let me know if you need anything else.
Views
Replies
Total Likes
Use Eclipse plug-in project to wrap the JAR into an OSGi bundle and deploy the bundle to AEM. See this article to learn how to wrap a JAR into an OSGi using Eclipse plug-in project:
https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html
As an example - notice how we wrap the simple JSON JAR into an OSGi bundle.
Views
Replies
Total Likes