Maven Archetype 35 AEM Project Creation | Community
Skip to main content
Level 2
October 28, 2022
Solved

Maven Archetype 35 AEM Project Creation

  • October 28, 2022
  • 2 replies
  • 7492 views

I'm trying to create a maven project using archetype 35. I used the below command for the same and received the below error. 

 

mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate \ -D archetypeGroupId=com.adobe.aem \ -D archetypeArtifactId=aem-project-archetype \ -D archetypeVersion=35 \ -D appTitle="AEM GEEKS" \ -D appId="aemgeeks" \ -D groupId="com.aem.geeks" \ -D artifactId="aem-geeks" \ -D package="com.aem.geeks" \ -D version="0.0.1-SNAPSHOT" \ -D aemVersion="6.5.10"

 

Error - 

The goal you specified requires a project to execute but there is no POM in this directory (). Please verify you invoked Maven from the correct directory. -> [Help 1]

Best answer by krati_garg

@krati_garg I've deleted the .m2/repository but still getting the same error. Folder path is being generated but build is failing. 

 

Also, when I'm deploying it using 'mvn clean install', it is showing me the below error. 

 

[ERROR] Some problems were encountered while processing the POMs:
[ERROR] Child module \poc\aem-geeks\dispatcher.ams of \poc\aem-geeks\pom.xml does not exist @
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.aem.geeks:aem-geeks:0.0.1-SNAPSHOT (\poc\aem-geeks\pom.xml) has 1 error
[ERROR] Child module \poc\aem-geeks\dispatcher.ams of \poc\aem-geeks\pom.xml does not exist


Lets take one step at a time:

-Are you using any IDE to for generating project archetype?

- try using DOS prompt with Run As Administrator

- Use the latest Archetype i.e 39

See the link below 

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

-do not mvn clean install until you have successful generation of project 

2 replies

krati_garg
Adobe Employee
Adobe Employee
October 28, 2022

@kritikagoyal :

Please try this below snippet:

mvn -B archetype:generate
-D archetypeGroupId=com.adobe.aem
-D archetypeArtifactId=aem-project-archetype
-D archetypeVersion=35
-D appTitle="AEM GEEKS"
-D appId="aemgeeks"
-D groupId="com.aem.geeks"
-D artifactId="aem-geeks"
-D package="com.aem.geeks"
-D version="0.0.1-SNAPSHOT"
-D aemVersion="6.5.10"

Level 2
October 31, 2022

I tried with the command you suggested. The project folder is being created but build is failing. 

 

Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate (default-cli) on project standalone-pom: java.nio.file.FileSystemException: \aem-geeks\dispatcher\src\conf.d\enabled_vhosts\aemgeeks_publish.vhost: A required privilege is not held by the client.

 

What does this error imply? What am I missing? 

SantoshSai
Community Advisor
Community Advisor
October 31, 2022

@kritikagoyal ,

Deleting full .m2/repository local repository should solve your problem.

Or else you need to know what plugins are you using exactly with their dependencies as one of the plugin suffered a problem while downloading.

Santosh Sai
SantoshSai
Community Advisor
Community Advisor
October 28, 2022

Hi @kritikagoyal,

The issue is all about "/" in your command, Please refer below command to run it successfully.

mvn -B archetype:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=35 -D appTitle="AEM GEEKS" -D appId="aemgeeks" -D groupId="com.aem.geeks" -D artifactId="aem-geeks" -D package="com.aem.geeks" -D version="0.0.1-SNAPSHOT" -D aemVersion="6.5.10"

Hope that helps you!

Regards,

Santosh

Santosh Sai