Class GenerateMetadataMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.jackrabbit.filevault.maven.packaging.mojo.AbstractMetadataPackageMojo
-
- org.apache.jackrabbit.filevault.maven.packaging.mojo.GenerateMetadataMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="generate-metadata", defaultPhase=GENERATE_TEST_SOURCES, requiresDependencyResolution=COMPILE, threadSafe=true) public class GenerateMetadataMojo extends AbstractMetadataPackageMojo
Generates the metadata ending up in the content package likeMETA-INF/MANIFEST.MF
as well as the files ending up inMETA-INF/vault
likefilter.xml
,properties.xml
,config.xml
andsettings.xml
. Those files will be written to the directory given via parameterAbstractMetadataPackageMojo.workDirectory
. In addition performs some validations. Also configures artifacts (like OSGi bundles or subpackages) to be embedded in the content package as those may affect metadata as well. The generated metadata is usually packaged in a content package in a subsequent goalpackage
.This goal is executed/bound by default for Maven modules of type
content-package
.- Since:
- 1.0.3
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.jackrabbit.vault.packaging.PackageType
packageType
Defines the content package type.-
Fields inherited from class org.apache.jackrabbit.filevault.maven.packaging.mojo.AbstractMetadataPackageMojo
classifier, outputTimestamp, project
-
-
Constructor Summary
Constructors Constructor Description GenerateMetadataMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
void
setAccessControlHandling(String type)
Sets the access control handling.void
setPackageType(String type)
Sets the package type.-
Methods inherited from class org.apache.jackrabbit.filevault.maven.packaging.mojo.AbstractMetadataPackageMojo
getFirstExistingDirectory, getMetaInfVaultSourceDirectory, getMetaInfVaultSourceDirectory, getProjectRelativeFilePath, getRelativePath, resolveArtifact, setPrefix
-
-
-
-
Field Detail
-
packageType
@Parameter(property="vault.packageType") protected org.apache.jackrabbit.vault.packaging.PackageType packageType
Defines the content package type. This is either 'application', 'content', 'container' or 'mixed'. If omitted, it is calculated automatically based on filter definitions. Certain package types imply restrictions, for example, 'application' and 'content' packages are not allowed to contain sub packages or embedded bundles.
Possible values:application
: An application package consists purely of application content. It serializes entire subtrees with no inclusion or exclusion filters. it does not contain any subpackages nor OSGi configuration or bundles.content
: A content package consists only of content and user defined configuration. It usually serializes entire subtrees but can contain inclusion or exclusion filters. it does not contain any subpackages nor OSGi configuration or bundles.container
: A container package only contains sub packages and OSGi configuration and bundles. The container package is only used as container for deployment.mixed
: Catch all type for a combination of the above.
-
-
Method Detail
-
setPackageType
public void setPackageType(String type) throws org.apache.maven.plugin.MojoFailureException
Sets the package type.- Parameters:
type
- the string representation of the package type- Throws:
org.apache.maven.plugin.MojoFailureException
- if an error occurs
-
setAccessControlHandling
public void setAccessControlHandling(String type) throws org.apache.maven.plugin.MojoFailureException
Sets the access control handling.- Parameters:
type
- the string representation of the ac handling- Throws:
org.apache.maven.plugin.MojoFailureException
- if an error occurs
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
-