Project Setup | Community
Skip to main content
Level 8
September 30, 2024
Solved

Project Setup

  • September 30, 2024
  • 2 replies
  • 1736 views

Hi all

 

I am doing the Project Setup for AEM Sites WKND Tutorials at https://experienceleague.adobe.com/en/docs/experience-manager-learn/getting-started-wknd-tutorial-develop/project-archetype/project-setup.

 

This is for AEM 6.5.

 

I executed the below command:

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=39 \ -D appTitle="WKND Sites Project" \ -D appId="wknd" \ -D groupId="com.adobe.aem.guides" \ -D artifactId="aem-guides-wknd" \ -D package="com.adobe.aem.guides.wknd" \ -D version="0.0.1-SNAPSHOT" \ -D aemVersion="6.5.14"

 

It says:

The goal you specified requires a project to execute but there is no POM in this directory (C:\Rama\Adobe\AEM project\code). Please verify you invoked Maven from the correct directory. -> [Help 1]

 

Please suggest.

 

Appreciate all your replies.

 

Thanks,

RK.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sady_Rifat

I resorted to Interactive version by removing ""-B".:
mvn  org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate

 

Now it is stuck at aemVersion.

I am using  6.5.14.

 

Define value for property 'aemVersion' (should match expression '^(6\.4\.8\.4|6\.5\.7|cloud)$') cloud: : 6.5.14
Value does not match the expression, please try again cloud: : "6.5.14"
Value does not match the expression, please try again cloud: : 6.5
Value does not match the expression, please try again cloud: : "6.5.14"
Value does not match the expression, please try again cloud: : "6.5"
Value does not match the expression, please try again cloud: : 6.5.0
Value does not match the expression, please try again cloud: : "6.5.0"
Value does not match the expression, please try again cloud: :

 

Thanks,

RK.


I tried to generate your issue from my windows, 
I am abled to generate your issue.
After trying from windows PowerShell Administratior mode for this command it works.

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=39 -D appTitle="WKND Sites Project" -D appId="wknd" -D groupId="com.adobe.aem.guides" -D artifactId="aem-guides-wknd" -D package="com.adobe.aem.guides.wknd" -D version="0.0.1-SNAPSHOT" -D aemVersion="6.5.14"

Please check this on your end.

 

2 replies

nsvsrkAuthor
Level 8
September 30, 2024

Here is the execution and results:

C:\Rama\Adobe\AEM project\code>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=39 \ -D appTitle="WKND Sites Project" \ -D appId="wknd" \ -D groupId="com.adobe.aem.guides" \ -D artifactId="aem-guides-wknd" \ -D package="com.adobe.aem.guides.wknd" \ -D version="0.0.1-SNAPSHOT" \ -D aemVersion="6.5.14"
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.083 s
[INFO] Finished at: 2024-09-30T06:48:17+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Rama\Adobe\AEM project\code). 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

SureshDhulipudi
Community Advisor
Community Advisor
September 30, 2024

Please try this:

 

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=39 \
-D appTitle="WKND Sites Project" \
-D appId="wknd" \
-D groupId="com.adobe.aem.guides" \
-D artifactId="aem-guides-wknd" \
-D package="com.adobe.aem.guides.wknd" \
-D version="0.0.1-SNAPSHOT" \
-D aemVersion="6.5.14"

 

if you are wrapping to a single line command, that may cause the error, also - please check MVN version

--

 

https://experienceleague.adobe.com/en/docs/experience-manager-learn/getting-started-wknd-tutorial-develop/project-archetype/project-setup

nsvsrkAuthor
Level 8
September 30, 2024

Hi,

 

Thanks for reverting.

 

I pasted the whole command and here is the result:

C:\Rama\Adobe\AEM project\code>mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate \
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.078 s
[INFO] Finished at: 2024-09-30T08:50:22+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Rama\Adobe\AEM project\code). 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:\Rama\Adobe\AEM project\code>-D archetypeGroupId=com.adobe.aem \
'-D' is not recognized as an internal or external command,
operable program or batch file.

C:\Rama\Adobe\AEM project\code>-D archetypeArtifactId=aem-project-archetype \
'-D' is not recognized as an internal or external command,
operable program or batch file.

C:\Rama\Adobe\AEM project\code>-D archetypeVersion=39 \
'-D' is not recognized as an internal or external command,
operable program or batch file.

C:\Rama\Adobe\AEM project\code>-D appTitle="WKND Sites Project" \
'-D' is not recognized as an internal or external command,
operable program or batch file.

C:\Rama\Adobe\AEM project\code>-D appId="wknd" \
'-D' is not recognized as an internal or external command,
operable program or batch file.

C:\Rama\Adobe\AEM project\code>-D groupId="com.adobe.aem.guides" \
'-D' is not recognized as an internal or external command,
operable program or batch file.

C:\Rama\Adobe\AEM project\code>-D artifactId="aem-guides-wknd" \
'-D' is not recognized as an internal or external command,
operable program or batch file.

C:\Rama\Adobe\AEM project\code>-D package="com.adobe.aem.guides.wknd" \
'-D' is not recognized as an internal or external command,
operable program or batch file.

C:\Rama\Adobe\AEM project\code>-D version="0.0.1-SNAPSHOT" \
'-D' is not recognized as an internal or external command,
operable program or batch file.

C:\Rama\Adobe\AEM project\code>-D aemVersion="6.5.14"

 

Somehow it is failing to recognize "\" and treating the first line as the entire command.

When it comes to MVN, it is

Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937).

Adobe documentation says: "Apache Maven (3.3.9 or newer)".

 

Thanks,

RK.

Sady_Rifat
Community Advisor
Community Advisor
September 30, 2024

Hello @nsvsrk ,
can you please cross-check that your maven and java are properly setup?

mvn -vjava -version

 

nsvsrkAuthor
Level 8
September 30, 2024

Hi,

 

C:\Users\User>mvn --version
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: C:\Rama\Adobe\Maven-2\apache-maven-3.9.9
Java version: 11.0.23, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-11
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"

 

C:\Users\User>Java -version
java version "11.0.23" 2024-04-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.23+7-LTS-222)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.23+7-LTS-222, mixed mode)

C:\Users\User>

 

Thanks,

RK.

nsvsrkAuthor
Level 8
September 30, 2024

I resorted to Interactive version by removing ""-B".:
mvn  org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate

 

Now it is stuck at aemVersion.

I am using  6.5.14.

 

Define value for property 'aemVersion' (should match expression '^(6\.4\.8\.4|6\.5\.7|cloud)$') cloud: : 6.5.14
Value does not match the expression, please try again cloud: : "6.5.14"
Value does not match the expression, please try again cloud: : 6.5
Value does not match the expression, please try again cloud: : "6.5.14"
Value does not match the expression, please try again cloud: : "6.5"
Value does not match the expression, please try again cloud: : 6.5.0
Value does not match the expression, please try again cloud: : "6.5.0"
Value does not match the expression, please try again cloud: :

 

Thanks,

RK.