How to build a new project in AEM
Published in
2 min readApr 9, 2020
The recommended way (or best approach) to start a new project for AEM (Adobe Experience Manager) is to use an Archetype.
Adobe has a separate project AEM Project Archetype on Github for this.
Here’s the process to create a new project codebase:
- Create a new folder
$ mkdir projects
$ cd projects
2. Run this command
$ mvn -B archetype:generate \
-D archetypeGroupId=com.adobe.granite.archetypes \
-D archetypeArtifactId=aem-project-archetype \
-D archetypeVersion=23 \
-D aemVersion=6.5.0 \
-D appTitle="My Site" \
-D appId="mysite" \
-D groupId="com.mysite" \
-D frontendModule=general \
-D includeExamples=n
That’s it. A new project codebase is built with necessary folder and sample files.
3. Build and deploy
$ cd mysite
$ mvn clean install
or
$ mvn clean install -PautoInstallPackage "autoInstallPackage" is a default maven profile included in pom.xml which will build and deploy your project to AEM running on localhost.
Some options
- Your project folder name:
-D appId="mysite"
2. Your project build/jar file names:
Primarily 2 files need to be built and deployed to AEM for your projcet to work:
- UI Apps (components, etc) —
mysite.ui.apps-1.0-SNAPSHOT.zip