wttech / aem-project-archetype

Dual-build (Maven & Gradle) template to create best-practice websites on AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/developing/archetype/overview.html
Apache License 2.0
3 stars 2 forks source link

AEM Project Archetype

:warning: This project is deprecated. Instead, consider using more up-to-date approach: Gradle AEM Plugin Launcher - Enhancing Maven Build

Gradle empowered Maven template that creates a minimal, best-practices-based Adobe Experience Manager (AEM) project as a starting point for your website.

Gradle build

Hybrid Gradle&Maven build

Source code: here

Archetype usage:

mvn -B archetype:generate \
 -D archetypeGroupId=com.cognifide.aem \
 -D archetypeArtifactId=aem-project-archetype-hybrid \
 -D archetypeVersion=24 \
 -D aemVersion=cloud \
 -D appTitle="My Site" \
 -D appId="mysite" \
 -D groupId="com.mysite" \
 -D frontendModule=general \
 -D includeExamples=n

Dual Gradle&Maven build

Source code: here

Archetype usage:

mvn -B archetype:generate \
 -D archetypeGroupId=com.cognifide.aem \
 -D archetypeArtifactId=aem-project-archetype-dual \
 -D archetypeVersion=24 \
 -D aemVersion=cloud \
 -D appTitle="My Site" \
 -D appId="mysite" \
 -D groupId="com.mysite" \
 -D frontendModule=general \
 -D includeExamples=n

Documentation

Features

Usage

To generate a project, adjust the following command line to your needs:

mvn -B archetype:generate \
 -D archetypeGroupId=com.adobe.granite.archetypes \
 -D archetypeArtifactId=aem-project-archetype \
 -D archetypeVersion=23 \
 -D appTitle="My Site" \
 -D appId="mysite" \
 -D groupId="com.mysite" \
 -D frontendModule=general \

Note: Make sure you use at least 3.1.0+ of maven-archetype-plugin (#400)

Note: To run above command with latest SNAPSHOT version, you have to use the new archetypeGroupId: -D archetypeGroupId=com.adobe.aem

Available Properties

Name Default Description
appTitle Application title, will be used for website title and components groups (e.g. "My Site").
appId Technical name, will be used for component, config and content folder names, as well as client library names (e.g. "mysite").
artifactId ${appId} Base Maven artifact ID (e.g. "mysite").
groupId Base Maven group ID (e.g. "com.mysite").
package ${groupId} Java Source Package (e.g. "com.mysite").
version 1.0-SNAPSHOT Project version (e.g. 1.0-SNAPSHOT).
aemVersion cloud Target AEM version (can be cloud for AEM as a Cloud Service; or 6.5.0, 6.4.4, or 6.3.3 for Adobe Managed Services or on-premise).
sdkVersion latest When aemVersion=cloud an SDK version can be specified (e.g. 2020.02.2265.20200217T222518Z-200130).
includeDispatcherConfig y Includes a dispatcher configuration either for cloud or for AMS/on-premise, depending of the value of aemVersion (can be y or n).
frontendModule general Includes a Webpack frontend build module that generates the client libraries (can be general or none for regular sites; can be angular or react for a Single Page App that implements the SPA Editor).
language en Language code (ISO 639-1) to create the content structure from (e.g. en, deu).
country us Country code (ISO 3166-1) to create the content structure from (e.g. US).
singleCountry y Includes a language-master content structure (can be y, or n).
includeExamples n Includes a Component Library example site (can be y, or n).
includeErrorHandler n Includes a custom 404 response page that will be global to the entire instance (can be y or n).
includeCommerce n Includes CIF Core Components dependecies and generates corresponding artifacts.
commerceEndpoint Required for CIF only. Optional endpoint of the commerce system GraphQL service to be used (e.g. https://hostname.com/grapql).
datalayer y Activate integration with Adobe Client Data Layer.
amp n Enable AMP support for genenerated project templates.

System Requirements

Archetype AEM as a Cloud Service AEM 6.5 AEM 6.4 Java SE Maven
23 Continual 6.5.0.0+ 6.4.4.0+ 8, 11 3.3.9+

Setup your local development environment for AEM as a Cloud Service SDK or for older versions of AEM.

Known Issues

When running on Windows and generating the dispatcher configuration, you should be running in an elevated command prompt or the Windows Subsystem for Linux (see #329).

When executing the archetype in interactive mode (without the -B parameter), the properties with default values cannot be changed, unless the final confirmation gets dismissed, which then repeats the questions by including the properties with default values in the questions (see ARCHETYPE-308 for details).