Class AbstractJarsignerMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.jarsigner.AbstractJarsignerMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
JarsignerSignMojo,JarsignerVerifyMojo
public abstract class AbstractJarsignerMojo
extends org.apache.maven.plugin.AbstractMojo
Maven Jarsigner Plugin base class.
- Author:
- Christian Schulte
-
Field Summary
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract org.apache.maven.shared.jarsigner.JarSignerRequestcreateRequest(File archive) Creates the jar signer request to be executed.protected Stringfinal voidexecute()protected abstract 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 final voidprocessArchive(File archive) 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.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
AbstractJarsignerMojo
public AbstractJarsignerMojo()
-
-
Method Details
-
execute
public final void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
createRequest
protected abstract org.apache.maven.shared.jarsigner.JarSignerRequest createRequest(File archive) throws org.apache.maven.plugin.MojoExecutionException Creates the jar signer request to be executed.- Parameters:
archive- the archive file to treat by jarsigner- Returns:
- the request
- Throws:
org.apache.maven.plugin.MojoExecutionException- if an exception occurs- Since:
- 1.3
-
getStoretype
-
getStorepass
-
preProcessArchive
protected void preProcessArchive(File archive) throws org.apache.maven.plugin.MojoExecutionException Pre-processes a given archive.- 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.MojoExecutionExceptionValidate the user supplied configuration/parameters.- Throws:
org.apache.maven.plugin.MojoExecutionException- if the user supplied configuration make further execution impossible
-
processArchives
protected void processArchives(List<File> archives) throws org.apache.maven.plugin.MojoExecutionException Process (sign/verify) a list of archives.- Parameters:
archives- list of jar files to process- Throws:
org.apache.maven.plugin.MojoExecutionException- if an error occurs during the processing of archives
-
processArchive
protected final void processArchive(File archive) throws org.apache.maven.plugin.MojoExecutionException Processes a given archive.- Parameters:
archive- The archive to process.- Throws:
NullPointerException- ifarchiveisnullorg.apache.maven.plugin.MojoExecutionException- if processingarchivefails
-
decrypt
- Throws:
org.apache.maven.plugin.MojoExecutionException
-