Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Error while building a project using Manven

Avatar

Level 2

hi all,
I'm trying to build a sample project using maven archetype, but encountered an error.

archetype
mvn -B archetype:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=26 -D appTitle="My Project" -D appId="myproject" -D groupId="com.myproject.aem" -D artifactId="myproject-aem-project" -D version="1.0.0-SNAPSHOT" -D aemVersion="6.5.0" -D includeDispatcherConfig=n -D includeExamples=n
Please let me know how to resolve this.

e9e367c5-7954-4ea4-b2f6-f5bb51c214b6.jpg
I'm using Maven - 3.6.3, JDK - 11,  AEM 6.5.0

I also checked adobe profile in .m2/settings.xml/ (working fine) and deleted the repositories and ran the same archetype but still facing the same error.



1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

hi @rohith_m ,

Please updated the following POM found at path :
.m2/repository/org/apache/maven/archetype/archetype-common/3.2.1/archetype-common-3.2.1.pom and update the groovy-all dependency version from 2.4.16 to 2.4.8:

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

And then delete the created project folder and re-run the command you are using.
I have tested locally and works well for me.

Thanks.

View solution in original post

4 Replies

Avatar

Correct answer by
Employee Advisor

hi @rohith_m ,

Please updated the following POM found at path :
.m2/repository/org/apache/maven/archetype/archetype-common/3.2.1/archetype-common-3.2.1.pom and update the groovy-all dependency version from 2.4.16 to 2.4.8:

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

And then delete the created project folder and re-run the command you are using.
I have tested locally and works well for me.

Thanks.

Avatar

Employee Advisor

I would recommend to switch to a newer version of the archetype. Current version should be 32.

Avatar

Level 2

Thanks for the replies.
hey @arunpatidar 
I replaced the given file still issue not solved. the thread continued to change the gradle and all , But why there is no optimal solution for this.
hi @Jörg_Hoh 
Even the latest archetypes giving the same errors.
Hi @milind_bachani 
It worked. saved my day.
got build success.

Thanks all.
keep answering these kinda queries, this will be helpful for candidates like me.