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.