Fork me on GitHub

filevault-package:package

Full name:

org.apache.jackrabbit:filevault-package-maven-plugin:1.3.5-SNAPSHOT:package

Description:

Builds a content package. Uses the metadata generated by and embedded artifacts (like subpackages or OSGi bundles) configured in a preceding execution of goal generate-metadata.

This goal is executed/bound by default for Maven modules of type content-package.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: package.

Required Parameters

Name Type Since Description
<excludes> Set<String> - The file name patterns to exclude (in addition to the default ones mentioned at addDefaultExcludes. The format of each pattern is described in org.codehaus.plexus.util.DirectoryScanner. The comparison is against the path relative to the according filter root. Since this is hardly predictable it is recommended to use only filename/directory name patterns here but not take into account file system hierarchies!

Each value is either a regex pattern if enclosed within %regex[ and ], otherwise an Ant pattern.


Default value is: **/.vlt,**/.vltignore,**/.gitignore,**/.gitattributes.
User property is: vault.excludes.
<failOnDuplicateEntries> boolean - Set to false to not fail the build in case of files/folders being added to the resulting package more than once. Usually this indicates overlapping with embedded files or overlapping filter rules.
Default value is: true.
User property is: vault.failOnDuplicateEntries.
<failOnUncoveredSourceFiles> boolean - Set to true to fail the build in case of files are being contained in the jcrRootSourceDirectory which are not covered by the filter rules and therefore would not end up in the package.
Default value is: true.
User property is: vault.failOnUncoveredSourceFiles.
<finalName> String - The name of the generated package ZIP file without the ".zip" file extension. The optional classifier parameter will be appended to the name of the package.
Default value is: ${project.build.finalName}.
User property is: vault.finalName.
<jcrRootSourceDirectory> File[] - The directory that contains the jcr_root of the content. Multiple directories can be specified as a comma separated list, which will act as a search path and cause the plugin to look for the first existing directory.
Default value is: ${project.basedir}/jcr_root,${project.basedir}/src/main/jcr_root,${project.basedir}/src/main/content/jcr_root,${project.basedir}/src/content/jcr_root,${project.build.outputDirectory}.
User property is: vault.jcrRootSourceDirectory.
<metaInfVaultDirectory> File[] - The directory that contains the META-INF/vault. Multiple directories can be specified as a comma separated list, which will act as a search path and cause the plugin to look for the first existing directory.

This directory is added as fileset to the package archiver before the the workDirectory. This means that files specified in this directory have precedence over the one present in the workDirectory. For example, if this directory contains a properties.xml it will not be overwritten by the generated one. A special case is the filter.xml which will be merged with inline filters if present.


Default value is: ${project.basedir}/META-INF/vault,${project.basedir}/src/main/META-INF/vault,${project.basedir}/src/main/content/META-INF/vault,${project.basedir}/src/content/META-INF/vault.
User property is: vault.metaInfVaultDirectory.
<outputDirectory> File - Directory in which the built content package will be output.
Default value is: ${project.build.directory}.
User property is: vault.outputDirectory.
<workDirectory> File - The output directory for goal "generate-metadata" and additional input directory containing the metadata to be packaged up into the content package for goal "package". The directory name is suffixed with -<classifier> in case a classifier is used. In case of the "package" goal this falls back to the non-suffixed directory name in case the one with suffix does not exist.
Default value is: ${project.build.directory}/vault-work.

Optional Parameters

Name Type Since Description
<addDefaultExcludes> boolean 1.1.0 By default certain metadata files are excluded which means they will not be copied into the package. If you need them for a particular reason you can do that by setting this parameter to false. This means all files matching the following Ant patterns won't be copied by default.
  • Misc: **/*~, **/#*#, **/.#*, **/%*%, **/._*
  • CVS: **/CVS, **/CVS/**, **/.cvsignore
  • SVN: **/.svn, **/.svn/**
  • GNU: **/.arch-ids, **/.arch-ids/**
  • Bazaar: **/.bzr, **/.bzr/**
  • SurroundSCM: **/.MySCMServerInfo
  • Mac: **/.DS_Store
  • Serena Dimension: **/.metadata, **/.metadata/**
  • Mercurial: **/.hg, **/.hg/**
  • GIT: **/.git, **/.git/**
  • Bitkeeper: **/BitKeeper, **/BitKeeper/**, **/ChangeSet, **/ChangeSet/**
  • Darcs: **/_darcs, **/_darcs/**, **/.darcsrepo, **/.darcsrepo/****/-darcs-backup*, **/.darcs-temp-mail

See also: org.codehaus.plexus.util.AbstractScanner.DEFAULTEXCLUDES
Default value is: true.
<archive> MavenArchiveConfiguration - The archive configuration to use. See the documentation for Maven Archiver. All settings related to manifest are not relevant as this gets overwritten by the manifest in workDirectory
<builtContentDirectory> File - Deprecated. The directory containing the content to be packaged up into the content package.
<classifier> String 1.1.4 Optional classifier to add to the generated package. If given, the artifact will be attached as a supplemental artifact having this classifier. Also all generated metadata will be pushed to <workDirectory>-<classifier> and will preferably be looked up from there. In addition the embedded file names will be exchanged leveraging a classifier specific property.
User property is: vault.classifier.
<delimiters> LinkedHashSet<String> 1.1.0

Set of delimiters for expressions to filter within the resources. These delimiters are specified in the form 'beginToken*endToken'. If no '*' is given, the delimiter is assumed to be the same for start and end.

So, the default filtering delimiters might be specified as:

<delimiters>
  <delimiter>${*}</delimiter>
  <delimiter>@</delimiter>
</delimiters>

Since the '@' delimiter is the same on both ends, we don't need to specify '@*@' (though we can).


User property is: vault.delimiters.
<enableJcrRootFiltering> boolean 1.1.0 Enables resource filtering on the jcrRootSourceDirectory source files similar to what the maven-resources-plugin does. It is recommended to limit filtering with filteredFilePatterns and nonFilteredFileExtensions.
Default value is: false.
User property is: vault.enableJcrRootFiltering.
<enableMetaInfFiltering> boolean 1.1.0 Enables resource filtering on the meta-inf source files similar to what the maven-resources-plugin does. It is recommended to limit filtering with filteredFilePatterns and nonFilteredFileExtensions.
Default value is: false.
User property is: vault.enableMetaInfFiltering.
<escapedBackslashesInFilePath> boolean 1.1.0 To escape interpolated values with Windows path c:\foo\bar will be replaced with c:\\foo\\bar.
Default value is: false.
User property is: vault.escapedBackslashesInFilePath.
<escapeString> String 1.1.0 Expression preceded with this String won't be interpolated. \${foo} will be replaced with ${foo}.
User property is: vault.escapeString.
<filteredFilePatterns> List<String> 1.1.8 Restricts the files which should be filtered to the ones having matching one of the given Ant patterns. Evaluated before nonFilteredFileExtensions. All patterns are relative to the root paths (given through the filter.xml root entries or the META-INF directory). If empty or not set all files except for the ones from nonFilteredFileExtensions are filtered.
User property is: vault.filteredFilePatterns.
<filterFiles> List<String> 1.1.0 The list of extra filter properties files to be used along with System properties, project properties, and filter properties files specified in the POM build/filters section, which should be used for the filtering during the current mojo execution.
User property is: vault.filters.
<metaInfDirectory> File - The directory that contains additional files and folders to end up in the package's META-INF folder. Every file and subfolder is considered except for the subfolder named vault and a file named MANIFEST.MF.
User property is: vault.metaInfDirectory.
<nonFilteredFileExtensions> List<String> 1.1.0 Additional list of file extensions that should not be filtered, e.g. binaries. Already predefined as extensions which should never be filtered are: jpg, jpeg, gif, bmp, png, ico. Instead of using this deny list approach for binary files and others which should not be filtered, consider using an allow list via filteredFilePatterns instead.
User property is: vault.nonFilteredFileExtensions.
<outputTimestamp> String 1.1.0 Timestamp for reproducible output archive entries, either formatted as ISO 8601 yyyy-MM-dd'T'HH:mm:ssXXX or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).
Default value is: ${project.build.outputTimestamp}.
<prefix> String - Adds a path prefix to all resources. Useful for shallower source trees. This does not apply to files in workDirectory nor metaInfVaultDirectory but e.g. is relevant for the default filter and for the jcr_root of the package. Must start with "/" if not empty. As separator only forward slashes are allowed. The trailing slash is automatically appended if not there.
User property is: vault.prefix.
<resourceEncoding> String 1.1.0 The character encoding scheme to be applied when filtering resources.
Default value is: ${project.build.sourceEncoding}.
User property is: vault.resourceEncoding.
<supportMultiLineFiltering> boolean 1.1.0 Stop searching endToken at the end of line when filtering is applied.
Default value is: false.
User property is: vault.supportMultiLineFiltering.
<useDefaultDelimiters> boolean 1.1.0 Use default delimiters in addition to custom delimiters, if any.
Default value is: true.
User property is: vault.useDefaultDelimiters.

Parameter Details

<addDefaultExcludes>

By default certain metadata files are excluded which means they will not be copied into the package. If you need them for a particular reason you can do that by setting this parameter to false. This means all files matching the following Ant patterns won't be copied by default.
  • Misc: **/*~, **/#*#, **/.#*, **/%*%, **/._*
  • CVS: **/CVS, **/CVS/**, **/.cvsignore
  • SVN: **/.svn, **/.svn/**
  • GNU: **/.arch-ids, **/.arch-ids/**
  • Bazaar: **/.bzr, **/.bzr/**
  • SurroundSCM: **/.MySCMServerInfo
  • Mac: **/.DS_Store
  • Serena Dimension: **/.metadata, **/.metadata/**
  • Mercurial: **/.hg, **/.hg/**
  • GIT: **/.git, **/.git/**
  • Bitkeeper: **/BitKeeper, **/BitKeeper/**, **/ChangeSet, **/ChangeSet/**
  • Darcs: **/_darcs, **/_darcs/**, **/.darcsrepo, **/.darcsrepo/****/-darcs-backup*, **/.darcs-temp-mail

See also: org.codehaus.plexus.util.AbstractScanner.DEFAULTEXCLUDES
  • Type: boolean
  • Since: 1.1.0
  • Required: No
  • Default: true

<archive>

The archive configuration to use. See the documentation for Maven Archiver. All settings related to manifest are not relevant as this gets overwritten by the manifest in workDirectory

<builtContentDirectory>

Deprecated. Use jcrRootSourceDirectory instead.
The directory containing the content to be packaged up into the content package.

<classifier>

Optional classifier to add to the generated package. If given, the artifact will be attached as a supplemental artifact having this classifier. Also all generated metadata will be pushed to <workDirectory>-<classifier> and will preferably be looked up from there. In addition the embedded file names will be exchanged leveraging a classifier specific property.
  • Type: java.lang.String
  • Since: 1.1.4
  • Required: No
  • User Property: vault.classifier

<delimiters>

Set of delimiters for expressions to filter within the resources. These delimiters are specified in the form 'beginToken*endToken'. If no '*' is given, the delimiter is assumed to be the same for start and end.

So, the default filtering delimiters might be specified as:

<delimiters>
  <delimiter>${*}</delimiter>
  <delimiter>@</delimiter>
</delimiters>

Since the '@' delimiter is the same on both ends, we don't need to specify '@*@' (though we can).


<enableJcrRootFiltering>

Enables resource filtering on the jcrRootSourceDirectory source files similar to what the maven-resources-plugin does. It is recommended to limit filtering with filteredFilePatterns and nonFilteredFileExtensions.
  • Type: boolean
  • Since: 1.1.0
  • Required: No
  • User Property: vault.enableJcrRootFiltering
  • Default: false

<enableMetaInfFiltering>

Enables resource filtering on the meta-inf source files similar to what the maven-resources-plugin does. It is recommended to limit filtering with filteredFilePatterns and nonFilteredFileExtensions.
  • Type: boolean
  • Since: 1.1.0
  • Required: No
  • User Property: vault.enableMetaInfFiltering
  • Default: false

<escapedBackslashesInFilePath>

To escape interpolated values with Windows path c:\foo\bar will be replaced with c:\\foo\\bar.
  • Type: boolean
  • Since: 1.1.0
  • Required: No
  • User Property: vault.escapedBackslashesInFilePath
  • Default: false

<escapeString>

Expression preceded with this String won't be interpolated. \${foo} will be replaced with ${foo}.
  • Type: java.lang.String
  • Since: 1.1.0
  • Required: No
  • User Property: vault.escapeString

<excludes>

