Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

AEM archetype 37

Avatar

Level 2

Hi, 

 

I was trying to build project from archetype 37. 

 

mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate

"-DarchetypeGroupId=com.adobe.aem"

"-DarchetypeArtifactId=aem-project-archetype"

"-DarchetypeVersion=37"

"-DappTitle=Archetype project"

"-DappId=archetype"

"-DgroupId=com.adobe.aem.guides"

"-DartifactId=aem-guides-archetype"

"-Dpackage=com.adobe.aem.guides.archetype"

"-Dversion=0.0.1-SNAPSHOT"

"-DaemVersion=cloud"

"-D includeDispatcherConfig=n"

 

archetype-error.jpg

I always have some problems to build project from archetype or even if its wknd tutorial. Is it really bad documentation from Adobe about it and they don't care? Because whenever I'm trying to work with it, it always fail somewhere. Or maybe I'm doing something wrong? 

1 Accepted Solution

Avatar

Correct answer by
Level 2

@shaileshbassi for this error:

 Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.0:generate (default-cli) on project standalone-pom: java.nio.file.FileSystemException: C:\Users\user1\Documents\GitHub\myfirstsite\dispatcher\src\conf.d\enabled_vhosts\aem_author.vhost: A required privilege is not held by the client. -> [Help 1]

Solution for this

Open command prompt as Administrator and run the same command it fixes the above error and then project just built.  

View solution in original post

7 Replies

Avatar

Level 8

@DawidEaf I just tried the same via the command and the project got successfully created and I am able to deploy the package on the AEM Cloud environment as well, but the only difference is I did not provided the couple of extra parameters e.g. -Dpackage, etc.

mvn -B archetype:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=37 -D aemVersion=cloud -D appTitle="My Site" -D appId="my-site" -D groupId="com.mysite" -D frontendModule=general -D aemVersion=cloud -D version=0.0.1-SNAPSHOT

You can try the above command to create the project.

Hope this helps!

Thanks

Avatar

Level 2

@shaileshbassi thank you for your response. 

error.jpg

I've tried with you commands but still got this error and the same one above.

Avatar

Level 8
mvn -B archetype:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=37 -D aemVersion=cloud -D appTitle="My Site" -D appId="my-site" -D groupId="com.mysite" -D frontendModule=general -D aemVersion=cloud -D version=0.0.1-SNAPSHOT -D includeDispatcherConfig=n

Just try with the above command, I have add the parameter to "-D includeDispatcherConfig=n" in the above command.

Hope this helps!

Thanks

Avatar

Correct answer by
Level 2

@shaileshbassi for this error:

 Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.0:generate (default-cli) on project standalone-pom: java.nio.file.FileSystemException: C:\Users\user1\Documents\GitHub\myfirstsite\dispatcher\src\conf.d\enabled_vhosts\aem_author.vhost: A required privilege is not held by the client. -> [Help 1]

Solution for this

Open command prompt as Administrator and run the same command it fixes the above error and then project just built.  

Avatar

Level 9

Its a known issue of AEM Archetype and its mentioned in document as well. To give the background, Archetype initially creates all sub modules(react, dispatcher) in a project and based on the input arguments it does clean up.Probably at that time it needs higher permissions to do clean up.

Refer this document :

https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/archetyp...

Issue : https://github.com/adobe/aem-project-archetype/issues/329

 

Avatar

Level 5

Hi @DawidEaf 

 

Seems like an issue with the File/Folder Permission with your User in your System. User might not have the required read/write permission. Kindly open CMD as Admin (Run as Administrator). And run the Maven Archetype command. 

Thanks

Avatar

Level 4

Try this command:

 

mvn -B archetype:generate -D archetypeGroupId="com.adobe.aem" -D archetypeArtifactId="aem-project-archetype" -D archetypeVersion=26 -D appTitle=" learning" -D appId="learning" -D groupId="com.learningsite"  -D includeDispatcherConfig=n -D aemVersion="6.5.0"