Fork me on GitHub

filevault-package:validate-package

Full name:

org.apache.jackrabbit:filevault-package-maven-plugin:1.2.3-SNAPSHOT:validate-package

Description:

Validates a package (and optionally in addition all attached packages with the given classifiers) with all registered validators.

Attributes:

  • 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: verify.

Required Parameters

Name Type Since Description
<enforceRecursiveSubpackageValidation> boolean 1.1.0 If set to true always executes all validators also for all sub packages (recursively).
Default value is: false.
<failOnDependencyErrors> boolean 1.1.0 Deprecated. Use validatorsSettings with the following values instead
  <jackrabbit-dependencies>
      <defaultSeverity>debug</defaultSeverity>
  </jackrabbit-dependencies>

Default value is: true.
User property is: vault.failOnDependencyErrors.
<skipSubPackageValidation> boolean 1.1.2 If set to true will not validate any sub packages. This settings overwrites the parameter enforceRecursiveSubpackageValidation.
Default value is: false.
<skipValidation> boolean 1.1.0 (no description)
Default value is: false.
User property is: vault.skipValidation.

Optional Parameters

Name Type Since Description
<classifier> String 1.1.10 The given classifier is merged with the ones given in parameter classifiers and all matching attached artifacts are validated (potentially in addition to the one given in packageFile)
User property is: vault.classifier.
<classifiers> List 1.1.0 If given validates all attached artifacts with one of the given classifiers (potentially in addition to the one given in packageFile). This list is merged with the classifier given in parameter classifier.
<csvReportFile> File 1.1.0 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 1.1.0 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 1.1.0 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 1.1.0 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.
<packageFile> File 1.1.0 The main package file to validate. By default will be the project's main artifact (in case a project is given). If empty the main artifact will not be validated but only the attached artifacts with the given classifiers.
Default value is: ${project.artifact.file}.
User property is: vault.packageToValidate.
<repositoryStructurePackages> Collection 1.1.0 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 1.1.0 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 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. 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 keys:
  1. settings for a specific groupId and artifactId
  2. settings for any groupId (*) and a specific artifactId
  3. settings for subpackages
  4. settings without restrictions
Merging will only overwrite non-existing fields, i.e. same-named options from more specific keys will overwrite those from more generic keys (for the same validator id).

Parameter Details

<classifier>

The given classifier is merged with the ones given in parameter classifiers and all matching attached artifacts are validated (potentially in addition to the one given in packageFile)
  • Type: java.lang.String
  • Since: 1.1.10
  • Required: No
  • User Property: vault.classifier

<classifiers>

If given validates all attached artifacts with one of the given classifiers (potentially in addition to the one given in packageFile). This list is merged with the classifier given in parameter classifier.
  • Type: java.util.List
  • Since: 1.1.0
  • 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
  • Since: 1.1.0
  • 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
  • Since: 1.1.0
  • Required: No
  • User Property: vault.dependencies

<enforceRecursiveSubpackageValidation>

If set to true always executes all validators also for all sub packages (recursively).
  • Type: boolean
  • Since: 1.1.0
  • Required: Yes
  • Default: false

<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
  • Since: 1.1.0
  • 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
  • Since: 1.1.0
  • Required: No
  • User Property: vault.failOnValidationWarning
  • Default: false

<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
  • Since: 1.1.0
  • Required: No
  • User Property: vault.package.dependency.to.maven.ga

<packageFile>

The main package file to validate. By default will be the project's main artifact (in case a project is given). If empty the main artifact will not be validated but only the attached artifacts with the given classifiers.
  • Type: java.io.File
  • Since: 1.1.0
  • Required: No
  • User Property: vault.packageToValidate
  • Default: ${project.artifact.file}

<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
  • Since: 1.1.0
  • Required: No
  • User Property: vault.repository.structure.packages

<skipSubPackageValidation>

If set to true will not validate any sub packages. This settings overwrites the parameter enforceRecursiveSubpackageValidation.
  • Type: boolean
  • Since: 1.1.2
  • Required: Yes
  • Default: false

<skipValidation>

(no description)
  • Type: boolean
  • Since: 1.1.0
  • 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 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. 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 keys:
  1. settings for a specific groupId and artifactId
  2. settings for any groupId (*) and a specific artifactId
  3. settings for subpackages
  4. settings without restrictions
Merging will only overwrite non-existing fields, i.e. same-named options from more specific keys will overwrite those from more generic keys (for the same validator id).
  • Type: java.util.Map
  • Since: 1.1.0
  • Required: No