Class AbstractMetadataPackageMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    AbstractSourceAndMetadataPackageMojo, GenerateMetadataMojo

    public abstract class AbstractMetadataPackageMojo
    extends org.apache.maven.plugin.AbstractMojo
    Common ancestor of all mojos dealing with package metadata.
    • Field Detail

      • project

        @Parameter(property="project",
                   readonly=true,
                   required=true)
        protected org.apache.maven.project.MavenProject project
        The Maven project.
      • classifier

        @Parameter(property="vault.classifier")
        protected String 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.
        Since:
        1.1.4
      • outputTimestamp

        @Parameter(defaultValue="${project.build.outputTimestamp}")
        protected String 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).
        Since:
        1.1.0
    • Constructor Detail

      • AbstractMetadataPackageMojo

        public AbstractMetadataPackageMojo()
    • Method Detail

      • getProjectRelativeFilePath

        protected String getProjectRelativeFilePath​(File file)
      • getRelativePath

        protected static String getRelativePath​(Path base,
                                                Path file)
      • getFirstExistingDirectory

        protected static File getFirstExistingDirectory​(File[] directories)
      • setPrefix

        public void setPrefix​(String prefix)
      • getMetaInfVaultSourceDirectory

        protected File getMetaInfVaultSourceDirectory()
        Returns:
        the first matching directory from the list given in metaInfVaultDirectory
      • getMetaInfVaultSourceDirectory

        protected static File getMetaInfVaultSourceDirectory​(File[] metaInfVaultDirectory,
                                                             org.apache.maven.plugin.logging.Log log)
      • resolveArtifact

        protected static File resolveArtifact​(org.eclipse.aether.artifact.Artifact artifact,
                                              org.eclipse.aether.RepositorySystem repoSystem,
                                              org.eclipse.aether.RepositorySystemSession repoSession,
                                              List<org.eclipse.aether.repository.RemoteRepository> repositories)
                                       throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException