Class GpgSignAttachedMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="sign",
          defaultPhase=VERIFY,
          threadSafe=true)
    public class GpgSignAttachedMojo
    extends AbstractGpgMojo
    Sign project artifact, the POM, and attached artifacts with GnuPG for deployment.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.File ascDirectory
      The directory where to store signature files.
      private static java.lang.String[] DEFAULT_EXCLUDES  
      private java.lang.String[] excludes
      A list of files to exclude from being signed.
      protected org.apache.maven.project.MavenProject project
      The maven project.
      private org.apache.maven.project.MavenProjectHelper projectHelper
      Maven ProjectHelper
      private boolean skip
      Skip doing the gpg signing.
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()  
      protected boolean isExcluded​(java.lang.String name)
      Tests whether or not a name matches against at least one exclude pattern.
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_EXCLUDES

        private static final java.lang.String[] DEFAULT_EXCLUDES
      • skip

        @Parameter(property="gpg.skip",
                   defaultValue="false")
        private boolean skip
        Skip doing the gpg signing.
      • excludes

        @Parameter
        private java.lang.String[] excludes
        A list of files to exclude from being signed. Can contain Ant-style wildcards and double wildcards. The default excludes are **/*.md5 **/*.sha1 **/*.asc.
        Since:
        1.0-alpha-4
      • ascDirectory

        @Parameter(defaultValue="${project.build.directory}/gpg",
                   alias="outputDirectory")
        private java.io.File ascDirectory
        The directory where to store signature files.
        Since:
        1.0-alpha-4
      • project

        @Parameter(defaultValue="${project}",
                   readonly=true,
                   required=true)
        protected org.apache.maven.project.MavenProject project
        The maven project.
      • projectHelper

        @Component
        private org.apache.maven.project.MavenProjectHelper projectHelper
        Maven ProjectHelper
    • Constructor Detail

      • GpgSignAttachedMojo

        public GpgSignAttachedMojo()
    • Method Detail

      • 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
      • isExcluded

        protected boolean isExcluded​(java.lang.String name)
        Tests whether or not a name matches against at least one exclude pattern.
        Parameters:
        name - The name to match. Must not be null.
        Returns:
        true when the name matches against at least one exclude pattern, or false otherwise.