Fork me on GitHub

filevault-package:generate-cnd

Full name:

org.apache.jackrabbit:filevault-package-maven-plugin:1.4.0-SNAPSHOT:generate-cnd

Description:

Generates a CND file containing all used node types and namespaces. It uses the default namespaces and node types and in addition some provided ones as source node type and namespace registry. From those only the ones being really leveraged in the package end up in the generated CND. The generated CND will end up in the package metadata and all contained namespaces and node types are automatically registered during installation (in case they are not yet registered).

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.3.0.
  • Binds by default to the lifecycle phase: generate-sources.

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: **/.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.

This directory must be outside the workDirectory.


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 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.


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
<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 generate-metadata goal.


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.
  • 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: true
<additionalInputCndUrls> List<String> - List of URLs pointing to a CND which define the additional namespaces and node types potentially used in this package apart from the default ones defined in JCR 2.0. If a URI is pointing to a JAR it will leverage all the node types being mentioned in the Sling-Nodetypes manifest header. Apart from the standard protocols the scheme tccl can be used to reference names from the Thread's context class loader. In the Maven plugin context this is the plugin classloader.
User Property: vault.inputCndUrls
<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
<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

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

<additionalInputCndUrls>

List of URLs pointing to a CND which define the additional namespaces and node types potentially used in this package apart from the default ones defined in JCR 2.0. If a URI is pointing to a JAR it will leverage all the node types being mentioned in the Sling-Nodetypes manifest header. Apart from the standard protocols the scheme tccl can be used to reference names from the Thread's context class loader. In the Maven plugin context this is the plugin classloader.

<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

<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.


<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.

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}

<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.

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

<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.

<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.

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