[mgnl-tricks] How quickly run a Community Edition from Maven

Ok, long time..
.. I am back here just to spot a lack on Magnolia quick start procedure.
If you follow the old-but-gold maven archetype path, you can have in few minutes a working Magnolia CMS with.. almost nothing inside: no Assets, no tools, no REST.

An empty Magnolia webapp
An empty Magnolia webapp

Reading the documentation, you can discover that Magnolia ships “bundles”. Well described here.
But HOW we can transform our empty project into a working community bundle? Probably, this is not described.
But it is sooo easy and sooo quick.

Magnolia ships 2 community artifacts:
– a bundle “parent”: a collection of dependencies
– a bundle “webapp”: the one you have to overlay with your custom config, modules, …

The trick: update -webapp pom.xml in this way:

In the maven log console, you can see now a different “overlay” stack:

And this is the result:

Magnolia Community Edition bundle - with demo
Magnolia Community Edition bundle – with demo

– Note1: ${magnoliaVersion} is inherited from parent pom.
– Note2: do not forget to add in your -webapp pom.xml the <failonmissingwebxml>false</failonmissingwebxml> settings, to avoid Eclipse error
– Note3: do not forget to change the Maven property “javaVersion” to 1.8

Everything is on GitHub: https://github.com/matteopelucco/magnolia-555

Latest articles

Matteo Pelucco Written by:

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *


− two = 1