Fork me on GitHub

filevault-package:validate-files

Full name:

org.apache.jackrabbit:filevault-package-maven-plugin:1.1.8: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.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • Binds by default to the lifecycle phase: process-classes.

Required Parameters

Name Type Since Description
<excludes> String[] - The file name patterns to exclude in addition to the ones listed in AbstractScanner.DEFAULTEXCLUDES. The format of each pattern is described in 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.
User property is: vault.excludes.
<failOnDependencyErrors> boolean - Deprecated. Use validatorsSettings with the following values instead
  <jackrabbit-dependencies>
      <defaultSeverity>debug</defaultSeverity>
  </jackrabbit-dependencies>

Default value is: true.
User property is: vault.failOnDependencyErrors.
<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.
<skipValidation> boolean - (no description)
Default value is: false.
User property is: 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 value is: ${project.build.directory}/vault-work.

Optional Parameters

Name Type Since Description
<builtContentDirectory> File - The directory containing the content to be packaged up into the content package. This property is deprecated; use jcrRootSourceDirectory instead.
<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 is: vault.validation.csvReportFile.
<dependencies> Collection - 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 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 []


User property is: vault.dependencies.
<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 failure
Default value is: false.
User property is: vault.failOnValidationWarning.
<mapPackageDependencyToMavenGa> Collection - Mapping of package dependencies given via group and name to Maven identifiers for enhanced validation. Each entry must have the format <group>:<name>=<groupId>:<artifactId>. 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 is: vault.package.dependency.to.maven.ga.
<repositoryStructurePackages> Collection - Defines the packages that define the repository structure. For the format description look at dependencies.

The repository-init feature of sling-start 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 any 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 repository init structure. On the other hand would filevault complain, if the package was listed as dependency but not installed in the repository. So therefore this repository-structure packages serve as indicator packages that helps satisfy the structural dependencies, but are not added as real dependencies to the package.


User property is: vault.repository.structure.packages.
<validatorsSettings> Map - All validator settings in a map. The keys are the validator ids (optionally suffixed by :<package group>:<package name> to be restricted to certain packages). You can use * as wildcard value for package group. Alternatively you can use the suffix :subpackages to influence the settings for all sub packages only! The values are a complex object of type ValdidatorSettings. An example configuration looks like
 <jackrabbit-filter>
     <options>
         <severityForUncoveredAncestorNodes>error</severityForUncoveredAncestorNodes>
     </options>
 </jackrabbit-filter>

Parameter Details

<builtContentDirectory>

The directory containing the content to be packaged up into the content package. This property is deprecated; use jcrRootSourceDirectory instead.
  • Type: java.io.File
  • Required: No

<csvReportFile>

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).
  • Type: java.io.File
  • Required: No
  • User Property: vault.validation.csvReportFile

<dependencies>

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 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
  • Required: No
  • User Property: vault.dependencies

<excludes>

The file name patterns to exclude in addition to the ones listed in AbstractScanner.DEFAULTEXCLUDES. The format of each pattern is described in 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

<failOnDependencyErrors>

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.
  • Type: boolean
  • Required: Yes
  • User Property: vault.failOnDependencyErrors
  • Default: true

<failOnValidationWarnings>

If set to 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>

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}

<mapPackageDependencyToMavenGa>

Mapping of package dependencies given via group and name to Maven identifiers for enhanced validation. Each entry must have the format <group>:<name>=<groupId>:<artifactId>. 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
  • Required: No
  • User Property: vault.package.dependency.to.maven.ga

<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

<repositoryStructurePackages>

Defines the packages that define the repository structure. For the format description look at dependencies.

The repository-init feature of sling-start 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 any 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 repository init structure. On the other hand would filevault complain, if the package was listed as dependency but not installed in the repository. So therefore this repository-structure packages serve as indicator packages that helps satisfy the structural dependencies, but are not added as real dependencies to the package.

  • Type: java.util.Collection
  • Required: No
  • User Property: vault.repository.structure.packages

<skipValidation>

(no description)
  • Type: boolean
  • Required: Yes
  • User Property: vault.skipValidation
  • Default: false

<validatorsSettings>

All validator settings in a map. The keys are the validator ids (optionally suffixed by :<package group>:<package name> to be restricted to certain packages). You can use * as wildcard value for package group. Alternatively you can use the suffix :subpackages to influence the settings for all sub packages only! The values are a complex object of type ValdidatorSettings. An example configuration looks like
 <jackrabbit-filter>
     <options>
         <severityForUncoveredAncestorNodes>error</severityForUncoveredAncestorNodes>
     </options>
 </jackrabbit-filter>
  • Type: java.util.Map
  • Required: No

<workDirectory>

The directory containing the metadata to be packaged up into the content package. Basically containing all files/folders being generated by goal "generate-metadata".
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}/vault-work