Maven Archetype 35 AEM Project Creation | Community
Skip to main content
Level 2
Oct 28, 2022 7:51 AM UTC
Solved

Maven Archetype 35 AEM Project Creation

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]

krati_garg
krati_gargAccepted solution
Employee
Nov 3, 2022 4:41 AM UTC

@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 

9 replies

SantoshSai
New Participant
Oct 28, 2022 1:17 PM UTC

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

Translate
Santosh Sai
krati_garg
Employee
Oct 28, 2022 9:55 AM UTC

@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"

Translate
Level 2
Oct 31, 2022 6:08 AM UTC

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? 

Translate
SantoshSai
New Participant
Oct 31, 2022 3:25 PM UTC

@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.

Translate
Santosh Sai