aem-project-archetype: Maven execution stops at middle while creating new project

Expected Behaviour

The project should ve created by maven after running the below command with cloud

mvn -B archetype:generate \
 -D archetypeGroupId=com.adobe.granite.archetypes \
 -D archetypeArtifactId=aem-project-archetype23 \
 -D archetypeVersion=23 \
 -D aemVersion=cloud \
 -D appTitle="My AEM Cloud01" \
 -D appId="myaemcloud01" \
 -D groupId="com.aem" \
 -D frontendModule=general \
 -D includeExamples=y

Actual Behaviour

[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] Downloading from central: https://repo.maven.apache.org/maven2/com/adobe/granite/archetypes/aem-project-archetype23/23/aem-project-archetype23-23.pom
[WARNING] The POM for com.adobe.granite.archetypes:aem-project-archetype23:jar:23 is missing, no dependency information available
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/com/adobe/granite/archetypes/aem-project-archetype23/23/aem-project-archetype23-23.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  05:22 min
[INFO] Finished at: 2020-04-13T12:28:07+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: The desired archetype does not exist (com.adobe.granite.archetypes:aem-project-archetype23:23) -> [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/MojoFailureException

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

MAC OS Catelina 10.15.4 Apache Maven 3.6.2 npm --version 6.13.7 node --version v13.8.0 java --version java 11.0.5 2019-10-15 LTS

Sample Code that illustrates the problem

mvn -B archetype:generate \
 -D archetypeGroupId=com.adobe.granite.archetypes \
 -D archetypeArtifactId=aem-project-archetype23 \
 -D archetypeVersion=23 \
 -D aemVersion=cloud \
 -D appTitle="My AEM Cloud01" \
 -D appId="myaemcloud01" \
 -D groupId="com.aem" \
 -D frontendModule=general \
 -D includeExamples=y

Logs taken while reproducing the problem

Please look above the actual result.

Do let me know any further details are required.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (4 by maintainers)

Most upvoted comments

I tried the below

  1. https://github.com/adobe/aem-project-archetype/issues/370#issuecomment-612951754
  2. https://github.com/adobe/aem-project-archetype/issues/370#issuecomment-618733473

What I’ve not tried: I did not add any settings.xml or I deleted the existing one in my m2 folder, so that I’ll be sure the project should be able to create with default settings.

Am I the only one getting this issue or others are also getting this? I checked with one of my colleague that he’s also getting the similar issue.

Please let me know if the issue is specific to me, I’ll try to research on system of any fix is available.

Even I tried Eclipse plugin also there was an issue as I commented earlier.

Hope I’ll get a good stable fix to go with my practice project.

After reading a little, instead of changing the activateByDefault flag from false to true, you can add to your command mvn command -P adobe-public

In your example that would look like: mvn -B archetype:generate -P adobe-public -D archetypeGroupId=com.adobe.granite.archetypes -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=23 -D aemVersion=cloud -D appTitle="My AEM Cloud01" -D appId="myaemcloud01" -D groupId="com.aem" -D frontendModule=general -D includeExamples=y