The file name patterns to exclude (in addition to the default ones mentioned at addDefaultExcludes. The format of each pattern is described in org.codehaus.plexus.util.DirectoryScanner. The comparison is against the path relative to the according filter root. Since this is hardly predictable it is recommended to use only filename/directory name patterns here but not take into account file system hierarchies!

Each value is either a regex pattern if enclosed within %regex[ and ], otherwise an Ant pattern.


<failOnDuplicateEntries>

Set to false to not fail the build in case of files/folders being added to the resulting package more than once. Usually this indicates overlapping with embedded files or overlapping filter rules.
  • Type: boolean
  • Required: Yes
  • User Property: vault.failOnDuplicateEntries
  • Default: true

<failOnUncoveredSourceFiles>

Set to true to fail the build in case of files are being contained in the jcrRootSourceDirectory which are not covered by the filter rules and therefore would not end up in the package.
  • Type: boolean
  • Required: Yes
  • User Property: vault.failOnUncoveredSourceFiles
  • Default: true

<filteredFilePatterns>

Restricts the files which should be filtered to the ones having matching one of the given Ant patterns. Evaluated before nonFilteredFileExtensions. All patterns are relative to the root paths (given through the filter.xml root entries or the META-INF directory). If empty or not set all files except for the ones from nonFilteredFileExtensions are filtered.

<filterFiles>

The list of extra filter properties files to be used along with System properties, project properties, and filter properties files specified in the POM build/filters section, which should be used for the filtering during the current mojo execution.

<finalName>

The name of the generated package ZIP file without the ".zip" file extension. The optional classifier parameter will be appended to the name of the package.
  • Type: java.lang.String
  • Required: Yes
  • User Property: vault.finalName
  • Default: ${project.build.finalName}

<jcrRootSourceDirectory>

The directory that contains the jcr_root of the content. Multiple directories can be specified as a comma separated list, which will act as a search path and cause the plugin to look for the first existing directory.
  • Type: java.io.File[]
  • Required: Yes
  • User Property: vault.jcrRootSourceDirectory
  • Default: ${project.basedir}/jcr_root,${project.basedir}/src/main/jcr_root,${project.basedir}/src/main/content/jcr_root,${project.basedir}/src/content/jcr_root,${project.build.outputDirectory}

<metaInfDirectory>

The directory that contains additional files and folders to end up in the package's META-INF folder. Every file and subfolder is considered except for the subfolder named vault and a file named MANIFEST.MF.
  • Type: java.io.File
  • Required: No
  • User Property: vault.metaInfDirectory

<metaInfVaultDirectory>

The directory that contains the META-INF/vault. Multiple directories can be specified as a comma separated list, which will act as a search path and cause the plugin to look for the first existing directory.

This directory is added as fileset to the package archiver before the the workDirectory. This means that files specified in this directory have precedence over the one present in the workDirectory. For example, if this directory contains a properties.xml it will not be overwritten by the generated one. A special case is the filter.xml which will be merged with inline filters if present.

  • Type: java.io.File[]
  • Required: Yes
  • User Property: vault.metaInfVaultDirectory
  • Default: ${project.basedir}/META-INF/vault,${project.basedir}/src/main/META-INF/vault,${project.basedir}/src/main/content/META-INF/vault,${project.basedir}/src/content/META-INF/vault

<nonFilteredFileExtensions>

Additional list of file extensions that should not be filtered, e.g. binaries. Already predefined as extensions which should never be filtered are: jpg, jpeg, gif, bmp, png, ico. Instead of using this deny list approach for binary files and others which should not be filtered, consider using an allow list via filteredFilePatterns instead.

<outputDirectory>

Directory in which the built content package will be output.
  • Type: java.io.File
  • Required: Yes
  • User Property: vault.outputDirectory
  • Default: ${project.build.directory}

<outputTimestamp>

Timestamp for reproducible output archive entries, either formatted as ISO 8601 yyyy-MM-dd'T'HH:mm:ssXXX or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).
  • Type: java.lang.String
  • Since: 1.1.0
  • Required: No
  • Default: ${project.build.outputTimestamp}

<prefix>

Adds a path prefix to all resources. Useful for shallower source trees. This does not apply to files in workDirectory nor metaInfVaultDirectory but e.g. is relevant for the default filter and for the jcr_root of the package. Must start with "/" if not empty. As separator only forward slashes are allowed. The trailing slash is automatically appended if not there.

<resourceEncoding>

The character encoding scheme to be applied when filtering resources.
  • Type: java.lang.String
  • Since: 1.1.0
  • Required: No
  • User Property: vault.resourceEncoding
  • Default: ${project.build.sourceEncoding}

<supportMultiLineFiltering>

Stop searching endToken at the end of line when filtering is applied.
  • Type: boolean
  • Since: 1.1.0
  • Required: No
  • User Property: vault.supportMultiLineFiltering
  • Default: false

<useDefaultDelimiters>

Use default delimiters in addition to custom delimiters, if any.
  • Type: boolean
  • Since: 1.1.0
  • Required: No
  • User Property: vault.useDefaultDelimiters
  • Default: true

<workDirectory>

The output directory for goal "generate-metadata" and additional input directory containing the metadata to be packaged up into the content package for goal "package". The directory name is suffixed with -<classifier> in case a classifier is used. In case of the "package" goal this falls back to the non-suffixed directory name in case the one with suffix does not exist.
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}/vault-work