Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

How to create an Adobe Experience Manager (AEM) project using Archetype?

Avatar

Level 2

We are trying to create a basic AEM Project using the current archetype version 52. Folders and files are created but we receive an error in the groovy post-generation script.

 

We are using the following command:

 

mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.3.1:generate \
-D archetypeGroupId=com.adobe.aem \
-D archetypeArtifactId=aem-project-archetype \
-D archetypeVersion=52\
-D appTitle="Test Project" \
-D appId="testproject" \
-D groupId="com.testproject"

 

This is the error message:

----------------------------------------------------------------------------------------------------------------

[INFO] Executing META-INF/archetype-post-generate.groovy post-generation script
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.256 s
[INFO] Finished at: 2025-04-10T10:21:53+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.3.1:generate (default-cli) on project standalone-pom: startup failed:
[ERROR] Script1.groovy: 2: unable to resolve class groovy.util.XmlSlurper
[ERROR] @ line 2, column 1.
[ERROR] import groovy.util.XmlSlurper
[ERROR] ^
[ERROR]
[ERROR] 1 error
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.3.1:generate (default-cli) on project standalone-pom: startup failed:
Script1.groovy: 2: unable to resolve class groovy.util.XmlSlurper
@ line 2, column 1.
import groovy.util.XmlSlurper
^

1 error

-------------------------------------------------------------------------------------

 

Any help is highly appreciated.

 

Thanks,

Jens.

 

2 Replies

Avatar

Community Advisor

Hi @JensTi 

 

The remote repository seems unable to download resources from new version maven-archetype-plugin:3.3.1. It is still trying to access the older versions 

 

Can you try using maven-archetype-plugin:3.2.1:generate. Please refer below link

 

https://github.com/adobe/aem-project-archetype/blob/aem-project-archetype-52/README.md#usage

 

Hope this helps

 

Thanks

Avatar

Level 2

Hello @PRATHYUSHA_VP ,

 

yes, it works with maven-archetype-plugin:3.2.1

 

Thanks for Your help.

 

Kind Regards,

Jens.