Errors while building the latest AEM Project Archetype 24 on MacOS | AEM Community Blog Seeding

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,200 likes

Total Posts

6,394 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,200 likes

Total Posts

6,394 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

06-01-2021

BlogImage.jpg

Errors while building the latest AEM Project Archetype 24 on MacOS by Sourced Code

Abstract

I was recently trying to start up a new AEM project using the latest, AEM Project Archetype 24, but I was having having some build problems indicated in the errors below:

$ mvn -B archetype:generate \
> -D archetypeGroupId=com.adobe.aem \
> -D archetypeArtifactId=aem-project-archetype \
> -D archetypeVersion=24 \
> -D appTitle="AEM SourcedCode" \
> -D appId="sourcedcodeaem" \
> -D groupId="com.sourcedcode.aem" \
> -D aemVersion="6.5.0" \
> -D frontendModule="none" \
> -D includeExamples="y"
[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.0.1:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO]
[INFO]
[INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Batch mode
[INFO] Archetype repository not defined. Using the one from [com.adobe.aem:aem-project-archetype:24] found in catalog remote
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: aem-project-archetype:24
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.sourcedcode.aem
[INFO] Parameter: artifactId, Value: sourcedcodeaem
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Parameter: package, Value: com.sourcedcode.aem
[INFO] Parameter: packageInPathFormat, Value: com/sourcedcode/aem
[INFO] Parameter: frontendModule, Value: none
[INFO] Parameter: artifactId, Value: sourcedcodeaem
[INFO] Parameter: package, Value: com.sourcedcode.aem
[INFO] Parameter: appId, Value: sourcedcodeaem
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Parameter: appTitle, Value: AEM SourcedCode
[INFO] Parameter: includeErrorHandler, Value: n
[INFO] Parameter: singleCountry, Value: y
[INFO] Parameter: datalayer, Value: y
[INFO] Parameter: amp, Value: n
[INFO] Parameter: groupId, Value: com.sourcedcode.aem
[INFO] Parameter: aemVersion, Value: 6.5.0
[INFO] Parameter: language, Value: en
[INFO] Parameter: country, Value: us
[INFO] Parameter: includeDispatcherConfig, Value: y
[INFO] Parameter: commerceEndpoint, Value: https://hostname.com/graphql
[INFO] Parameter: sdkVersion, Value: latest
[INFO] Parameter: includeCommerce, Value: n
[INFO] Parameter: includeExamples, Value: y
[INFO] Parent element not overwritten in /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/all/pom.xml
[INFO] Parent element not overwritten in /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/core/pom.xml
[INFO] Parent element not overwritten in /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/dispatcher.ams/pom.xml
[INFO] Parent element not overwritten in /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/dispatcher.cloud/pom.xml
[INFO] Parent element not overwritten in /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.frontend.general/pom.xml
[WARNING] Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.frontend.general/pom.xml
[INFO] Parent element not overwritten in /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.frontend.angular/pom.xml
[WARNING] Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.frontend.angular/pom.xml
[INFO] Parent element not overwritten in /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.frontend.react/pom.xml
[WARNING] Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.frontend.react/pom.xml
[INFO] Parent element not overwritten in /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.apps/pom.xml
[INFO] Parent element not overwritten in /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.config/pom.xml
[INFO] Parent element not overwritten in /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.content/pom.xml
[WARNING] CP Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.content/src/main/content/jcr_root/content/sourcedcodeaem/_jcr_content/image/file
[INFO] Parent element not overwritten in /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/it.tests/pom.xml
[INFO] Parent element not overwritten in /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/pom.xml
[WARNING] Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/pom.xml
[WARNING] CP Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/test-module/assets/image.png
[WARNING] CP Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/test-module/specs/aem/basic.js
[WARNING] CP Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/test-module/specs/aem/assets.js
[WARNING] CP Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/test-module/specs/aem/sites.js
[WARNING] CP Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/test-module/specs/aem/login.js
[WARNING] CP Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/test-module/package.json
[WARNING] CP Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/test-module/wdio.conf.cloud.js
[WARNING] CP Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/test-module/lib/commons.js
[WARNING] CP Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/test-module/lib/wdio.commands.js
[WARNING] CP Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/test-module/lib/config.js
[WARNING] CP Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/test-module/.eslintrc.js
[WARNING] CP Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/test-module/wdio.conf.local.js
[WARNING] CP Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/test-module/README.md
[WARNING] CP Don't override file /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.tests/test-module/wdio.conf.commons.js
[INFO] Parent element not overwritten in /Users/sourcedcodecomputer/git/bitbucket/sourcedcodeaem/ui.apps.structure/pom.xml
[INFO] Executing META-INF/archetype-post-generate.groovy post-generation script
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.690 s
[INFO] Finished at: 2021-01-06T15:58:15Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate failed: A required class was missing while executing org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate: org/apache/ivy/core/report/ResolveReport
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-archetype-plugin:3.0.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/sourcedcodecomputer/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin/3.0.1/maven-archetype-plugin-3.0.1.jar
[ERROR] urls[1] = file:/Users/sourcedcodecomputer/.m2/repository/org/apache/maven/archetype/archetype-catalog/3.0.1/archetype-catalog-3.0.1.jar
[ERROR] urls[2] = file:/Users/sourcedcodecomputer/.m2/repository/org/apache/maven/archetype/archetype-descriptor/3.0.1/archetype-descriptor-3.0.1.jar
[ERROR] urls[3] = file:/Users/sourcedcodecomputer/.m2/repository/org/apache/maven/archetype/archetype-common/3.0.1/archetype-common-3.0.1.jar
[ERROR] urls[4] = file:/Users/sourcedcodecomputer/.m2/repository/net/sourceforge/jchardet/jchardet/1.0/jchardet-1.0.jar
[ERROR] urls[5] = file:/Users/sourcedcodecomputer/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.6/plexus-component-annotations-1.6.jar
[ERROR] urls[6] = file:/Users/sourcedcodecomputer/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar
[ERROR] urls[7] = file:/Users/sourcedcodecomputer/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
[ERROR] urls[8] = file:/Users/sourcedcodecomputer/.m2/repository/jdom/jdom/1.0/jdom-1.0.jar
[ERROR] urls[9] = file:/Users/sourcedcodecomputer/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar
[ERROR] urls[10] = file:/Users/sourcedcodecomputer/.m2/repository/org/codehaus/plexus/plexus-velocity/1.1.8/plexus-velocity-1.1.8.jar
[ERROR] urls[11] = file:/Users/sourcedcodecomputer/.m2/repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar
[ERROR] urls[12] = file:/Users/sourcedcodecomputer/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
[ERROR] urls[13] = file:/Users/sourcedcodecomputer/.m2/repository/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar
[ERROR] urls[14] = file:/Users/sourcedcodecomputer/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar
[ERROR] urls[15] = file:/Users/sourcedcodecomputer/.m2/repository/asm/asm/3.2/asm-3.2.jar
[ERROR] urls[16] = file:/Users/sourcedcodecomputer/.m2/repository/asm/asm-commons/3.2/asm-commons-3.2.jar
[ERROR] urls[17] = file:/Users/sourcedcodecomputer/.m2/repository/asm/asm-util/3.2/asm-util-3.2.jar
[ERROR] urls[18] = file:/Users/sourcedcodecomputer/.m2/repository/asm/asm-analysis/3.2/asm-analysis-3.2.jar
[ERROR] urls[19] = file:/Users/sourcedcodecomputer/.m2/repository/asm/asm-tree/3.2/asm-tree-3.2.jar
[ERROR] urls[20] = file:/Users/sourcedcodecomputer/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.21/plexus-utils-3.0.21.jar
[ERROR] urls[21] = file:/Users/sourcedcodecomputer/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-6/plexus-interactivity-api-1.0-alpha-6.jar
[ERROR] urls[22] = file:/Users/sourcedcodecomputer/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[23] = file:/Users/sourcedcodecomputer/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[24] = file:/Users/sourcedcodecomputer/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
[ERROR] urls[25] = file:/Users/sourcedcodecomputer/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[26] = file:/Users/sourcedcodecomputer/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[27] = file:/Users/sourcedcodecomputer/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[28] = file:/Users/sourcedcodecomputer/.m2/repository/org/apache/maven/shared/maven-invoker/2.2/maven-invoker-2.2.jar
[ERROR] urls[29] = file:/Users/sourcedcodecomputer/.m2/repository/org/apache/maven/shared/maven-artifact-transfer/0.9.0/maven-artifact-transfer-0.9.0.jar
[ERROR] urls[30] = file:/Users/sourcedcodecomputer/.m2/repository/org/apache/maven/shared/maven-common-artifact-filters/3.0.0/maven-common-artifact-filters-3.0.0.jar
[ERROR] urls[31] = file:/Users/sourcedcodecomputer/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.0.0/maven-shared-utils-3.0.0.jar
[ERROR] urls[32] = file:/Users/sourcedcodecomputer/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
[ERROR] urls[33] = file:/Users/sourcedcodecomputer/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
[ERROR] urls[34] = file:/Users/sourcedcodecomputer/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
[ERROR] urls[35] = file:/Users/sourcedcodecomputer/.m2/repository/org/apache/maven/shared/maven-script-interpreter/1.0/maven-script-interpreter-1.0.jar
[ERROR] urls[36] = file:/Users/sourcedcodecomputer/.m2/repository/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar
[ERROR] urls[37] = file:/Users/sourcedcodecomputer/.m2/repository/org/apache/ant/ant/1.8.1/ant-1.8.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.apache.ivy.core.report.ResolveReport
[ERROR] -> [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/PluginContainerException
I attempted next to build the AEM Project Archetype 24 project again using the -X flag to enable debug traces, and I was able to identify the causing errors. It is because maven was not able to generate folder structures and files as it requires.



The Fix
The fix is quite simple, we just need to include the word sudo to the build maven command.

sudo mvn -B archetype:generate \
-D archetypeGroupId=com.adobe.aem \
-D archetypeArtifactId=aem-project-archetype \
-D archetypeVersion=24 \
-D appTitle="AEM SourcedCode" \
-D appId="sourcedcodeaem" \
-D groupId="com.sourcedcode.aem" \
-D aemVersion="6.5.0" \
-D frontendModule="none" \
-D includeExamples="y"

Read Full Blog

Errors while building the latest AEM Project Archetype 24 on MacOS

Q&A

Please use this thread to ask the related questions.