Solved
getting groovy error while creating new aem project using maven archtype
Hi All ,
I am using latest aem-project-archetype to create project on mac book terminal.
INFO] Executing META-INF/archetype-post-generate.groovy post-generation script
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.011 s
[INFO] Finished at: 2025-06-07T22:46:22-07: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]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
but getting below error.
INFO] Executing META-INF/archetype-post-generate.groovy post-generation script
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.011 s
[INFO] Finished at: 2025-06-07T22:46:22-07: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]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I have
JDK 11
Maven 3.9.6
Groovy 4.0.27