Class JarsignerVerifyMojo

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

    @Mojo(name="verify",
          defaultPhase=VERIFY)
    public class JarsignerVerifyMojo
    extends AbstractJarsignerMojo
    Checks the signatures of a project artifact and attachments using jarsigner.
    Since:
    1.0
    Version:
    $Id$
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean certs
      See options.
      private boolean errorWhenNotSigned
      When true this will make the execute() operation fail, throwing an exception, when verifying a non signed jar.
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Field Detail

      • certs

        @Parameter(property="jarsigner.certs",
                   defaultValue="false")
        private boolean certs
        See options.
      • errorWhenNotSigned

        @Parameter(property="jarsigner.errorWhenNotSigned",
                   defaultValue="false")
        private boolean errorWhenNotSigned
        When true this will make the execute() operation fail, throwing an exception, when verifying a non signed jar. Primarily to keep backwards compatibility with existing code, and allow reusing the bean in unattended operations when set to false.
        Since:
        1.3
    • Constructor Detail

      • JarsignerVerifyMojo

        public JarsignerVerifyMojo()
    • Method Detail

      • createRequest

        protected org.apache.maven.shared.jarsigner.JarSignerRequest createRequest​(java.io.File archive)
        Creates the jar signer request to be executed.
        Specified by:
        createRequest in class AbstractJarsignerMojo
        Parameters:
        archive - the archive file to treat by jarsigner
        Returns:
        the request
      • preProcessArchive

        protected void preProcessArchive​(java.io.File archive)
                                  throws org.apache.maven.plugin.MojoExecutionException
        Description copied from class: AbstractJarsignerMojo
        Pre-processes a given archive.
        Overrides:
        preProcessArchive in class AbstractJarsignerMojo
        Parameters:
        archive - The archive to process, must not be null.
        Throws:
        org.apache.maven.plugin.MojoExecutionException - If pre-processing failed.