Expand my Community achievements bar.

SOLVED

Maven Archetype 35 AEM Project Creation

Avatar

Level 2

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]

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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 

View solution in original post

9 Replies

Avatar

Employee Advisor

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

Avatar

Level 2

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? 

Avatar

Community Advisor

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

Avatar

Level 2

@SantoshSai I did delete the .m2/repository and again ran the command. Again got 'Build Failure' with the same error.

Avatar

Level 4

After removing .m2/repository and opening command with administrator, run the command. It works fine to me.

Avatar

Employee Advisor

Hi @kritikagoyal 
Please delete the current maven repo (m2) and re execute the above command. This should solve the issue. 
If you are using Windows, and executing maven command via DOS Prompt. Please try to run DOS console with "Run as Administrator". This should resolve any access issues to the Folder path you are trying to generate the AEM Project

Avatar

Level 2

@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

Avatar

Correct answer by
Employee Advisor

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 

Avatar

Community Advisor

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"

Screen Shot 2022-10-28 at 9.16.49 AM.png

Hope that helps you!

Regards,

Santosh