Let's take an inventory. So I have an ee bundle downloaded (community here). I started it using my command line utility. I've finished the install in Firefox and I'm tailing the log from the command window. I've got a second command window open for the CLI tool. I've moved myself into the modules directory of the author instance and I'm ready to start creating modules and templates. I'm using the Atom text editor and I have the modules directory opened as a project. Atom also provides syntax highlighting for YAML but not Freemarker. As a substitute I will associate Freemarker files as HTML to at least get partial highlighting. No so bad, with a little finagling I can probably get that all showing at one time.
Eclipse IDE is a powerful tool. It is the most popular Java IDE today. It can integrate a lot of technologies and also provides a framework for plugins. Let's set up the light development version. No Maven, no Git is needed for this. Front end, back end, those evaluating the product can find this approach useful.
- Make sure you have Java 8 JDK.
- Download a copy of Eclipse Oxygen.
Download a copy of Tomcat Server.
It should not matter which server you use. Tomcat tends to be the lightest.
- Download a copy of the war file you would like to use.
- Magnolia EE downloads: https://download.magnolia-cms.com/ (requires license key)
- Community Edition downloads: https://nexus.magnolia-cms.com/content/repositories/magnolia.public.releases/info/magnolia/bundle/
In your user home directory create a folder named
Eclipseand a sub-folder called
- Move the tomcat zip inside the workspace and unzip it.
- Move the Magnolia war file inside the workspace.
- Open Eclipse
- Select the new workspace when prompted.
- Close the Welcome tab to get to the Project Explorer.
- Configure the environment.
Close the tabs: Markers, Properties, Data Source Explorer, Snippets, Outline, and Task List.
These are really not needed for light development so we move them out of the way.
- Open the Internal Browser for convenience.
- Hide the Tool Bar. (Window > Appearance)
Now for the trifecta. The custom Eclipse plugin for Magnolia development. With this plugin you can create light modules, apps, dialogs, and templates with a wizard.
With light modules select only the registries you need. Create only the files you want. Link templates to existing dialogs or create new dialogs via form input.
Create a page or component template using the wizard.
Create a content app with basic features that can be customized.
Virtual URI mappings
Quickly create virtual URI mappings using a wizard.
Creating decorations can be confusing for some. The wizard walks you through the steps to get the appropriate module and registry folders as well as the definition you wish to target.
Get the base configuration automated using the wizard.
Magnolia Eclipse Support module
Offered as an extension, the Magnolia eclipse support module provides rest endpoints which allow Eclipse to query things from the registries. For example, when creating a page template you can select your preferred dialog from a drop-down rather then having to try and remember the correct format.