AEM Insider
// AEM Insider · Video 3

Your First AEM
Maven Project

Built the Right Way · AEM Complete Tutorial Series 2026
Hands-On Demo · Archetype, Modules & Deploy
// Chapter 02 · Prerequisites

Before We Start

Four things installed and running before the first command.

Java 21
The runtime

AEM Cloud SDK requires Java 21. Set up in Video 2.

Maven 3.8+
Build & deploy

The build and deploy tool. Used for every command.

Node.js 18+
Frontend build

Required by ui.frontend for the webpack build.

AEM Running
Author on 4502

Author on port 4502, from the Video 2 local setup.

verify in terminal
$ java -version
$ mvn -version
$ node -v
$ npm -v
// Chapter 02 · settings.xml

~/.m2/settings.xml

Every AEM developer needs this file. Download link in the video description.

The analogy
Like a contact list

Maven needs to download AEM libraries — but Adobe's server isn't in Maven's default list.

Why it matters
No file → build fails

With this file, Maven knows Adobe's server address and finds the libraries instantly.

Not in your project
Never committed to Git

It lives on your machine. Each developer keeps their own copy.

Set once
Forget it

Configure once per machine. All future AEM projects use it automatically.

where to put it
# Mac / Linux
~/.m2/settings.xml

# Windows
C:\Users\<Name>\.m2\
    settings.xml
// Chapter 03 · What is Maven?

Maven — in plain English

Like a food delivery app: you place one order, it handles everything else. You run one command.

01 · Compiles
Java → bundle

Your Java code — Sling Models, services, servlets — into an OSGi bundle.

02 · Packages
Content → packages

Your components, content, and config into installable AEM content packages.

03 · Deploys
Uploads to AEM

Uploads everything to your running AEM instance — Author or Publish.

One command, and Maven handles the rest.

// Chapter 04 · Generate the Project

The Archetype — Adobe's Blueprint

One command generates the entire project. Adobe maintains it — always use the latest version.

generate the project
$ 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=49 \
  -D appTitle="AEM Insider Site" \
  -D appId="aeminsider" \
  -D groupId="com.aeminsider" \
  -D artifactId="aeminsider-site" \
  -D aemVersion="cloud" \
  -D includeExamples=n \
  -D includeFrontendModule=general
archetypeVersion=49

Latest blueprint. Targets AEM as a Cloud Service.

appId="aeminsider"

Used in all JCR paths — /apps/aeminsider, /content/aeminsider.

aemVersion="cloud"

Cloud-ready structure. Use 6.5.0 for on-premise.

includeExamples=n

Clean project — no WKND sample code to delete later.

Windows: open Command Prompt in Administrator mode before running any Maven commands.

// Chapter 05 · Folder Structure

One Parent. Multiple Modules.

Each folder is a module with one job. The root pom.xml is the parent — it coordinates the build order.

aeminsider-site/
aeminsider-site/
├── pom.xml            ← parent — build order
├── core/              ← Java code
├── ui.frontend/       ← CSS + JS source
├── ui.apps/           ← AEM components
├── ui.apps.structure/ ← JCR path filters
├── ui.content/        ← pages + templates
├── ui.config/         ← OSGi configs
├── it.tests/          ← integration tests
├── ui.tests/          ← UI tests
├── all/               ← combined package
└── dispatcher/        ← Dispatcher config
  • core/ — Sling Models, OSGi services, servlets. All your Java code.
  • ui.frontend/ — CSS & JS source. webpack compiles and sends output to ui.apps.
  • ui.apps/ — component definitions, HTL templates, compiled client libraries.
  • ui.content/ — sample pages, editable templates, /conf configurations.
  • ui.config/ — OSGi configs per run mode: config, config.author, config.publish.
  • dispatcher/ — Apache vhosts, rewrites, cache and filter rules.
// Chapter 06 · Parent POM

pom.xml — The Brain of the Build

Four sections do the heavy lifting. Change a value once here — it applies everywhere.

<modules>
Module order

Lists all child modules in build order. ui.frontend builds before ui.apps — the compiled output must exist before ui.apps packages it.

<properties>
AEM host & ports

aem.host, aem.port (4502), aem.publish.host, aem.publish.port (4503). Change once here — applies everywhere.

<dependencyManagement>
AEM SDK API

scope=provided — AEM has these classes at runtime. We compile against them but don't bundle AEM's own classes into our package.

<profiles>
Deploy profiles

autoInstallPackage, autoInstallBundle, autoInstallSinglePackage. Each profile is a different deploy target.

// Chapter 07 · Deploy Commands

Commands You'll Use Every Day

Build only, deploy everything, or target a single module — pick the profile for what changed.

Build only · no deploy
mvn clean install

Verify code compiles. No AEM needed.

Author 4502 · all modules
mvn clean install -PautoInstallPackage

Start of day. After git pull.

Publish 4503 · all modules
mvn clean install -PautoInstallPackagePublish

Deploy everything to Publish.

Author 4502 · single package
mvn clean install -PautoInstallSinglePackage

Bundles all modules into one package.

Author 4502 · Java only
cd core && mvn clean install -PautoInstallBundle

Changed a Sling Model or service. Fastest.

Author 4502 · content only
cd ui.apps && mvn clean install -PautoInstallPackage

Changed HTL, clientlib, or OSGi config.

// Chapter 07 · The Pattern

The Rule Every AEM Dev Follows

Use the right profile for what changed — full build to start, targeted builds while developing.

Start of day
mvn clean install -PautoInstallPackage

Full build. Deploys everything. Run after git pull or first thing in the morning.

While developing
cd core && mvn clean install -PautoInstallBundle

Individual module only. Faster and targeted — just the thing you changed.

// Chapter 07 · Verify Deployment

After Deploy — Check Three Places

If all three look right, your project is live on the instance.

01
localhost:4502/crx/packmgr
Package Manager

Your packages listed with status Installed — aeminsider.ui.apps, aeminsider.ui.content, and so on.

02
localhost:4502/sites.html
Sites Console

An aeminsider folder with a sample page inside. Your project content is live.

03
localhost:4502/system/console/bundles
Felix Console

Search aeminsider — status Active. If it shows Resolved, there's a dependency issue in your Java.

// Chapter 08 · Recap

What We Covered Today

01
Prerequisites + settings.xml

Java 21, Maven 3.8+, Node.js 18+. settings.xml points Maven to Adobe's server.

02
Maven

Like a food delivery app. One command compiles, packages, and deploys.

03
Archetype — the blueprint

aem-project-archetype v49. One command generates the whole structure.

04
Six working modules

core · ui.frontend · ui.apps · ui.content · ui.config · dispatcher.

05
Parent pom.xml

Coordinates module order, host settings, SDK dependency, and deploy profiles.

06
Deploy commands

Full build at start of day. Individual modules while developing.

This project is your foundation — every component, template, and service goes here.

// That's Video 3

Next: your first
component.

Video 4 → Build Your First AEM Component · HTL template, Sling Model, registered in ui.apps & dropped onto a page

Subscribe so you don't miss it. Drop a comment — what should I cover next?