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,
threadSafe=true)
public class JarsignerSignMojo
extends AbstractJarsignerMojo
Signs a project artifact and attachments using jarsigner.
- Since:
- 1.0
- Author:
- Christian Schulte
-
Field Summary
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 voidexecuteJarSigner(org.apache.maven.shared.jarsigner.JarSigner jarSigner, org.apache.maven.shared.jarsigner.JarSignerRequest request) Executes jarsigner (execute signing or verification for a jar file).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.protected voidprocessArchives(List<File> archives) Process (sign/verify) a list of archives.protected voidValidate the user supplied configuration/parameters.Methods inherited from class org.apache.maven.plugins.jarsigner.AbstractJarsignerMojo
decrypt, execute, getStorepass, getStoretype, processArchiveMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
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
-
validateParameters
protected void validateParameters() throws org.apache.maven.plugin.MojoExecutionExceptionDescription copied from class:AbstractJarsignerMojoValidate the user supplied configuration/parameters.- Overrides:
validateParametersin classAbstractJarsignerMojo- Throws:
org.apache.maven.plugin.MojoExecutionException- if the user supplied configuration make further execution impossible
-
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
-
processArchives
protected void processArchives(List<File> archives) throws org.apache.maven.plugin.MojoExecutionException Process (sign/verify) a list of archives. Processing of files may be parallelized for increased performance.- Overrides:
processArchivesin classAbstractJarsignerMojo- Parameters:
archives- list of jar files to process- Throws:
org.apache.maven.plugin.MojoExecutionException- if an error occurs during the processing of archives