Magnolia 5.7 reached extended end of life on May 31, 2022. Support for this branch is limited, see End-of-life policy. Please note that to cover the extra maintenance effort, this EEoL period is a paid extension in the life of the branch. Customers who opt for the extended maintenance will need a new license key to run future versions of Magnolia 5.7. If you have any questions or to subscribe to the extended maintenance, please get in touch with your local contact at Magnolia.
Creating the project
Before running the Maven
archetype command, please read How to use Magnolia Maven archetypes: Check Maven settings.
If you are not familiar with the Maven archetype plugin, please also read How to use Magnolia Maven archetypes: The archetype plugin.
Take note of the versions of Magnolia and the Blossom module in the configurations below. In this tutorial, we always try using the latest versions.
On your local file system, create a new directory for the project, change into the directory and execute the following Maven command:
Maven prompts you to specify values for several parameters. Use values that fit your requirements. Take a note of the value you enter for the
magnolia-bundle-version property. You will need it later on to create your own module.
The result you get is an easy to update and maintain Magnolia project. The project is a Maven multi-module setup, with a webapp building into a WAR file. The file contains Magnolia, which is brought in using Maven dependencies.
You can open the project in your IDE. The directory structure created looks like this:
Creating your own module
In this step, you create a Magnolia module to be used to develop your website. The archetypes can help you do most of the work.
In the project directory, issue the following command:
Maven asks you again to supply some property values.
- For the
magnolia-bundle-version, enter the value you have used above when creating the project.
- For the
blossom-version, use the latest version, currently at
If you are using older Magnolia versions, you may have to use older Blossom versions. If you cannot decide which version to use, contact our support or check the Magnolia Developers Mailing List.
This creates a Magnolia acme-module and adds it to the parent POM. The module has a descriptor file, a module class, and the required folder structure.
Create a dependency
Declare the module as a dependency to the webapp POM. Add the following dependency to the acme-webapp
Build and Run
You now have a module with:
- A module class,
- A module descriptor file,
Also present is the
applicationContext.xml for Spring beans.
To build it all, cd to
acme/* and enter the following command:
If you want to use Maven to start it up, add the Jetty plugin to the webapp's POM file:
Then, point your browser to
After the webapp has started, you should get the following output:
There you go. The project is ready to be loaded in your IDE.