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

There instructions cover the steps for adding a custom module to an existing website project. 


Create the module

When you have an existing Magnolia project (parent pom and webapp) you need to move inside the directory that contains your parent pom.

From the command line run:

mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeCatalog=

Choose archetype:
1: An archetype to create STK Theme modules
2: An archetype to create a Magnolia project (a parent pom and a webapp)
3: An archetype to create basic Magnolia modules
4: An archetype to create a Magnolia module to be hosted on the Magnolia Forge
5: An archetype to create Magnolia modules using Blossom

Each archetype can have it's own set of versions.

Choose info.magnolia.maven.archetypes:magnolia-module-archetype version:
1: 1.1.0
2: 1.2.0
3: 1.2.1
4: 1.2.2
5: 1.2.3
6: 1.2.4-SNAPSHOT

Define the project:



It can be helpful to align the project version with Magnolia version.

packagecom.mycompany.templates (press enter key to accept)


The magnolia-version is equivalent to core version. This can be different than bundle-version.



This name will show up in the configuration tree. Avoid using the word "module" here because it's redundant.

Confirm success:

[INFO] project created from Archetype in dir: /Users/rgange/Temp/magnolia-cms/mycompany-module-templates
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] magnolia-cms (parent pom) .......................... SUCCESS [15:45 min]
[INFO] magnolia-cms: webapp ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15:46 min
[INFO] Finished at: 2018-04-24T11:04:35+02:00
[INFO] Final Memory: 16M/172M
[INFO] ------------------------------------------------------------------------


  • For every additional module added to the project you will find an entry in the parent pom.

  • There can be a discrepancy between bundle version and core version.
    • Check the info.magnolia.bundle.magnolia-bundle-parent pom for the magnoliaVersion, which ultimately determines the version of core.

  • Update your module pom so that it does not explicitly depend on a version of core. Or even remove it if you do not have a code dependency on core.

    By default the archetype creates a dependency on core with a specific version number.

  • Having a descriptor dependency on core is often not required.
    • There is already a transitive dependency.
    • The module does not make some configuration change to another module.
  • No labels

1 Comment

  1. Important note, for this to work, I also had to add a dependency in the webapp's pom, something like this:


    Video instruction reference: