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 AbstractJarsignerMojoSigns a project artifact and attachments using jarsigner.- Since:
- 1.0
- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.FilecertchainLocation of the extra certchain file.private java.lang.StringkeypassSee options.private booleanremoveExistingSignaturesIndicates whether existing signatures should be removed from the processed JAR files prior to signing them.private java.lang.StringsigfileSee options.private java.lang.StringtsaSee options.private java.lang.StringtsacertSee options.
-
Constructor Summary
Constructors Constructor Description JarsignerSignMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.maven.shared.jarsigner.JarSignerRequestcreateRequest(java.io.File archive)Creates the jar signer request to be executed.protected java.lang.StringgetCommandlineInfo(org.apache.maven.shared.utils.cli.Commandline commandLine)Gets a string representation of aCommandline.protected voidpreProcessArchive(java.io.File archive)Pre-processes a given archive.-
Methods inherited from class org.apache.maven.plugins.jarsigner.AbstractJarsignerMojo
decrypt, execute, getMessage, getStorepass, getStoretype
-
-
-
-
Field Detail
-
keypass
@Parameter(property="jarsigner.keypass") private java.lang.String keypass
See options.
-
sigfile
@Parameter(property="jarsigner.sigfile") private java.lang.String sigfile
See options.
-
removeExistingSignatures
@Parameter(property="jarsigner.removeExistingSignatures", defaultValue="false") private boolean removeExistingSignaturesIndicates 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 java.lang.String tsa
See options.- Since:
- 1.3
-
tsacert
@Parameter(property="jarsigner.tsacert") private java.lang.String tsacert
See options.- Since:
- 1.3
-
certchain
@Parameter(property="jarsigner.certchain", readonly=true, required=false) private java.io.File certchainLocation of the extra certchain file. See Java SE 7 documentation for more info.- Since:
- 1.5
-
-
Method Detail
-
getCommandlineInfo
protected java.lang.String getCommandlineInfo(org.apache.maven.shared.utils.cli.Commandline commandLine)
Description copied from class:AbstractJarsignerMojoGets a string representation of aCommandline.This method creates the string representation by calling
commandLine.toString()by default.- Overrides:
getCommandlineInfoin classAbstractJarsignerMojo- Parameters:
commandLine- TheCommandlineto get a string representation of.- Returns:
- The string representation of
commandLine.
-
preProcessArchive
protected void preProcessArchive(java.io.File archive) throws org.apache.maven.plugin.MojoExecutionExceptionDescription copied from class:AbstractJarsignerMojoPre-processes a given archive.- Overrides:
preProcessArchivein classAbstractJarsignerMojo- Parameters:
archive- The archive to process, must not benull.- Throws:
org.apache.maven.plugin.MojoExecutionException- If pre-processing failed.
-
createRequest
protected org.apache.maven.shared.jarsigner.JarSignerRequest createRequest(java.io.File archive) throws org.apache.maven.plugin.MojoExecutionExceptionCreates the jar signer request to be executed.- Specified by:
createRequestin classAbstractJarsignerMojo- Parameters:
archive- the archive file to treat by jarsigner- Returns:
- the request
- Throws:
org.apache.maven.plugin.MojoExecutionException- if an exception occurs
-
-