Command:
mvn -B archetype:generate
-D archetypeGroupId=com.adobe.aem
-D archetypeArtifactId=aem-project-archetype
-D archetypeVersion=24
-D aemVersion=6.5.0
-D appTitle="My Site"
-D appId="mysite"
-D groupId="com.mysite"
-D frontendModule=general
-D includeExamples=n
Error:
[WARNING] CP Don't override file /Users/test/mysite/ui.tests/test-module/wdio.conf.commons.js
[INFO] Parent element not overwritten in /Users/test/mysite/ui.apps.structure/pom.xml
[INFO] Executing META-INF/archetype-post-generate.groovy post-generation script
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.651 s
[INFO] Finished at: 2022-01-04T02:22:04+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] 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
[ERROR]
[ERROR] groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-all is loaded in version 2.4.16 and you are trying to load version 2.4.8
[ERROR] at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:529)
[ERROR] at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:81)
[ERROR] at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerExtensionModuleFromProperties(MetaClassRegistryImpl.java:174)
[ERROR] at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$registerExtensionModuleFromProperties.call(Unknown Source)
[ERROR] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
Solved! Go to Solution.
Thanks @SantoshSai @arunpatidar @edodemuru for your comments.
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
Am not sure how this is working for others
Hi,
I had the same issue and I fixed it going on my local maven repository, under the
.m2\repository\org\codehaus\groovy folder and manually deleted the 2.4.16 version of the grovy-all and of the groovy dependency installed there.
This worked for me, maybe it can help you too.
I tried it earlier and not works for me
Hi,
You may need to update the gradle version, check below link if help
I believe that gradle need not be installed for creating sample project using maven archetype. Please correct me if my understanding is incorrect.
Hi @sankarr26533925
Could you please try this below command by including the word sudo to the build maven command?
sudo mvn -B archetype:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=24 -D aemVersion=6.5.0 -D appTitle="My Site" -D appId="mysite" -D groupId="com.mysite" -D frontendModule=general -D includeExamples=n
Regards,
Santosh
Same error using your command too.
Using sudo to resolve issues like this should be discouraged, as you can create other issues such as file permissions etc later on down the line when you try to use mvn again.
Thanks @SantoshSai @arunpatidar @edodemuru for your comments.
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
Am not sure how this is working for others
Thanks @sankarr26533925 : This worked for me.
Thanks @sankarr26533925 for the solution. Worked for me.
Thankyou. Worked for me.
This worked for me. Thanks
Thanks @sankarr26533925. Worked for me.
Thanks bro! This helped me to resolve the issue I was facing to create a project.
you are my lifesaver.
Views
Replies
Total Likes
This is fixed as an issue at https://github.com/adobe/aem-project-archetype/issues/857
Just use maven archetype plugin 3.2.0 like below
example:
mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.0:generate \ -D archetypeGroupId=com.adobe.aem \ -D archetypeArtifactId=aem-project-archetype \ -D archetypeVersion=33 \ -D appTitle="My Site" \ -D appId="mysite" \ -D groupId="com.mysite"