Class JarsignerSignMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.jarsigner.AbstractJarsignerMojo
org.apache.maven.plugins.jarsigner.JarsignerSignMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="sign", defaultPhase=PACKAGE) public class JarsignerSignMojo extends AbstractJarsignerMojo
Signs a project artifact and attachments using jarsigner.
Since:
1.0
Version:
$Id$
  • Field Details

    • keypass

      @Parameter(property="jarsigner.keypass") private String keypass
      See options.
    • sigfile

      @Parameter(property="jarsigner.sigfile") private String sigfile
      See options.
    • removeExistingSignatures

      @Parameter(property="jarsigner.removeExistingSignatures", defaultValue="false") private boolean removeExistingSignatures
      Indicates whether existing signatures should be removed from the processed JAR files prior to signing them. If enabled, the resulting JAR will appear as being signed only once.
      Since:
      1.1
    • tsa

      @Parameter(property="jarsigner.tsa") private String tsa
      See options.
      Since:
      1.3
    • tsacert

      @Parameter(property="jarsigner.tsacert") private String tsacert
      See options.
      Since:
      1.3
    • certchain

      @Parameter(property="jarsigner.certchain", readonly=true, required=false) private File certchain
      Location of the extra certchain file. See Java SE 7 documentation for more info.
      Since:
      1.5
  • Constructor Details

    • JarsignerSignMojo

      public JarsignerSignMojo()
  • Method Details

    • getCommandlineInfo

      protected String getCommandlineInfo(org.apache.maven.shared.utils.cli.Commandline commandLine)
      Description copied from class: AbstractJarsignerMojo
      Gets a string representation of a Commandline.

      This method creates the string representation by calling commandLine.toString() by default.

      Overrides:
      getCommandlineInfo in class AbstractJarsignerMojo
      Parameters:
      commandLine - The Commandline to get a string representation of.
      Returns:
      The string representation of commandLine.
    • preProcessArchive

      protected void preProcessArchive(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.
    • createRequest

      protected org.apache.maven.shared.jarsigner.JarSignerRequest createRequest(File archive) throws org.apache.maven.plugin.MojoExecutionException
      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
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if an exception occurs