Maven & archetype commands
Purpose: The build/deploy invocations for AEM projects, from project generation to targeted module installs.
Who this page is for
| Audience | Why it matters to you |
|---|---|
| All engineers | Daily builds |
Generate a project (archetype)
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=39 \
-D appTitle="PHI Academy" -D appId="phi-academy" \
-D groupId="com.academy.phi" -D aemVersion="6.5.17"
Everyday build/deploy
mvn clean install -PautoInstallSinglePackage # full deploy to :4502
mvn clean install -PautoInstallSinglePackage -Padobe-public # with Adobe repo profile
mvn clean install -PautoInstallSinglePackagePublish # deploy to publish :4503
mvn clean install -PautoInstallSinglePackage -DskipTests # (dev loop only — CI never skips)
Target another instance:
mvn clean install -PautoInstallSinglePackage \
-Daem.host=dev-author.internal -Daem.port=4502 \
-Dvault.user=deployer -Dvault.password=$DEPLOY_PW
Faster partial loops
mvn clean install -PautoInstallBundle -pl core # just the Java bundle
mvn clean install -PautoInstallPackage -pl ui.apps # just /apps content
mvn clean install -PautoInstallPackage -pl ui.config # just OSGi config
(cd ui.frontend && npm run dev) # frontend watch, generator syncs
Quality & inspection
mvn verify # tests + analysecutable checks without deploy
mvn test -pl core -Dtest=PlanCardModelTest # one test class
mvn dependency:tree -pl core # who brought that jar in
mvn versions:display-dependency-updates # monthly bump material
CI builds the release artefact from a tag with none of the autoInstall profiles — deployment is the pipeline's job (pipeline), the profiles are for humans and dev boxes.