filevault-package:package
Full name:
org.apache.jackrabbit:filevault-package-maven-plugin:1.4.1-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 Default: **/.vlt,**/.vltignore,**/.gitignore,**/.gitattributes User Property: 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: true User Property: 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: true User Property: 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: ${project.build.finalName} User Property: 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.
This directory must be outside the 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} User Property: 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 This directory must be outside the 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 User Property: vault.metaInfVaultDirectory |
<outputDirectory> |
File |
- |
Directory in which the built content package will be output. Default: ${project.build.directory} User Property: 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.
This directory must not contain any other files/directories than those being generated by the Default: ${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.
See also: org.codehaus.plexus.util.AbstractScanner.DEFAULTEXCLUDES Default: 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. Use jcrRootSourceDirectory instead.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: 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: 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: false User Property: 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: false User Property: vault.enableMetaInfFiltering |
<escapeString> |
String |
1.1.0 |
Expression preceded with this String won't be interpolated. \${foo} will be replaced with ${foo} .User Property: vault.escapeString |
<escapedBackslashesInFilePath> |
boolean |
1.1.0 |
To escape interpolated values with Windows path c:\foo\bar will be replaced with c:\\foo\\bar .Default: false User Property: vault.escapedBackslashesInFilePath |
<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: vault.filters |
<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: vault.filteredFilePatterns |
<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: 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: 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: ${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: vault.prefix |
<resourceEncoding> |
String |
1.1.0 |
The character encoding scheme to be applied when filtering resources. Default: ${project.build.sourceEncoding} User Property: vault.resourceEncoding |
<supportMultiLineFiltering> |
boolean |
1.1.0 |
Stop searching endToken at the end of line when filtering is applied. Default: false User Property: vault.supportMultiLineFiltering |
<useDefaultDelimiters> |
boolean |
1.1.0 |
Use default delimiters in addition to custom delimiters, if any. Default: true User Property: vault.useDefaultDelimiters |
Parameter Details
<addDefaultExcludes>
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>
workDirectory
- Type:
org.apache.maven.archiver.MavenArchiveConfiguration
- Required:
No
<builtContentDirectory>
Use
jcrRootSourceDirectory
instead.- Type:
java.io.File
- Required:
No
<classifier>
<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).
- Type:
java.util.LinkedHashSet<java.lang.String>
- Since:
1.1.0
- Required:
No
- User Property:
vault.delimiters
<enableJcrRootFiltering>
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>
filteredFilePatterns
and nonFilteredFileExtensions
.- Type:
boolean
- Since:
1.1.0
- Required:
No
- User Property:
vault.enableMetaInfFiltering
- Default:
false
<escapeString>
\${foo}
will be replaced with ${foo}
.- Type:
java.lang.String
- Since:
1.1.0
- Required:
No
- User Property:
vault.escapeString
<escapedBackslashesInFilePath>
c:\foo\bar
will be replaced with c:\\foo\\bar
.- Type:
boolean
- Since:
1.1.0
- Required:
No
- User Property:
vault.escapedBackslashesInFilePath
- Default:
false
<excludes>
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.
- Type:
java.util.Set<java.lang.String>
- Required:
Yes
- User Property:
vault.excludes
- Default:
**/.vlt,**/.vltignore,**/.gitignore,**/.gitattributes
<failOnDuplicateEntries>
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>
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
<filterFiles>
- Type:
java.util.List<java.lang.String>
- Since:
1.1.0
- Required:
No
- User Property:
vault.filters
<filteredFilePatterns>
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.- Type:
java.util.List<java.lang.String>
- Since:
1.1.8
- Required:
No
- User Property:
vault.filteredFilePatterns
<finalName>
- Type:
java.lang.String
- Required:
Yes
- User Property:
vault.finalName
- Default:
${project.build.finalName}
<jcrRootSourceDirectory>
This directory must be outside the workDirectory
.
- 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>
vault
and a file named MANIFEST.MF
.- Type:
java.io.File
- Required:
No
- User Property:
vault.metaInfDirectory
<metaInfVaultDirectory>
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.
This directory must be outside the workDirectory
.
- 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>
filteredFilePatterns
instead.- Type:
java.util.List<java.lang.String>
- Since:
1.1.0
- Required:
No
- User Property:
vault.nonFilteredFileExtensions
<outputDirectory>
- Type:
java.io.File
- Required:
Yes
- User Property:
vault.outputDirectory
- Default:
${project.build.directory}
<outputTimestamp>
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>
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.- Type:
java.lang.String
- Required:
No
- User Property:
vault.prefix
<resourceEncoding>
- Type:
java.lang.String
- Since:
1.1.0
- Required:
No
- User Property:
vault.resourceEncoding
- Default:
${project.build.sourceEncoding}
<supportMultiLineFiltering>
- Type:
boolean
- Since:
1.1.0
- Required:
No
- User Property:
vault.supportMultiLineFiltering
- Default:
false
<useDefaultDelimiters>
- Type:
boolean
- Since:
1.1.0
- Required:
No
- User Property:
vault.useDefaultDelimiters
- Default:
true
<workDirectory>
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.
This directory must not contain any other files/directories than those being generated by the generate-metadata
goal.
- Type:
java.io.File
- Required:
Yes
- Default:
${project.build.directory}/vault-work