Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

AEM as a cloud service project creation

Avatar

Level 1

When a create a project using command as mentioned in https://github.com/adobe/aem-project-archetype

 

Command to create project-

mvn -B archetype:generate \
-D archetypeGroupId=com.adobe.granite.archetypes \
-D archetypeArtifactId=aem-project-archetype \
-D archetypeVersion=23 \
-D aemVersion=cloud \
-D appTitle="My Site" \
-D appId="mysite" \
-D groupId="com.mysite" \
-D frontendModule=general \
-D includeExamples=n

 

I get below error:

 

 

C:\Application\CodeBase\Cloud\SPA1>mvn -B archetype:generate \ -D archetypeGroupId=com.adobe.granite.archetypes \ -D archetypeArtifactId=aem-project-archetype \ -D archetypeVersion=23 \ -D aemVersion=cloud \ -D appTitle="My Site" \ -D appId="mysite" \ -D groupId="com.mysite" \ -D frontendModule=general \ -D includeExamples=n
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.192 s
[INFO] Finished at: 2020-07-07T13:20:42+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Ashish\CodeBase\Cloud\SPA1). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException

C:\Ashish\CodeBase\Cloud\SPA1>mvn -B archetype:generate -DarchetypeGroupId=com.adobe.granite.archetypes -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=23 -DaemVersion=cloud -DappTitle="My Site" -DappId="mysite" -DgroupId="com.mysite" -DfrontendModule=general -DincludeExamples=n
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.1.2:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.1.2:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO]
[INFO]
[INFO] --- maven-archetype-plugin:3.1.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Batch mode
[WARNING] Archetype not found in any catalog. Falling back to central repository.
[WARNING] Add a repository with id 'archetype' in your settings.xml if archetype's repository is elsewhere.
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: aem-project-archetype:23
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.mysite
[INFO] Parameter: artifactId, Value: mysite
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: com.mysite
[INFO] Parameter: packageInPathFormat, Value: com/mysite
[INFO] Parameter: singleCountry, Value: y
[INFO] Parameter: includeErrorHandler, Value: n
[INFO] Parameter: includeDispatcherConfig, Value: y
[INFO] Parameter: package, Value: com.mysite
[INFO] Parameter: includeExamples, Value: n
[INFO] Parameter: groupId, Value: com.mysite
[INFO] Parameter: appTitle, Value: My Site
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: aemVersion, Value: cloud
[INFO] Parameter: frontendModule, Value: general
[INFO] Parameter: appId, Value: mysite
[INFO] Parameter: languageCountry, Value: en_us
[INFO] Parameter: sdkVersion, Value: latest
[INFO] Parameter: artifactId, Value: mysite
[INFO] Parent element not overwritten in C:\Ashish\CodeBase\Cloud\SPA1\mysite\all\pom.xml
[INFO] Parent element not overwritten in C:\Ashish\CodeBase\Cloud\SPA1\mysite\core\pom.xml
[INFO] Parent element not overwritten in C:\Ashish\CodeBase\Cloud\SPA1\mysite\dispatcher.ams\pom.xml
[INFO] Parent element not overwritten in C:\Ashish\CodeBase\Cloud\SPA1\mysite\dispatcher.cloud\pom.xml
[INFO] Parent element not overwritten in C:\Ashish\CodeBase\Cloud\SPA1\mysite\ui.frontend.general\pom.xml
[WARNING] Don't override file C:\Ashish\CodeBase\Cloud\SPA1\mysite\ui.frontend.general\pom.xml
[INFO] Parent element not overwritten in C:\Ashish\CodeBase\Cloud\SPA1\mysite\ui.frontend.angular\pom.xml
[WARNING] Don't override file C:\Ashish\CodeBase\Cloud\SPA1\mysite\ui.frontend.angular\pom.xml
[INFO] Parent element not overwritten in C:\Ashish\CodeBase\Cloud\SPA1\mysite\ui.frontend.react\pom.xml
[WARNING] Don't override file C:\Ashish\CodeBase\Cloud\SPA1\mysite\ui.frontend.react\pom.xml
[INFO] Parent element not overwritten in C:\Ashish\CodeBase\Cloud\SPA1\mysite\ui.apps\pom.xml
[INFO] Parent element not overwritten in C:\Ashish\CodeBase\Cloud\SPA1\mysite\ui.content\pom.xml
[WARNING] CP Don't override file C:\Ashish\CodeBase\Cloud\SPA1\mysite\ui.content\src\main\content\jcr_root\content\mysite\_jcr_content\image\file
[INFO] Parent element not overwritten in C:\Ashish\CodeBase\Cloud\SPA1\mysite\it.tests\pom.xml
[INFO] Parent element not overwritten in C:\Ashish\CodeBase\Cloud\SPA1\mysite\it.launcher\pom.xml
[INFO] Parent element not overwritten in C:\Ashish\CodeBase\Cloud\SPA1\mysite\ui.apps.structure\pom.xml
[INFO] Executing META-INF/archetype-post-generate.groovy post-generation script
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/Users/apanwar/.m2/repository/org/codehaus/groovy/groovy/2.4.16/groovy-2.4.16.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
No SDK version specified, trying to fetch latest
Using AEM as a Cloud Service SDK version: 2020.6.3766.20200619T110731Z-200604
Creating content skeleton...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 28.586 s
[INFO] Finished at: 2020-07-07T13:22:19+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate (default-cli) on project standalone-pom: java.nio.file.FileSystemException: C:\Application\CodeBase\Cloud\SPA1\mysite\dispatcher\src\conf.d\enabled_vhosts\default.vhost: A required privilege is not held by the client. -> [Help 1]

 

