Set up Magnolia PaaS

This page guides you on setting up everything you need to set up a new Magnolia PaaS project.

Check you have the correct prerequisites, create your project, and then get going with our Hello PaaS tutorial.


There are a few things that you need before you can get started with developing for your Magnolia PaaS project.


Magnolia needs at least a Java Runtime Environment (JRE) to run. Type java -version in a terminal or command prompt. If the system reports a version number, Java is installed on your computer.

See the Certified stack page to confirm that the version installed is supported.

If you don’t have Java, install it.

Windows users

On Windows you need a Java SE Development Kit (JDK). The Java Runtime Environment (JRE) is not enough because the Tomcat application server does not recognize it.

What is the difference?

  • JRE is for users who run Java programs on their computer.

  • JDK is for developers who write Java-based applications.

Download and install JDK. By default JDK is installed at C:\Program Files\Java\jdk-<version>\. You can choose another location.


Download and Install Maven 3. Follow the OS-specific installation instructions from the Maven website (e.g. setting PATH environment variable).

In order to verify Maven has been installed correctly:

Open a terminal or a shell and run:

`mvn -v`
Maven keeps your user configuration and local repository under th ${user.home}/.m2/ directory.

Setting up credentials

To encrypt your Nexus credentials, execute the following command in your terminal or shell

mkdir -p ~/.m2 ; read -s -p 'Please enter your master Maven password: ' MASTPASS && \
echo "<settingsSecurity><master>`mvn --encrypt-master-password $MASTPASS`</master></settingsSecurity>" > ~/.m2/settings-security.xml ; \

After you have set up Password Encryption above, switch to your shell and run the following command:

mvn org.sonatype.plugins:nexus-m2settings-maven-plugin:1.6.5:download -DnexusUrl=link: -DtemplateId=magnolia-enterprise

Testing Maven settings

A simple way to test your settings: Try to build a project with Maven which is dependent on a Magnolia Enterprise module. Try to build a DX Core bundle from the Magnolia official Maven archetypes:

mvn archetype:generate -Dfilter=info.magnolia.maven.archetypes:magnolia


Make sure you have a Java IDE installed. It could be:

Create a project using the Maven archetype

Create a custom cloud bundle from the following Maven Archetypes:

mvn archetype:generate \
    -DarchetypeGroupId=info.magnolia.maven.archetypes \
    -DarchetypeArtifactId=magnolia-dx-core-custom-cloud-archetype \
    -DarchetypeVersion=1.3 \

You will be prompted to enter the following info:

  • groupId: The Maven groupId of your cloud bundle (ie: info.magnolia.demo)

  • artifactId: The Maven artifactId of your cloud bundle (ie: magnolia-demo-ecommerce)

  • version: The Maven version of your cloud bundle (ie: 1.0-SNAPSHOT). The final version is generated on release.

  • package: The Maven base package of your cloud bundle (usually same a the groupId)

  • magnolia-bundle-version: The Magnolia version to be used in your cloud bundle (ie: 6.2.19)

  • project-name: The project name (ie: magnolia-demo-ecommerce)

When you generate your project with the Maven Archetype, it creates the pom.xml file which automatically contains the magnolia-dx-core-custom-cloud-parent artifact.


      <!-- DX Core custom cloud dependency management -->
        <artifactId>magnolia-dx-core-custom-cloud-parent</artifactId> (1)

1 The magnolia-dx-core-custom-cloud-parent artifact.

Testing the project

Open a terminal and go to the newly created project and then execute the following Maven build command:

mvn clean package

Starting Magnolia locally

Load the project in your IDE and configure the Tomcat server with the following system variables.

-Dmagnolia.webapp="Goofy Author"

Custom cloud parent project

The custom cloud parent project automatically excludes the following modules
It includes the following modules
  • Instrumentation: To expose the Magnolia metrics to the monitoring service

  • Configuration injection: To facilitate the customization of Magnolia