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.
Solved! Go to Solution.
Views
Replies
Total Likes
Delete the module groovy-all from repository with (2.4.16) version, then try to build the project.
Delete the module groovy-all from repository with (2.4.16) version, then try to build the project.
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")
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...