Build Failure while creating the project archetype 29 | Community
Skip to main content
New Participant
February 14, 2023
Solved

Build Failure while creating the project archetype 29

  • February 14, 2023
  • 4 replies
  • 7909 views

Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate (default-cli) on project standalone-pom: startup failed:
[ERROR] General error during conversion: Conflicting module versions. Module [groovy-all is loaded in version 2.4.16 and you are trying to load version 2.4.8

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 SantoshSai

Hi @danish_hussain ,

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 - you can update 2.4.8 version in below POM under local .m2 repository. 

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

Hope that helps!

Regards,

Santosh

4 replies

New Participant
December 22, 2023

Did you got solution for this issue. I am also facing same issue, so please share the solution.

arunpatidar
New Participant
February 15, 2023
SantoshSai
SantoshSaiAccepted solution
New Participant
February 14, 2023

Hi @danish_hussain ,

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 - you can update 2.4.8 version in below POM under local .m2 repository. 

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

Hope that helps!

Regards,

Santosh

Santosh Sai
nitesh_kumar-1
Employee
February 14, 2023

Hi @danish_hussain ,

 

I would recommend using the later version (Ideally the latest) of the archetype, looks like this was raised as an issue with an older archetype and it has been fixed in the newer version.

 

See here:-

https://github.com/adobe/aem-project-archetype/issues/861 

https://github.com/adobe/aem-project-archetype/issues/857 

 

Hope that helps!

 

Regards,

Nitesh

Sady_Rifat
New Participant
February 15, 2023

Hello @nitesh_kumar-1,
What is the recommendation from Adobe for the old archetype projects? Since a project has been running for years after years, archetypes and the latest features are coming up by this time.

How should the old projects align with the new archetype? Is there any guideline from Adobe?

Sorry, this is not fully related to this topic. I will be happy to know the answer.