Expand my Community achievements bar.

SOLVED

Build Failure while creating the project archetype 29

Avatar

Level 1

danish_hussain_0-1676405069672.png

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

5 Replies

Avatar

Employee Advisor

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

Avatar

Community Advisor

Hello @nitesh_kumar,
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.

Avatar

Correct answer by
Community Advisor

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

Avatar

Level 1

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