Class 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 like META-INF/MANIFEST.MF as well as the files ending up in META-INF/vault like filter.xml, properties.xml, config.xml and settings.xml. Those files will be written to the directory given via parameter AbstractMetadataPackageMojo.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 goal package.

    This goal is executed/bound by default for Maven modules of type content-package.

    Since:
    1.0.3
    • 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.
    • Constructor Detail

      • GenerateMetadataMojo

        public GenerateMetadataMojo()
    • 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