AEM project generated using archetype 26 for AEM Cloud giving different errors on build | Community
Skip to main content
January 10, 2022
Solved

AEM project generated using archetype 26 for AEM Cloud giving different errors on build

  • January 10, 2022
  • 2 replies
  • 1171 views

Getting different types of error while trying to build AEM project generated from following archetype command:
mvn archetype:generate -B -DarchetypeGroupId=com.adobe.aem -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=26 -DaemVersion=cloud -DsdkVersion=2021.11.6058.20211123T163652Z-211000 -DartifactId=genc-aem-training -DappTitle="AEM project" -DappId="aem-project" -DgroupId="com.aemproject" -DincludeDispatcherConfig=n

Error Type1:

Error Type 2:

Error Type 3:
Failed to execute goal ‘com.github.eirslett:frontend-maven-plugin:<plugin_version>:npm’ (npm install) on project’s ui.frontend module.

 

Ideally project generated using archetype should not give build errors. Could you please help.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by dudeniraj

Delete the module groovy-all from repository with (2.4.16) version, then try to build the project.

2 replies

dudenirajAccepted solution
January 10, 2022

Delete the module groovy-all from repository with (2.4.16) version, then try to build the project.

January 12, 2022

If above solution doesn't work, then try below.

 

Due to maven-archetype-plugin version 3.2.1, pom file has 2.4.16 version for groovy-all

 

<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.4.16</version>
<scope>compile</scope>
</dependency>

 

.m2/repository/org/apache/maven/archetype/archetype-common/3.2.1/archetype-common-3.2.1.pom:      <version>2.4.16</version>

 

post-generate groovy using 2.4.8 version in below annotation. This is creating conflict and showing the error. 

@16061806(group="org.codehaus.groovy"module="groovy-all"version="2.4.8")

 

https://github.com/adobe/aem-project-archetype/blob/develop/src/main/resources/META-INF/archetype-po...

 

To resolve this issue using workaround, I updated 2.4.8 version in below POM under local .m2 repository. This might help someone in future

.m2/repository/org/apache/maven/archetype/archetype-common/3.2.1/archetype-common-3.2.1.pom

 

 

Refer thread: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/error-while-building-maven-archetype-24/m-p/436094