Please let me know what is wrong I am executing to create a project

1 Accepted Solution

Avatar

Correct answer by
Level 6

I encountered the same problem once and was getting the exact same error as you mentioned.

 

Solution: Started command prompt with admin rights and ran the same command. It did work.

View solution in original post

5 Replies

Avatar

Employee

Hi Ashish,

Looking at https://github.com/adobe/aem-project-archetype/issues/329, it looks like a symlink issue. 

 

See:

https://stackoverflow.com/questions/8228030/getting-filesystemexception-a-required-privilege-is-not-...

With Windows you can add a user to the list of who may create symbolic links (without disabling UAC) using security policies. Run "secpol.msc" and change "Security Settings|Local Policies|User Rights Assignment|Create symbolic links".

 

This is documented in https://github.com/adobe/aem-project-archetype/commit/6ecbe45ba14ed67412ed183500d1df5ad076c014to change the way the dispatcher configuration is structured.

 

Thanks,

Vaishali

Avatar

Level 8

Thanks for the post! I tried using the AEM Maven Archetypes 13 with AEM 6.5 (from this link: https://helpx.adobe.com/experience-manager/using/maven_arch13.html) but it didn't work. I installed the bundle it didn't show on CRXDE under /app. I tried using the same from here: https://github.com/adobe/aem-project-archetype but I got the error reported in this post. Then with the help of your post, and I had to fiddle with the command line until managed to get a successful build. Now I hope it will show-up under CRXDE under /apps.

 

There is a big issue with the help doc provided by Adobe. It needs a lot of work to improve the quality.

 

Tarek

Avatar

Level 8
After I followed the instructions from "https://github.com/adobe/aem-project-archetype", I installed the mysite JAR bundle, and nothing showed up on CRXDE. Also, when I clicked on the bundle name from system console, I see a couple of errors such as "com.day.cq.wcm.api,version=[1.29,2) -- Cannot be resolved" and "org.apache.sling.api.resource,version=[2.12,3) -- Cannot be resolved". I appreciate your help.

Avatar

Correct answer by
Level 6

I encountered the same problem once and was getting the exact same error as you mentioned.

 

Solution: Started command prompt with admin rights and ran the same command. It did work.

Avatar

Administrator
@ibishika, Thank you for sharing the solution with Community. Please keep on contributing to the AEM community.


Kautuk Sahni