Archetype project for AEM SPA project | Community
Skip to main content
Employee
Feb 8, 2019 10:03 AM UTC
Solved

Archetype project for AEM SPA project

We were in need of an mvn archetype command for an AEM SPA project. We used the one present in the below link but getting an error saying “The desired project doesn’t exist <com.adobe.cq.spa.archetype:aem-spa-project-archetype:1.0.3-SNAPSHOT>” while exexuting a  mvn archetype command for AEM SPA

The mvn command is present in the github link provided below:

Command:

$ mvn archetype:generate \
     -DarchetypeCatalog=internal \
     -DarchetypeGroupId=com.adobe.cq.spa.archetypes  \
     -DarchetypeArtifactId=aem-spa-project-archetype  \
     -DarchetypeVersion=1.0.3-SNAPSHOT \
and 
$ mvn archetype:generate -B \
     -DarchetypeCatalog=local  \
     -DarchetypeGroupId=com.adobe.cq.spa.archetypes  \
     -DarchetypeArtifactId=aem-spa-project-archetype  \
     -DarchetypeVersion=1.0.3-SNAPSHOT \
     -Dpackage=<package> \
     -DgroupId=<group-id> \
     -DartifactId=<artifact-id> \
     -Dversion=<version> \
     -DprojectTitle="<project-title>"  \
     -DprojectName=<project-name>  \
     -DcomponentGroup=<component-group> \
     -DoptionFrontend=react

https://github.com/adobe/aem-spa-project-archetype, any pointers?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Gaurav-Behl
Gaurav-BehlAccepted solution
Level 10
Feb 8, 2019 9:09 PM UTC

Did you build & install the archetype as mentioned in instructions since the command you mentioned contains '-DarchetypeCatalog=internal or -DarchetypeCatalog=local'?  That should fix the issue.

Building SPA Starter Kit Archetype

$ mvn clean install archetype:update-local-catalog 

https://github.com/adobe/aem-spa-project-archetype#updating-list-of-locally-available-archetypes  Updating list of locally available archetypes

$ mvn archetype:crawl

Archetype catalog variants

Depending on the use case maven can use different archetype variant (use -DarchetypeCatalog to choose one):

2 replies

Gaurav-Behl
Level 10
Feb 12, 2019 12:55 AM UTC

I tested this and it worked fine after building the project and using 'local/internal'.

Translate
Gaurav-Behl
Gaurav-BehlAccepted solution
Level 10
Feb 8, 2019 9:09 PM UTC

Did you build & install the archetype as mentioned in instructions since the command you mentioned contains '-DarchetypeCatalog=internal or -DarchetypeCatalog=local'?  That should fix the issue.

Building SPA Starter Kit Archetype

$ mvn clean install archetype:update-local-catalog 

https://github.com/adobe/aem-spa-project-archetype#updating-list-of-locally-available-archetypes  Updating list of locally available archetypes

$ mvn archetype:crawl

Archetype catalog variants

Depending on the use case maven can use different archetype variant (use -DarchetypeCatalog to choose one):

Translate