opencms:module-zip

Full name:

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

Description:

Creates OpenCms module zip.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: runtime.
  • Binds by default to the lifecycle phase: package.

Optional Parameters

Name Type Since Description
addDependencies Boolean - Whether to include project dependencies in the module. This will only add the files to the module zip, they have to be included in the manifest to be imported into OpenCms. You can also use the Maven dependency plugin to add dependencies to your vfs lib directory.
Default value is: false.
archive MavenArchiveConfiguration - The maven archive configuration to use.
classesDirectory File - The directory containing generated classes.
Default value is: ${project.build.outputDirectory}.
excludes String - Directories in sourceResources to exclude (ant-style excludes). You may provide excludes in ant-style patterns. Files matching that pattern will not be included to the module (basically they will not be copied to ${targetDir}).
Default value is: **/.svn/,**/.cvs/,**/.git/,**/Thumbs.db,**/.DS_STORE.
manifestFile String - The manifest provided is filtered and copied to ${targetDir} for inclusion in the module.
In addition to the standard Maven project properties and user properties, the following properties will be set up from default Maven project properties as follows:
  • ${moduleversion} set to ${project.version} with stripped off -SNAPSHOT suffix
  • ${modulename} set to ${project.groupId}.${project.artifactId}
  • ${modulenicename} set to ${project.name}
  • ${moduledescription} set to ${project.description}
  • ${opencmsversion} set to the version of the opencms-core dependency
The defaults can be overridden through POM properties or (except for ${modulenicename} and ${opencmsversion}) in the plugin configuration section.
manifestMetaDir String - The manifest stub provided in conjunction with the meta information gathered is used to generate a manifest file. The same filtering as with manifestFile applies.
moduleDir String - Where the module zip should be created.
Default value is: ${project.build.directory}.
moduleName String - The Name of the module, defaults to ${project.groupId}.${project.artifactId}.
Default value is: ${project.groupId}.${project.artifactId}.
moduleVersion String - The Version of the module. Defaults to ${project.version} with non numeric characters being removed from the end, e.g. -SNAPSHOT.
Default value is: ${project.version}.
replaceMetaVariables Boolean - Whether to generate and replace uuids and dates in manifest fragments. Works only when using manifestMetaDir.
Default value is: false.
srcResources List - Defines a set of additional resources that are included in the module. By default, files under vfsRoot and under ${project.build.outputDirectory} as well as additional runtime dependencies will be included. Currently only <directory> and <targetPath> are evaluated. The <targetPath> configured is relative to ${targetDir}.
A possible configuration might look like this:
<srcResources>
  <resource>
    <directory>${project.basedir}/web/</directory>
    <targetPath></targetPath>
  </resource>
</srcResources>

targetDir String - This is the temporary folder where the module is assembled.
Default value is: ${project.build.directory}/opencms-module.
vfsRoot String - Directory containing the resources to be included, defaults to src/main/vfs.
Default value is: ${project.basedir}/src/main/vfs.

Parameter Details

addDependencies:

Whether to include project dependencies in the module. This will only add the files to the module zip, they have to be included in the manifest to be imported into OpenCms. You can also use the Maven dependency plugin to add dependencies to your vfs lib directory.
  • Type: java.lang.Boolean
  • Required: No
  • Default: false

archive:

The maven archive configuration to use.
  • Type: org.apache.maven.archiver.MavenArchiveConfiguration
  • Required: No

classesDirectory:

The directory containing generated classes.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.outputDirectory}

excludes:

Directories in sourceResources to exclude (ant-style excludes). You may provide excludes in ant-style patterns. Files matching that pattern will not be included to the module (basically they will not be copied to ${targetDir}).
  • Type: java.lang.String
  • Required: No
  • Default: **/.svn/,**/.cvs/,**/.git/,**/Thumbs.db,**/.DS_STORE

manifestFile:

The manifest provided is filtered and copied to ${targetDir} for inclusion in the module.
In addition to the standard Maven project properties and user properties, the following properties will be set up from default Maven project properties as follows:
  • ${moduleversion} set to ${project.version} with stripped off -SNAPSHOT suffix
  • ${modulename} set to ${project.groupId}.${project.artifactId}
  • ${modulenicename} set to ${project.name}
  • ${moduledescription} set to ${project.description}
  • ${opencmsversion} set to the version of the opencms-core dependency
The defaults can be overridden through POM properties or (except for ${modulenicename} and ${opencmsversion}) in the plugin configuration section.
  • Type: java.lang.String
  • Required: No

manifestMetaDir:

The manifest stub provided in conjunction with the meta information gathered is used to generate a manifest file. The same filtering as with manifestFile applies.
  • Type: java.lang.String
  • Required: No

moduleDir:

Where the module zip should be created.
  • Type: java.lang.String
  • Required: No
  • Default: ${project.build.directory}

moduleName:

The Name of the module, defaults to ${project.groupId}.${project.artifactId}.
  • Type: java.lang.String
  • Required: No
  • Default: ${project.groupId}.${project.artifactId}

moduleVersion:

The Version of the module. Defaults to ${project.version} with non numeric characters being removed from the end, e.g. -SNAPSHOT.
  • Type: java.lang.String
  • Required: No
  • Default: ${project.version}

replaceMetaVariables:

Whether to generate and replace uuids and dates in manifest fragments. Works only when using manifestMetaDir.
  • Type: java.lang.Boolean
  • Required: No
  • Default: false

srcResources:

Defines a set of additional resources that are included in the module. By default, files under vfsRoot and under ${project.build.outputDirectory} as well as additional runtime dependencies will be included. Currently only <directory> and <targetPath> are evaluated. The <targetPath> configured is relative to ${targetDir}.
A possible configuration might look like this:
<srcResources>
  <resource>
    <directory>${project.basedir}/web/</directory>
    <targetPath></targetPath>
  </resource>
</srcResources>
  • Type: java.util.List
  • Required: No

targetDir:

This is the temporary folder where the module is assembled.
  • Type: java.lang.String
  • Required: No
  • Default: ${project.build.directory}/opencms-module

vfsRoot:

Directory containing the resources to be included, defaults to src/main/vfs.
  • Type: java.lang.String
  • Required: No
  • Default: ${project.basedir}/src/main/vfs