Basic usage

Generate a new AEM project using interactive mode by executing:

mvn org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate \
  -DarchetypeGroupId=io.wcm.maven.archetypes \
  -DarchetypeArtifactId=io.wcm.maven.archetypes.aem-confmgmt \
  -DarchetypeVersion=1.3.0

As minimal input parameters you have to enter a value for configurationManagementName, groupId and projectName - all other parameters can be derived from these or have sensible default parameters. But in most cases you want to specify more parameters, see next chapters for all available parameters and some examples.

Archetype parameters

Parameter Default Description
configurationManagementName Name of the configuration management project that is used for tagging the infrastructure. The rules for AWS S3 bucket names should be followed - only lowercase characters, numbers and hyphens allowed.
projectName Project name from AEM project
groupId Maven artifact groupId from AEM project
artifactId *) Maven artifact “root” artifactId from AEM project, is suffixed for the individual modules
version *) Maven artifact version from the AEM project - e.g. 1.0.0-SNAPSHOT
package *) Java class package name - this is not used for this archetype, but a value has to be specified
Credentials and security
mavenRepositoryUrl *) URL to maven repository to fetch all artifacts from, including Adobe binaries and the AEM project's artifact. This should not point to Maven Central.
mavenRepositoryUser Username for maven repository
mavenRepositoryPassword Password for maven repository
aemAdminPassword admin Password for AEM “admin” user and Felix console
accessRestrictionIpAddress 0.0.0.0/0 List of IP addresses or IP subnets to restrict access to when accessing the AEM infrastructure. You can specify multiple separated by “,”. Example: 10.0.0.1/10,192.168.0.1
ansibleVaultPassword Password for Ansible Vault encryption of all sensitive data in repository
AWS settings
awsRegion eu-west-1 AWS region
awsMachineSize medium AWS machine size (translates to fitting AWS instance types) - small/medium/large
Java SDK
javaMajorVersion 8 Java major version
javaMinorVersion 181 Java minor version
javaDownloadBaseUrl **) Download base URL for Java SDK binaries
File references
sshPublicKeyFile id_rsa.pub Path to SSH Public key that is used for authentication on the AWS machines (only required when optionTerraform=‘y’)
aemLicensePropertiesFile license.properties Path to AEM license.properties file
AEM version
optionAemVersion 6.5 AEM major version (6.3, 6.4 or 6.5)
Feature flags
optionVagrant y Include vagrant file to set up an Ansible control host in a local VM
optionTerraform y Include Terraform definition to setup infrastructure on AWS
optionAnsible y Include Ansible playbooks to deploy AEM infrastructure

*) Sensible default
**) Default Java SDK download base URL: http://download.oracle.com/otn-pub/java

Usage examples

These examples use the wcm.io Samples project as sample AEM project for deployment (it's available on Maven Central).

Setup with Ansible, Terraform, Vagrant

mvn org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate -DinteractiveMode=false \
  -DarchetypeGroupId=io.wcm.maven.archetypes \
  -DarchetypeArtifactId=io.wcm.maven.archetypes.aem-confmgmt \
  -DarchetypeVersion=1.3.0 \
  -DconfigurationManagementName=sample-project-1 \
  -DprojectName=wcm-io-samples \
  -DgroupId=io.wcm.samples \
  -DartifactId=io.wcm.samples \
  -Dversion=1.3.0 \
  -DoptionAemVersion=6.5 \
  -DoptionAnsible=y \
  -DoptionTerraform=y \
  -DoptionVagrant=y \
  -DansibleVaultPassword=mypassword \
  -DaemAdminPassword=admin \
  -DmavenRepositoryUrl=http://your-maven-repository-url/ \
  -DmavenRepositoryUser=user \
  -DmavenRepositoryPassword=password

You need to place additional files in the working directory where you execute this command:

  • license.properties - Your AEM license.properties file
  • id_rsa.pub - SSH key that is used for accessing the AWS machines

Setup only with Ansible

mvn org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate -DinteractiveMode=false \
  -DarchetypeGroupId=io.wcm.maven.archetypes \
  -DarchetypeArtifactId=io.wcm.maven.archetypes.aem-confmgmt \
  -DarchetypeVersion=1.3.0 \
  -DconfigurationManagementName=sample-project-2 \
  -DprojectName=wcm-io-samples \
  -DgroupId=io.wcm.samples \
  -DartifactId=io.wcm.samples \
  -Dversion=1.3.0 \
  -DoptionAemVersion=6.5 \
  -DoptionAnsible=y \
  -DoptionTerraform=n \
  -DoptionVagrant=n \
  -DansibleVaultPassword=mypassword \
  -DaemAdminPassword=admin \
  -DmavenRepositoryUrl=http://your-maven-repository-url/ \
  -DmavenRepositoryUser=user \
  -DmavenRepositoryPassword=password

You need to place additional files in the working directory where you execute this command:

  • license.properties - Your AEM license.properties file

Requirements

  • JDK 1.8
  • Apache Maven 3.3.9 or higher
  • Important: You have to manually upload the AEM Quickstart JAR and AEM dispatcher binaries to your Maven Artifact Manager following these conventions for naming them.

Back to top

Version: 1.3.1-SNAPSHOT. Last Published: 2024-03-06.