Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

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

Avatar

Level 2

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:

Archetype Error 1.PNG

Error Type 2:

rohitk81560102_0-1641808596111.png

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.

1 Accepted Solution

Avatar

Correct answer by
Level 2

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

View solution in original post

2 Replies

Avatar

Correct answer by
Level 2

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

Avatar

Level 2

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. 

@grab(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...