Expand my Community achievements bar.

SOLVED

AEM 6.5 Project Archetype 23 is not working

Avatar

Level 2

Dear All,

I'm new in AEM and trying to learn through self learning. As per Adobe document for AEM 6.5.0 we can create new AEM site using Maven and it's adobe Archetype. I followed the same and use Archetype 23 to create New Maven base AEM CMS project. But my build is falling and getting below error.

Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.adobe.aem:aem-project-archetype:23).

Latest archetype like 41,40,30.... are for AEM 6.5.XX versions. Can I use these with 6.5? will I get any errors in future with the latest archetype with AEM 6.5.0.?

 

I had tried following mvn commands for the same but getting the same errors.

 

mvn -B archetype:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=23 -D aemVersion=6.5.0 -D appTitle="My Site" -D appId="mysite" -D groupId="com.mysite" -D frontendModule=none -D includeExamples=n -D includeDispatcherConfig=n -Padobe-public


mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=23 -D appTitle="My Site" -D appId="mysite" -D groupId="com.mysite" -D aemVersion=6.5.0 -Padobe-public

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Always use the latest archetype to generate the project structure. You should be able to use project structure with 6.5.0 version. Open the command prompt in admin mode. Below is a sample command :-

mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=39 -D appTitle="My Site" -D appId="mysite" -D groupId="com.mysite" -D aemVersion=6.5.5 -D includeExamples=n -D includeErrorHandler=y

 

https://github.com/adobe/aem-project-archetype

 

Thanks,

Somen

View solution in original post

3 Replies

Avatar

Community Advisor

hi @pkumarp1 ,

 

Ensure compatibility and avoid potential issues by using the archetype version that matches your AEM version. Due to the fact that the latest archetypes are for AEM 6.5.xx versions, it is best to use archetype version 22, which is closest to AEM 6.5.0.

The latest archetype version may work with AEM 6.5.0, but there is a greater chance of running into issues because of the differences in underlying technologies and dependencies.

Avatar

Correct answer by
Community Advisor

Hi,

Always use the latest archetype to generate the project structure. You should be able to use project structure with 6.5.0 version. Open the command prompt in admin mode. Below is a sample command :-

mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=39 -D appTitle="My Site" -D appId="mysite" -D groupId="com.mysite" -D aemVersion=6.5.5 -D includeExamples=n -D includeErrorHandler=y

 

https://github.com/adobe/aem-project-archetype

 

Thanks,

Somen

Avatar

Level 2

Hi,

 

Always use https://github.com/adobe/aem-project-archetype as a reference for latest archetype details.

If you are particularly interested creating AEM project using archetype 22 then use below command 

 

mvn archetype:generate -D archetypeGroupId=com.adobe.granite.archetypes -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=22 -D appTitle="My Site" -D appId="mysite" -D groupId="com.mysite" -D aemVersion=6.5.0