Maven prompts you to specify values for several parameters. Use values
that fit your requirements. NOTE: Take a note of the
value you enter for the magnolia-bundle-version property. You will
need it later on to create your own
module.
Define value for property 'groupId': com.acme.webapps
Define value for property 'artifactId': acme
Define value for property 'version' 1.0-SNAPSHOT: :
Define value for property 'package' com.acme.webapps: :
Define value for property 'magnolia-bundle-version': 6.2
Define value for property 'project-name' acme: : acme-project
Confirm properties configuration:
groupId: com.acme.webapps
artifactId: acme
version: 1.0-SNAPSHOT
package: com.acme.webapps
magnolia-bundle-version: 6.2
project-name: acme-project
Y: :
Copy
The result you get is an easy to update and maintain Magnolia project.
The project is a Maven multi-module setup, with a webapp building into a
WAR file. The file contains Magnolia, which is brought in using Maven
dependencies.
You can open the project in your IDE. The directory structure created
looks like this:
Maven asks you again to supply some property values.
For the magnolia-bundle-version, enter the value you have used above
when creating the project.
For the blossom-version, use the latest version, currently at
[$version]([("artifactId","magnolia-module-blossom"),("groupId","info.magnolia.blossom"),("label","$version"),("renderType","display_only"),("resourceType","POM")]).
WARNING: If you are using older Magnolia versions, you may have to use
older Blossom versions. If you cannot decide which version to use,
contact our support or check the
Magnolia
Developers Mailing List.
Define value for property 'groupId': com.acme.blossom
Define value for property 'artifactId': acme-blossom-module
Define value for property 'version' 1.0-SNAPSHOT: :
Define value for property 'package' com.acme.blossom: :
Define value for property 'blossom-version': 3.3.1
Define value for property 'magnolia-bundle-version': 6.2
Define value for property 'module-class-name': AcmeModule
Define value for property 'module-name' acme-blossom-module: : acme-blossom
Confirm properties configuration:
groupId: com.acme.blossom
artifactId: acme-blossom-module
version: 1.0-SNAPSHOT
package: com.acme.blossom
blossom-version: 3.3.1
magnolia-bundle-version: 6.2
module-class-name: AcmeModule
module-name: acme-blossom
Y: :
Copy
This creates a Magnolia acme-module and adds it to the parent POM. The
module has a descriptor file, a module class, and the required folder
structure.
After the webapp has started, you should get the following output:
INFO info.magnolia.module.ModuleManagerImpl : Starting module acme-blossom
INFO lia.module.blossom.render.BlossomDispatcherServlet: FrameworkServlet 'blossom': initialization started
INFO .magnolia.module.blossom.template.TemplateExporter: Registered templates [acme-blossom:pages/mainTemplate]
INFO lia.module.blossom.render.BlossomDispatcherServlet: FrameworkServlet 'blossom': initialization completed in 518 ms
Copy
There you go. The project is ready to be loaded in your IDE.