Magnolia 5.6 reached end of life on June 25, 2020. This branch is no longer supported, see End-of-life policy.
A bundle is a package consisting of a Magnolia webapp and a selection of modules. Each bundle has a particular purpose such as demonstration or production use. In this tutorial you create your own bundle. Select only the modules the project needs, not more. A small purpose-built bundle is easy to understand and fast to build and deploy. Maven handles the dependencies between modules.
Magnolia provides a number of ready-made bundles. For more information please read bundles and webapps.
|Usage / purpose|
|A preconfigured Tomcat server ready to be used together with any Magnolia webapp.|
Magnolia provides the following webapps and bundles.
|The standard Magnolia cloud offer bundles a selection of enterprise-level modules, including connectors enabling you to integrate third-party systems, tools and data sources.||See Supported modules in the cloud.|
|Enterprise level webapp specifically built for testing Magnolia Cloud development work locally.||See Supported modules in the cloud .|
|Bundles a lighter selection of enterprise-level modules enabling you to create content and use it in headless deployment scenarios.||See Supported modules in the cloud - Headless cloud bundle modules .|
|This is the most basic Magnolia webapp. Use this as a base for custom tailored webapp.||Core modules from main and ui, Cache (core and ehcache), Pages, Resources, Publishing, Security and Scheduler.|
|Complete Magnolia community edition webapp; no demo project.||Same as |
Cache tools, Cache Browser, Categorization, Commenting, Contacts, DAM, Form , Google sitemap, Groovy, Mail, Messages, MTE , REST and Site.
|Same as ||Travel demo community edition 2|
|Tomcat-bundle including ||Travel demo community edition 2|
Enterprise Standard edition
|Same as |
Backup, Content Dependencies, Content Translation Support, Diff, Google Analytics, Marketing Tags, Personalization, Publishing Transactional, Soft Locking and Workflow.
|Same as ||Travel demo Enterprise Standard edition 3|
|Enterprise Pro edition|
Backup, Content Dependencies, Content Editor, Content tagging, Content Translation Support, Diff, Google Analytics, Marketing Tags, Personalization, Publishing Transactional, Soft Locking, Workflow and Multisite.
|Travel demo enterprise pro edition 4|
Artifact exists, but no entry on nexus Lucene index for requested type.
|Tomcat bundle with ||Travel demo Enterprise Pro edition 4|
|Installer for |
|5||Webapp based on ||Travel demo Enterprise Pro edition 4|
|5||Webapp based on ||Travel demo Enterprise Pro edition 4|
(1) The module summary does not list all modules but provides a good summary. To get the complete list of the modules, look at the corresponding pom file of the bundle.
(2) Travel demo Community edition contains the following modules: magnolia-travel-demo, magnolia-travel-tours.
(3) Travel demo Enterprise Standard edition contains the following modules: magnolia-travel-demo, magnolia-travel-tours, magnolia-travel-demo-personalization, magnolia-travel-demo-marketing-tags.
(4) Travel demo Enterprise Pro edition contains the following modules: magnolia-travel-demo, magnolia-travel-tours, magnolia-travel-demo-personalization, magnolia-travel-demo-marketing-tags, magnolia-travel-demo-multisite.
(5) Both magnolia-enterprise-weblogic-webapp and magnolia-enterprise-websphere-webapp contain all Enterprise Standard and Pro modules but not those for workflow.
In this tutorial we use:
Open a terminal and go to a directory where you keep your Magnolia projects.
mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeCatalog=https://nexus.magnolia-cms.com/content/groups/public/
example.comor a group ID that reflects your company.
example-projector an artifact ID that reflects your project.
example.com. Maven proposes a package name based on the group ID. You can change it later in configuration.
example-com. Maven proposes a package name based on the group ID. You can change it later in configuration.
Verify your input and accept with Y:
Confirm properties configuration: groupId: com.example artifactId: example-project version: 1.0-SNAPSHOT package: com.example magnolia-bundle-version: 5.6.6 project-name: example-project
Maven creates an empty project structure in the current directory.
example-project: Parent project.
example-project-webapp: Your custom bundle as a child Maven project. Here you find a typical Magnolia project folder structure.
pom.xml: Webapp project POM.
src: Java source code and project configuration
pom.xml: Parent POM.
Go to the project folder that Maven created:
Build the project:
mvn clean install
Open the project in your IDE. These instructions are for IntelliJ IDEA. Adapt for other IDEs.
The Tomcat application server starts and deploys the Magnolia project. If your IDE does not open a Web browser automatically, go to
Start Magnolia installation.
Note: The screenshot above is outdated showing installation tasks when using Magnolia 5.3.6. We recommend always using the latest stable Magnolia version when creating a new custom bundle.
You are now running a basic Magnolia project with an empty webapp.
magnolia-empty-webapp runs without errors, the project is ready to add modules according to your requirements. In this example we add the REST modules.
Look at the parent project pom.xml file in
example-project/pom.xml. It uses Maven's dependency management mechanism to import dependencies from the ce-bundle. (Search for the commented note "Importing dependencyManagement of CE bundle".)
When you add modules to your
example-project-webapp you don't have to specify their versions. Version numbers are inherited from the
dependency-management section of the ce-bundle. You only need to specify the version in
example-project/example-project-webapp/pom.xml - if you want to override the versions defined in the dependency management of the ce-bundle.
As an example, add the REST modules to your project. Add the following code in the
dependencies section of the webapp pom in
<dependency> <groupId>info.magnolia.rest</groupId> <artifactId>magnolia-rest-integration</artifactId> </dependency> <dependency> <groupId>info.magnolia.rest</groupId> <artifactId>magnolia-rest-services</artifactId> </dependency> <dependency> <groupId>info.magnolia.rest</groupId> <artifactId>magnolia-rest-content-delivery</artifactId> </dependency>
IntelliJ IDEA displays a notification when you modify a POM file. It prompts you to “Import Changes” or “Enable Auto-Import”. Enabling auto-import works quite well but can be resource intensive if you modify POM files heavily. In this example you can enable auto-import. If you choose not to, remember to click “Import Changes” at least once before starting up the server.
Restart your server for the new modules to be picked up. Magnolia asks you to install the REST modules. After installation you can find a new app in the Dev group and you can start the REST Tools app.
In this tutorial you learned how to create a Magnolia project from a Maven archetype, built the project with Maven, and added custom modules. The project does not do much yet but you reached important goals already: