Is there Single module AEM Maven Archetype | Community
Skip to main content
Level 6
April 20, 2016
Solved

Is there Single module AEM Maven Archetype

  • April 20, 2016
  • 6 replies
  • 2133 views

If I use the AEM plugin for Eclipse then the Archetypes available through it are all multimodule projects.

 

Is there an archetype I can use to build single module OSGI components, such as an OSGI budle for use as a Servlet.

In the past I could do this from the command line using

$ mvn archetype:generate -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.0 -DarchetypeRepository=adobe-public-releases

 

But now I get

Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project lambda-java: The desired archetype does not exist (com.day.jcr.vault:multimodule-content-package-archetype:1.0.0)

 

Are there any AEM MAven archetypes for developing simple sling servlets.

Regards

Clive Stewart

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 smacdonald2008

See this article and the Maven command in it: 

https://helpx.adobe.com/experience-manager/using/first-osgi.html

DarchetypeRepository=http://repo.adobe.com/nexus/content/groups/public/ -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.2 -DgroupId=com.adobe.cq -DartifactId=key61 -Dversion=1.0-SNAPSHOT -Dpackage=com.adobe.cq -DappsFolderName=myproject -DartifactName="My Project" -DcqVersion="5.6.1" -DpackageGroup="My Company"

6 replies

kautuk_sahni
Community Manager
Community Manager
April 20, 2016

Hi 

For your second part of the problem, i would suggest you to have a look at this old forum thread :-

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__6s1u-hi_all_ive_b.html

Link:- https://github.com/kolorobot/spring-mvc-quickstart-archetype/issues/50

// Resolved the problem by removing the pom.xml file from the folder .

 

I hope this would be of some help to you.

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
smacdonald2008
smacdonald2008Accepted solution
Level 10
April 20, 2016

See this article and the Maven command in it: 

https://helpx.adobe.com/experience-manager/using/first-osgi.html

DarchetypeRepository=http://repo.adobe.com/nexus/content/groups/public/ -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.2 -DgroupId=com.adobe.cq -DartifactId=key61 -Dversion=1.0-SNAPSHOT -Dpackage=com.adobe.cq -DappsFolderName=myproject -DartifactName="My Project" -DcqVersion="5.6.1" -DpackageGroup="My Company"

Ratna_Kumar
Level 10
April 20, 2016

Hi Clive,

Yes as scott stated above, use the maven command as mentioned in the article: https://helpx.adobe.com/experience-manager/using/first-osgi.html

The command which you have referred is outdated one - $ mvn archetype:generate -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.0 -DarchetypeRepository=adobe-public-releases

This has been replaced to: mvn archetype:generate -DarchetypeRepository=http://repo.adobe.com/nexus/content/groups/public/ -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.2 -DgroupId=com.adobe.cq -DartifactId=key61 -Dversion=1.0-SNAPSHOT -Dpackage=com.adobe.cq -DappsFolderName=myproject -DartifactName="My Project" -DcqVersion="5.6.1" -DpackageGroup="My Company"

This perfectly works for me. Hope this helps!!

Thanks,
Ratna Kumar.

Level 6
April 20, 2016

kautuksahni wrote...

Hi 

For your second part of the problem, i would suggest you to have a look at this old forum thread :-

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__6s1u-hi_all_ive_b.html

Link:- https://github.com/kolorobot/spring-mvc-quickstart-archetype/issues/50

// Resolved the problem by removing the pom.xml file from the folder .

 

I hope this would be of some help to you.

Thanks and Regards

Kautuk Sahni

 


Thank you Kautuk,

 

I appreciate the help.

 

I will read at the thread. It makes sense the solution would lye in the pom

 

regards

Clive

Level 6
April 20, 2016

Hi Scott,

 

Thank you for both the article and the maven command.

 

I really appreciate all the help people have given me on this forum.

 

Regards

Clive

Level 6
April 20, 2016

Ratna Kumar wrote...

Hi Clive,

Yes as scott stated above, use the maven command as mentioned in the article: https://helpx.adobe.com/experience-manager/using/first-osgi.html

The command which you have referred is outdated one - $ mvn archetype:generate -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.0 -DarchetypeRepository=adobe-public-releases

This has been replaced to: mvn archetype:generate -DarchetypeRepository=http://repo.adobe.com/nexus/content/groups/public/ -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.2 -DgroupId=com.adobe.cq -DartifactId=key61 -Dversion=1.0-SNAPSHOT -Dpackage=com.adobe.cq -DappsFolderName=myproject -DartifactName="My Project" -DcqVersion="5.6.1" -DpackageGroup="My Company"

This perfectly works for me. Hope this helps!!

Thanks,
Ratna Kumar.

 


Hi Ratna,

 

The above maven command worked perfectly for me.

 

regards

Clive Stewart