Magnolia 5.4 reached end of life on November 15, 2018. This branch is no longer supported, see End-of-life policy.
...
When you start Magnolia, the system identifies available modules by locating each module's descriptor file.
Table of Contents |
---|
...
For each module you have to provide:
artifactId
and groupId
to the identify the Maven artifact<name>
of the module in the module descriptor file.There are no strict naming conventions. You should give a name that reflects the purpose of the module. The name may also contain the name of your company.
Depending on the module purpose it might be a good idea to use the same value for the artifact ID and module name.
It is definitively good practice to name the module descriptor file by the pattern <module-name>.xml
.
Example:
social-media-hub
com.tinext.magnolia
(contains the name of the creator Tinext.com)social-media-hub.xml
Include Page | ||||
---|---|---|---|---|
|
You can define runtime or install time dependencies (not build dependencies). If you define a dependency on a module, then this module will be installed and started before your module. A dependency can be optional. Optional in this context means that if an optional module is not present, installation will proceed, but if the optional module is present, this module will be installed first. The dependencies could look like this:
Code Block |
---|
<dependencies> <dependency> <name>core</name> <version>3.6.0/*</version> </dependency> <!-- in case cache module is present, make sure we install after so we can add a bypass --> <dependency> <name>cache</name> <version>3.6.0/*</version> <optional>true</optional> </dependency> </dependencies> |
Include Page | ||||
---|---|---|---|---|
|
Workspaces can be defined in the module descriptor. If necessary Magnolia initializes these workspaces before the installation starts. As an example look at the data module:
Code Block | ||||
---|---|---|---|---|
| ||||
<repositories> <repository> <name>magnolia</name> <workspaces> <workspace>data</workspace> </workspaces> <nodeTypeFile>/mgnl-nodetypes/magnolia-module-data-nodetypes.xml</nodeTypeFile> </repository> </repositories> |
Under the hood, these repository workspaces are registered and initialized by the
Javadoc | |||||||
---|---|---|---|---|---|---|---|
|