top of page
  • Writer's pictureHeena

How to generate an AEM Project

Updated: Jul 23, 2023

Today we will generate an AEM Project using a Maven archetype with the help of command line.

Prerequisites:

  1. JDK should be installed

  2. Maven should be installed


  1. What is Maven Project? Apache Maven is a software project management and comprehension tool. All Adobe Experience Manager Projects leverage Maven Project to generate, build, and deploy code.

  2. What is Maven Archetype? Archetype is a Maven project templating toolkit. AEM requires project code to be in particular structure. To generate this pre-created structure we use "aem-project-archetype" as an Archetype Id.


Paste the following into the command line to generate the project in batch mode and hit ENTER:

mvn -B archetype:generate \
    -D archetypeGroupId=com.adobe.aem \
    -D archetypeArtifactId=aem-project-archetype \
    -D archetypeVersion=35 \
    -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="cloud"


This will create following project structure:

    |--- aem-guides-wknd/
        |--- all/
        |--- core/
        |--- ui.apps/
        |--- ui.apps.structure/
        |--- ui.config/
        |--- ui.content/
        |--- ui.frontend/
        |--- ui.tests /
        |--- it.tests/
        |--- dispatcher/
        |--- archetype.properties
        |--- pom.xml
        |--- README.md
        |--- .gitignore

To Deploy the project to running AEM instance, execute following command at project repository folder(in this case at aem-guides-wknd)


mvn clean install -PautoInstallSinglePackage

The Maven profile "autoInstallSinglePackage" compiles the project and deploys as a single package to the AEM instance. By default the port is set to 4502 with the credentials of admin:admin. You can update it in parent pom.xml


If you receive following message it means the build was successful and project was deployed to the AEM instance.


command prompt

Let me know if you are receiving message other than this in comment section.

88 views

Related Posts

See All
bottom of page