With Magnolia CLI 3.0, the
jumpstartcommand lets you choose the webapp. Jumpstart downloads the Magnolia stand-alone Tomcat and the selected webapp. As a result you end up with a ready-to-use Magnolia Tomcat bundle according to your needs.
You have different approaches to determine which modules go into your bundle. You can:
- Choose the webapp when you run the jumpstart command.
- Add additional modules using CLI configuration.
- Add additional modules manually.
You can combine these approaches.
Choosing a webapp when you run the jumpstart command
When you run the Magnolia CLI
jumpstart command, you are prompted to choose a webapp.
When choosing, ask yourself:
- Do I want the Magnolia Travel demo ? If you do, choose a webapp with
demoin its name.
- Do I have a license? If you don't have a Magnolia license yet, choose a webapp with
communityin its name. Community editions do not require a license. Alternatively, contact us for a trial!
- Which edition suits my needs best? Look at the List of modules to see which modules each edition contains.
- DX Core
- Community Edition
- Is an empty webapp the best starting point for my project? If so, choose
You can customize the list of webapps available to choose from by editing the
availableWebapps section of the Magnolia CLI
Adding additional modules
Adding additional modules using mgnl-cli.json
This approach requires you edit the Magnolia CLI
mgnl-cli.json configuration file. The
mgnl-cli.json provides a hook to add more modules on top of the webapp you chose. Modules may be added to any webapp available when running the jumpstart command.
We strongly recommend you create a local copy of the json file to edit . To do so, use the
customize-local-config command to create a custom configuration and make sure you have a complete configuration which includes both the mgnl-cli.json and the prototypes folder.
You must adapt the
mgnl-cli.json file before running
jumpstart. Add the module(s) you want to add to the section
downloadJars of the mgnl-cli.json file.
When you run the jumpstart command, you must also make sure the custom configuration you want to use is in the folder where you run the command or in a ancestor folder.
In the default version of the file, the downloadJars section is empty:
Add as many modules you need, separating entries with a coma:
In this example, we add the
magnolia-app-tutorial content app.
Adding modules manually into the WEB-INF/lib directory
If you add modules manually, you do not need to change the
mgnl-cli.json file. We recommend you use this approach to adapt modules that you have built locally or that are not available on repositories.
This approach is also useful when you want to change the version of modules that are already part of the webapp.
In this example, we want to use
magnolia-community-demo-webapp 5.6.3 with Magnolia REST modules 2.1. Note that Magnolia 5.6.3 originally contains Magnolia REST modules 2.0.2. REST-2.1 was released after Magnolia 5.6.3 but before Magnolia 5.6.4.
jumpstart, requesting the 5.6.3 version
Choose magnolia-community-demo-webapp. Do not run the start command yet.
- Download the required REST modules:
- Open the following directory created by the
- In this directory, delete the files you want to replace:
- Place the downloaded files into the directory: