Page tree
Skip to end of metadata
Go to start of metadata

This unit teaches you how to map modules to Maven archetypes.

Mapping specifications to modules and Maven archetypes

What are the basic steps in analyzing a project and choosing modules? 

  1. Choose your module types according to your project specifications.
  2. Choose a Maven archetype per module.
  3. Start with a project module.
  4. Add subsequent modules.

Pro tip - If you are recreating an existing website project, you can use the Standard Templating Kit (STK) to see what aspects of the existing project can be replicated with little additional development.


Magnolia archetypes

Note - The numbering for the archetypes may vary depending on your own Maven setup.

 ArchetypeWhen to use
Magnolia module -> info.magnolia.maven.archetypes:magnolia-module-archetype


The Module archetype generate a basic Magnolia module, including all necessary folders, a module descriptor and two classes:

  • Module configuration class, named after the module-class-name property.
  • Module version handler class, similarly named, in the .setup subpackage.

This is the archetype we use to add a template module to the newly created project in: 6.3.2 Bundled webapps.

Forge module -> info.magnolia.maven.archetypes:magnolia-forge-module-archetype

The Forge module archetype is very similar to the Module Archetype, but provides a pom.xml with defaults for use for a project hosted on the Magnolia Forge.
Blossom module -> info.magnolia.maven.archetypes:magnolia-blossom-module-archetype

Blossom is a Magnolia CMS module developed especially for integrating Magnolia CMS with the Spring framework. This archetype sets up a module for Blossom content. 

Theme -> info.magnolia.maven.archetypes:magnolia-theme-archetype

The Theme module archetype produces a quick start for an STK Theme (see the STK module for further information).

Project -> info.magnolia.maven.archetypes:magnolia-project-archetype

The Project archetype produces a skeleton structure for a project. Contains a parent pom, together with a webapp that overlays the magnolia-empty-webapp - and that is ready to host your custom configuration files. This is the archetype we use to set up a project in: 6.3.1 Empty webapp



Your client requires you to create a new project for a company with subsidiaries in different countries:

  • For the main corporate site use the corporate design.
  • Sites for subsidiaries of the company require a variation on that design.
  • Each site contains a catalog of products, unique to that site; site visitors are encouraged to download the pdf version of the catalog.
  • The catalog is generated from the online content and will not be maintained manually. This ensures that the catalog is up-to-date at all times. 


Based on the scenario outlined above, what would your project structure look like (i.e - what modules types would your project typically require)?

(green star) Expand:

 Suggested project structure
  • Project
    • webapp
    • Templates
    • PDF generator module
    • Corporate theme module
    • Subsidiary theme module

Learn more


Summary of this module.

  • No labels