Spring MVC, 3rd party jar as bundle in AEM . | Community
Skip to main content
New Participant
June 3, 2017
Solved

Spring MVC, 3rd party jar as bundle in AEM .

  • June 3, 2017
  • 4 replies
  • 2312 views

Hi,

This is Arun, i am new to Adobe AEM, at present i am using sling for controller. is it possible to using springmvc in

AEM.

Also i have one more doubt.

How to create a bundle in AEM through Maven. i want to use maven <dependencies>

to export 3rd party party as felix bundles.if used Maven-bundle-plugin to create a bundle.

but it is not adding 3rd party jar which is not in bundle format.i.e lacks (metadata- import-package, exportpackage,embed-dependencies)

please suggest me good practices to do. i not want to do it by adding jar cvfm command to create bundle.

i want to do in maven script.

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 Jitendra_S_Toma

Hi Arun,

Is there any specific reason to use Spring MVC? If you explore the sling & under line technology and how AEM works, it is basically MVC with a big different way. Although AEM is not just web application tool.

So, whatever functionality you want to achieve through Spirng MVC, you can achieve the same using Apache Sling & rest API.

I hope this helps.

4 replies

Jitendra_S_Toma
Jitendra_S_TomaAccepted solution
New Participant
June 4, 2017

Hi Arun,

Is there any specific reason to use Spring MVC? If you explore the sling & under line technology and how AEM works, it is basically MVC with a big different way. Although AEM is not just web application tool.

So, whatever functionality you want to achieve through Spirng MVC, you can achieve the same using Apache Sling & rest API.

I hope this helps.

smacdonald2008
New Participant
June 3, 2017

Last to export a third-party JAR as an OSGi bundle - you can use an Eclipse plug-in project. Look at how we handle the 3rd party Simple JSON JAR in this article --

Scott's Digital Community: Submitting Adobe Experience Manager form data to custom Sling Servlets

We have video too that you can watch and see it in action...

smacdonald2008
New Participant
June 3, 2017

"How to create a bundle in AEM through Maven."

See this community artilce -- it will teach you how to write a basic HTL component, including the back-end Java part of the component as a bundle using Maven. There is also a video that you an watch.

Scott's Digital Community: Creating an AEM HTML Template Language component that uses the WCMUsePojo class

smacdonald2008
New Participant
June 3, 2017

I would not recommend using Spring MVC in AEM. When using AEM, you use Sling and Apache based APIs. Instead of using auto-writing - you use Dependency Injection and Sling Models.

Apache Sling - Sling Models