filevault-package:validate-files
Full name:
org.apache.jackrabbit:filevault-package-maven-plugin:1.4.0-SNAPSHOT:validate-files
Description:
Validates individual files with all registered validators. This is only active for incremental builds (i.e. inside m2e) or when mojo "validate-package" is not executed in the current Maven execution.
This goal is executed/bound by default for Maven modules of type content-package
.
See also: Validators
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.
- Since version:
1.1.0
. - Binds by default to the lifecycle phase:
process-test-sources
.
Required Parameters
Name | Type | Since | Description |
---|---|---|---|
<excludes> |
String[] |
- |
The file name patterns to exclude in addition to the ones listed in org.codehaus.plexus.util.AbstractScanner.DEFAULTEXCLUDES . 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 |
<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: ${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 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 |
<skipValidation> |
boolean |
- |
Skips validation. Default: false User Property: vault.skipValidation |
<workDirectory> |
File |
- |
The directory containing the metadata to be packaged up into the content package. Basically containing all files/folders being generated by goal generate-metadata .Default: ${project.build.directory}/vault-work |
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<addDefaultExcludes> |
boolean |
1.3.4 |
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 |
<builtContentDirectory> |
File |
- |
Deprecated. No reason given The directory containing the content to be packaged up into the content package. This property is deprecated; use jcrRootSourceDirectory instead. |
<classifier> |
String |
- |
If given validates files built for the given classifier. This modifies the workDirectory and appends the suffix -<classifier> to it.User Property: vault.classifier |
<csvReportFile> |
File |
- |
The file where to write a report of all found validation violations (warnings and errors) in CSV format as defined in RFC 4180. The generated file is using UTF-8 character encoding. No CSV report is written if this parameter is not set (default). User Property: vault.validation.csvReportFile |
<dependencies> |
Collection<MavenBasedPackageDependency> |
- |
Defines the list of dependencies. A dependency is declared as a <dependency> element of a list style <dependencies> element:
<dependency> <group>theGroup</group> <name>theName</name> <version>1.5</version> </dependency> The dependency can also reference a maven project dependency, this is preferred as it yields to more robust builds. <dependency> <groupId>theGroup</groupId> <artifactId>theName</artifactId> </dependency> The User Property: vault.dependencies |
<failOnDependencyErrors> |
boolean |
- |
Deprecated. Use validatorsSettings with the following values instead
<jackrabbit-dependencies> <defaultSeverity>debug</defaultSeverity> </jackrabbit-dependencies> Controls if errors during dependency validation should fail the build. Default: true User Property: vault.failOnDependencyErrors |
<failOnValidationWarnings> |
boolean |
- |
If set to true will lead to all validation errors or warnings failing the build, otherwise only validation errors lead to a build failureDefault: false User Property: vault.failOnValidationWarning |
<mapPackageDependencyToMavenGa> |
Collection<String> |
- |
Mapping of package dependencies given via group and name to Maven coordinates for enhanced validation. Each entry must have the format <group>:<name>=<groupId>:<artifactId>[:<extension>[:<classifier>]] . The extension is always implicitly assumed to be zip (no matter what is given). The version always determined from the package dependency and must not be given. To disable lookup (e.g. because referenced artifact is not available in a Maven repository) use <group>:<name>=ignore . This will also prevent the WARNING which would be otherwise be emitted.User Property: vault.package.dependency.to.maven.ga |
<repositoryStructurePackages> |
Collection<MavenBasedPackageDependency> |
- |
Defines the packages that define the repository structure. They are sharing the same format as the elements used in dependencies .
The repoinit feature of Sling can define initial content that will be available in the repository before the first package is installed. Packages that depend on those nodes have no way to reference a regular dependency package that provides these nodes. A "real" package that would creates those nodes cannot be installed in the repository, because it would void the repoinit structure. On the other hand FileVault would complain, if the package was listed as dependency but not installed in the repository. Therefore these repository-structure packages serve as build-time only dependency that help satisfy the structural dependencies, but are not added as real (i.e. run-time) dependencies to the package. Repository-structure packages are only evaluated for their contained filter rules' root attributes. Currently these packages are only used to define the User Property: vault.repository.structure.packages |
<validatorsSettings> |
Map<String,ValidatorSettings> |
- |
All validator settings in a map. The keys are the validator ids (optionally suffixed by __ and some arbitrary string). Each key must only appear once. Use the suffix if you have validator settings for the same id with different restrictions. The values are a complex object of type org.apache.jackrabbit.filevault.maven.packaging.ValidatorSettings . An example configuration looks like
<jackrabbit-filter> <options> <severityForUncoveredAncestorNodes>error</severityForUncoveredAncestorNodes> </options> </jackrabbit-filter>Each validator settings consists of the fields isDisabled , defaultSeverity and options . In addition the settings may be restricted to certain packages only with the help of field packageRestriction .
<jackrabbit-filter__restricted1> <options> <severityForUncoveredAncestorNodes>warning</severityForUncoveredAncestorNodes> </options> <packageRestriction> <group>somegroup</group> <!-- optional, if set the enclosing settings apply only to packages with the given group --> <name>somename</name> <!-- optional, if set the enclosing settings apply only to packages with the given name --> <subPackageOnly>true</subPackageOnly> <!-- if set to true, the enclosing settings apply only to subpackages otherwise to all kinds of packages --> <packageRestriction> </jackrabbit-filter__restricted1>As potentially multiple map entries may affect the same validator id (due to different suffixes) the settings for a single validator id are merged in the order from more specific to more generic settings:
|
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.3.4
- Required:
No
- Default:
true
<builtContentDirectory>
No reason given
jcrRootSourceDirectory
instead.- Type:
java.io.File
- Required:
No
<classifier>
workDirectory
and appends the suffix -<classifier>
to it.- Type:
java.lang.String
- Required:
No
- User Property:
vault.classifier
<csvReportFile>
- Type:
java.io.File
- Required:
No
- User Property:
vault.validation.csvReportFile
<dependencies>
<dependency>
element of a list style <dependencies>
element:
<dependency> <group>theGroup</group> <name>theName</name> <version>1.5</version> </dependency>
The dependency can also reference a maven project dependency, this is preferred as it yields to more robust builds.
<dependency> <groupId>theGroup</groupId> <artifactId>theName</artifactId> </dependency>
The versionRange
may be indicated as a single version, in which case the version range has no upper bound and defines the minimal version accepted. Otherwise, the version range defines a lower and upper bound of accepted versions, where the bounds are either included using parentheses ()
or excluded using brackets []
- Type:
java.util.Collection<org.apache.jackrabbit.filevault.maven.packaging.MavenBasedPackageDependency>
- Required:
No
- User Property:
vault.dependencies
<excludes>
org.codehaus.plexus.util.AbstractScanner.DEFAULTEXCLUDES
. 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.lang.String[]
- Required:
Yes
- User Property:
vault.excludes
- Default:
**/.vlt,**/.vltignore,**/.gitignore,**/.gitattributes
<failOnDependencyErrors>
Use
validatorsSettings
with the following values instead
<jackrabbit-dependencies> <defaultSeverity>debug</defaultSeverity> </jackrabbit-dependencies>
- Type:
boolean
- Required:
No
- User Property:
vault.failOnDependencyErrors
- Default:
true
<failOnValidationWarnings>
true
will lead to all validation errors or warnings failing the build, otherwise only validation errors lead to a build failure- Type:
boolean
- Required:
No
- User Property:
vault.failOnValidationWarning
- Default:
false
<jcrRootSourceDirectory>
- 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}
<mapPackageDependencyToMavenGa>
<group>:<name>=<groupId>:<artifactId>[:<extension>[:<classifier>]]
. The extension is always implicitly assumed to be zip
(no matter what is given). The version always determined from the package dependency and must not be given. To disable lookup (e.g. because referenced artifact is not available in a Maven repository) use <group>:<name>=ignore
. This will also prevent the WARNING which would be otherwise be emitted.- Type:
java.util.Collection<java.lang.String>
- Required:
No
- User Property:
vault.package.dependency.to.maven.ga
<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.
- 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
<repositoryStructurePackages>
dependencies
.
The repoinit feature of Sling can define initial content that will be available in the repository before the first package is installed. Packages that depend on those nodes have no way to reference a regular dependency package that provides these nodes. A "real" package that would creates those nodes cannot be installed in the repository, because it would void the repoinit structure. On the other hand FileVault would complain, if the package was listed as dependency but not installed in the repository. Therefore these repository-structure packages serve as build-time only dependency that help satisfy the structural dependencies, but are not added as real (i.e. run-time) dependencies to the package. Repository-structure packages are only evaluated for their contained filter rules' root attributes. Currently these packages are only used to define the validRoots
of the validator jackrabbit-filter
.
- Type:
java.util.Collection<org.apache.jackrabbit.filevault.maven.packaging.MavenBasedPackageDependency>
- Required:
No
- User Property:
vault.repository.structure.packages
<skipValidation>
- Type:
boolean
- Required:
Yes
- User Property:
vault.skipValidation
- Default:
false
<validatorsSettings>
__
and some arbitrary string). Each key must only appear once. Use the suffix if you have validator settings for the same id with different restrictions. The values are a complex object of type org.apache.jackrabbit.filevault.maven.packaging.ValidatorSettings
. An example configuration looks like
<jackrabbit-filter> <options> <severityForUncoveredAncestorNodes>error</severityForUncoveredAncestorNodes> </options> </jackrabbit-filter>Each validator settings consists of the fields
isDisabled
, defaultSeverity
and options
. In addition the settings may be restricted to certain packages only with the help of field packageRestriction
.
<jackrabbit-filter__restricted1> <options> <severityForUncoveredAncestorNodes>warning</severityForUncoveredAncestorNodes> </options> <packageRestriction> <group>somegroup</group> <!-- optional, if set the enclosing settings apply only to packages with the given group --> <name>somename</name> <!-- optional, if set the enclosing settings apply only to packages with the given name --> <subPackageOnly>true</subPackageOnly> <!-- if set to true, the enclosing settings apply only to subpackages otherwise to all kinds of packages --> <packageRestriction> </jackrabbit-filter__restricted1>As potentially multiple map entries may affect the same validator id (due to different suffixes) the settings for a single validator id are merged in the order from more specific to more generic settings:
- settings for a specific package group and a specific package name
- settings for any package group and a specific package name
- settings for a specific package group and any package name
- settings without restrictions
- Type:
java.util.Map<java.lang.String, org.apache.jackrabbit.filevault.maven.packaging.ValidatorSettings>
- Required:
No
<workDirectory>
generate-metadata
.- Type:
java.io.File
- Required:
Yes
- Default:
${project.build.directory}/vault-work