Your First AEM Maven Project — Built the Right Way
Everything you need to generate, understand, and deploy a clean AEM Maven project from scratch.
If you have been following the AEM Complete Tutorial Series, you now have AEM running locally with WKND installed.
That was someone else’s project.
This week we build our own.
In Video 3 we create a brand new AEM Maven project from scratch using the AEM Project Archetype. No shortcuts. No bloated sample code. A clean, production-ready project structure you actually understand.
What we cover in this video
Prerequisites — Java 21, Maven 3.8+, Node.js 18+
What
settings.xmlis and why every AEM developer needs itWhat Maven is — explained without jargon
Generating the project with AEM Project Archetype 49
Every module in the folder structure and what it does
The parent
pom.xml— the brain of the buildEvery deploy command you will use as an AEM developer
How to verify your deployment in AEM
The six modules you will work with every day
The six modules you will work with every day
core
Java code — Sling Models, services, servlets
ui.frontend
CSS and JS source, built with webpack
ui.apps
AEM components, HTL templates, client libraries
ui.content
Pages, editable templates, /conf configurations
ui.config
OSGi configurations per run mode
dispatcher
Apache vhosts, rewrites, cache and filter rules
The deploy commands — save these
# Full build — start of day
mvn clean install -PautoInstallPackage
# Java bundle only — fastest, use while developing
cd core && mvn clean install -PautoInstallBundle
# Single package — components, config changes
cd ui.apps && mvn clean install -PautoInstallPackage
# Deploy to Publish
mvn clean install -PautoInstallPackagePublishMaven archetype command — single line, copy and run
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=generalResources from this video
settings.xml file →
<?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <pluginGroups></pluginGroups> <proxies></proxies> <servers></servers> <mirrors> <mirror> <id>central-mirror</id> <url>https://repo.maven.apache.org/maven2</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> <profiles> <!-- ====================================================== --> <!-- A D O B E P U B L I C P R O F I L E --> <!-- ====================================================== --> <profile> <id>adobe-public</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <releaseRepository-Id>adobe-public-releases</releaseRepository-Id> <releaseRepository-Name>Adobe Public Releases</releaseRepository-Name> <releaseRepository-URL>https://repo.adobe.com/nexus/content/groups/public</releaseRepository-URL> </properties> <repositories> <repository> <id>adobe-public-releases</id> <name>Adobe Public Repository</name> <url>https://repo.adobe.com/nexus/content/groups/public</url> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>adobe-public-releases</id> <name>Adobe Public Repository</name> <url>https://repo.adobe.com/nexus/content/groups/public</url> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <activeProfile>adobe-public</activeProfile> </activeProfiles> </settings>AEM Project Archetype on GitHub → https://github.com/adobe/aem-project-archetype
Maven official download → https://maven.apache.org/download.cgi
Maven install guide → https://medium.com/@zorozeri/install-maven-by-setting-up-maven-home-abb4d158fcc6
Watch the full video
▶
The series so far
#1 — What is AEM? →
#2 — AEM Components & Templates →
Next video we build our first AEM component from scratch.
HTL template. Sling Model. Dropped onto a page in the AEM editor.
That is where AEM development actually starts.
#AEM, #Adobe Experience Manager, #CMS, #Apache Sling, #JCR, #OSGi, #Digital Experience Platform, #AEM Tutorial
