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 Summary
FieldsModifier and TypeFieldDescriptionprivate FileLocation of the extra certchain file.private StringSee options.private booleanIndicates whether existing signatures should be removed from the processed JAR files prior to signing them.private StringSee options.private StringSee options.private StringSee options.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.maven.shared.jarsigner.JarSignerRequestcreateRequest(File archive) Creates the jar signer request to be executed.protected StringgetCommandlineInfo(org.apache.maven.shared.utils.cli.Commandline commandLine) Gets a string representation of aCommandline.protected voidpreProcessArchive(File archive) Pre-processes a given archive.Methods inherited from class AbstractJarsignerMojo
decrypt, execute, getMessage, getStorepass, getStoretypeMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
keypass
-
sigfile
-
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
-
tsacert
-
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
-
preProcessArchive
protected void preProcessArchive(File archive) throws org.apache.maven.plugin.MojoExecutionException Description 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(File archive) throws org.apache.maven.plugin.MojoExecutionException Creates 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