Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

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

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Level 9

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.

View solution in original post

4 Replies

Avatar

Level 10

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

Avatar

Level 10

"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...

Avatar

Level 10

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...

Avatar

Correct answer by
Level 9

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.