Expand my Community achievements bar.

Setup AEM Forms code provided by adobe in my environment.

Avatar

Level 1

Hi, 
I am trying to setup a forms code which is provided by adobe, I followed all the steps what is needed for settling the code setup.

 https://experienceleague.adobe.com/en/docs/experience-manager-65/content/forms/adaptive-forms-core-c... 

I copied the commands and paste it to command prompt through this doc, I got the code but wen I am trying to build the code it is throwing the error which I don't get it. 

Can anybody tell me what can be the issue?  

 

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/AEM Forms/myform/ui.apps/target/generated-sources/htl/org/apache/sling/scripting/sightly/apps/myform/components/commerce/logo/logo__002e__html.java:[46,95] package com.adobe.cq.commerce.core.components.models.header does not exist
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for My Form 0.0.1-SNAPSHOT:
[INFO]
[INFO] My Form ............................................ SUCCESS [ 1.370 s]
[INFO] My Form - Core ..................................... SUCCESS [ 27.928 s]
[INFO] My Form - UI Frontend .............................. SUCCESS [ 54.385 s]
[INFO] My Form - Repository Structure Package ............. SUCCESS [ 1.752 s]
[INFO] My Form - UI apps .................................. FAILURE [ 4.548 s]
[INFO] My Form - UI content ............................... SKIPPED
[INFO] My Form - UI config ................................ SKIPPED
[INFO] My Form - All ...................................... SKIPPED
[INFO] My Form - Integration Tests ........................ SKIPPED
[INFO] My Form - Dispatcher ............................... SKIPPED
[INFO] My Form - UI Tests ................................. SKIPPED
[INFO] My Form - UI Frontend Forms ........................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:35 min
[INFO] Finished at: 2026-01-12T10:10:50+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project myform.ui.apps: Compilation failure
[ERROR] /C:/AEM Forms/myform/ui.apps/target/generated-sources/htl/org/apache/sling/scripting/sightly/apps/myform/components/commerce/logo/logo__002e__html.java:[46,95] package com.adobe.cq.commerce.core.components.models.header does not exist
[ERROR]

Thanks In Advance!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

8 Replies

Avatar

Employee

Hi @shrsai,

Could you please share the command to create an AEM Archetype project? Also, kindly confirm if this is for on-prem or for a cloud environment. Finally, please specify the version for AEM Archetype.

For Reference I am providing you with the correct commands:

AEM as a cloud Service:
mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.3.1:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=56 -D appTitle=myheadlessform -D appId=myheadlessform -D groupId=com.myheadlessform -D includeFormsheadless="y"

AEM on Prem:
mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.3.1:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=56 -D appTitle="MyForm" -D appId="myform" -D groupId="com.myform" -D includeFormsenrollment="y" -D aemVersion="6.5.24"(Update "aemVersion"  depending on your AEM Version)

Thanks
Pranay

Avatar

Level 1

Hi Pranay,

Thank you for your reply!

 

It is AEM On-Prem:

AEM version: 6.5.23 

Archetype version: 35

   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="My Form" ^

   -D appId="myform" ^

   -D groupId="com.myform" ^

   -D includeFormsenrollment="y" ^

   -D aemVersion="6.5.23"

 

Build is failing with this:

shrsai_0-1768297926805.png

 

 

 

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time:  25.158 s

[INFO] Finished at: 2026-01-13T10:45:05+01:00

[INFO] ------------------------------------------------------------------------

[ERROR] 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: C:\AEM\aemformscodesetup\myformtest\dispatcher\src\conf.d\enabled_vhosts\aem_author.vhost: A required privilege is not held by the client. -> [Help 1]

 

Thanks!

Shreya

Avatar

Employee

Hi @shrsai ,

I can see that you are using a very old archetype. Request you to use the latest version of Maven Plugin and AEM Archetype. You can use the command below:

 

AEM on Prem:
mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.3.1:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=56 -D appTitle="MyForm" -D appId="myform" -D groupId="com.myform" -D includeFormsenrollment="y" -D aemVersion="6.5.23"

 

Thanks
Pranay

Avatar

Moderator

@shrsai , was the issue resolved or do you need more help on this?

Avatar

Level 1

Hi Khushwant, 

No not yet, I still need help!

 

Thanks!

 

Avatar

Employee

Hi @shrsai,

Can you please tell me what issue do you see right now with the latest Archetype. Also please let me know the version of Maven and Java that you are using.

Thanks
Pranay

Avatar

Level 1

Hi Pranay,

Maven version: 3.8.5

Java version: 11.0.22

 

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

 

Thanks!

Shreya

Avatar

Employee

Hi @shrsai,

Can you please try using Maven 3.9.x and also try to launch the command prompt using the administrator permissions.

Thanks
Pranay