How to Use the Archetype
The first step using the archetype is to create a project, which generates the modules in a local file structure. As part of project generation, a number of properties for your project can be defined such as project name, version, enabling various options, etc.
Building the project with Maven creates the artifacts (packages and OSGi bundles), that can be deployed to AEM. Additional Maven commands and profiles can be used to deploy the project artifacts to an AEM instance.
What You Get Using the Archetype
The archetype is made up of modules, all of which are created automatically when using the archetype.
- core is a Java bundle containing all core functionality like OSGi services, listeners, and schedulers, as well as component-related Java code such as servlets and request filters.
- it.tests are Java-based integration tests.
- ui.apps contains the
/apps
and/etc
parts of the project, i.e. JS and CSS clientlibs, components, and templates. - ui.content contains sample content using the components from the ui.apps module.
- ui.config contains runmode-specific OSGi configs for the project.
- ui.frontend.general contains the artifacts required to use the general Webpack-based front-end build module (optional).
- ui.frontend.react (optional) contains the artifacts required when using the archetype to create a SPA projects based on React (optional, depends on build parameters).
- ui.frontend.angular (optional) contains the artifacts required when using the archetype to create a SPA projects based on Angular (optional, depends on build parameters).
- ui.tests contains Selenium-based UI tests.
- all is a single content package that embeds all of the compiled modules (bundles and content packages) including any vendor dependencies.
- dispatcher.ams contains the basic dispatcher configurations for AMS/on-prem projects(optional, depends on build parameters).
- dispatcher.cloud contains the basic dispatcher configurations for AEMaaCS projects (optional, depends on build parameters).
The modules of the archetype represented in Maven are deployed to AEM as content packages representing the application, the content, and the necessary OSGi bundles.