Exporting a module

In essence, the module export creates a ZIP file of your module folder and all resources identified by the module resources settings. The module export operates very much like the "normal" database export of OpenCms, but it also saves additional information about the module required by the system. This additional information is written to the OpenCms opencms-modules.xml file during module import. You must use the module import / export mechanism to transfer modules between OpenCms instances, or modules will become unusable. Do not use the "common" database export of OpenCms to export module folders.

Note: If your module contains site specific resources, be sure that you are using the same site to import and export a module in OpenCms. Use the site selector of the workplace to switch to the correct OpenCms site.

To export an existing module from OpenCms, please follow these steps:

  1. Select Administration in the View selection of the workplace.
  2. You can do an export of a module either in the Online project or in any "offline" project (e.g. the default Offline project). This means you can also make changes to the module and export these changes before you actually publish them. Select the project you want to export the module from the Project selection.
  3. Open the Module Management.
  4. Click the Export icon of the module that you want to export, or click on the module name and click the Export Module icon in the available module actions:

  5. The export starts, reporting which files and folders are written to the zip archive of the exported module.
  6. After the export has finished, the zip archive of the exported module has been written to WEB-INF/packages/modules/.
  7. The name of the exported module follows this convention: <package name of your module>_<version>.zip, as for example com.alkacon.documentation.documentation_modules_2.0.zip