The Maven OpenCms Plugin assembles and packages OpenCms modules. It expects its resources in src/main/vfs or whatever you set in vfsRoot. Java classes and additional dependencies declared in your POM will also be added to the module. The manifest file can be provided and will be filtered and copied for inclusion, or will be generated from a stub file and additional meta information provided by the IntelliJ OpenCms Plugin.

Adding the Plugin to your build

To generate an OpenCms module zip archive for import into your server, add the following to your POM:


If the <packaging> of your project is set to opencms-module, this Plugin is executed whenever it passes the "package" phase. You just call the package phase like this:

 mvn package

If you have additional dependencies you want to add to your module (don't forget to set an exportpoint!), just declare them in your POM, they will be automatically added to your module.

Be careful to include a dependency to opencms-core in a module POM, otherwise Maven will possibly include additional Jars that are already provided by OpenCms.

Create exploded module

You can create just the exploded module structure.

mvn com.mediaworx.mojo:opencms-maven-plugin:module-exploded

Manifest generation

Depending on whether manifestFile or manifestMetaDir is set, the manifest will be copied or generated from the given stub and additional meta information gathered by the IntelliJ OpenCms Plugin.

mvn com.mediaworx.mojo:opencms-maven-plugin:manifest

Module zip

This is the default goal that packages a module zip

mvn com.mediaworx.mojo:opencms-maven-plugin:module-zip