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
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract org.apache.maven.shared.jarsigner.JarSignerRequest
createRequest
(File archive) Creates the jar signer request to be executed.protected String
final void
execute()
protected abstract void
executeJarSigner
(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 String
getCommandlineInfo
(org.apache.maven.shared.utils.cli.Commandline commandLine) Gets a string representation of aCommandline
.protected void
preProcessArchive
(File archive) Pre-processes a given archive.protected final void
processArchive
(File archive) Processes a given archive.protected void
processArchives
(List<File> archives) Process (sign/verify) a list of archives.protected void
Validate 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
- ifarchive
isnull
org.apache.maven.plugin.MojoExecutionException
- if processingarchive
fails
-
decrypt
- Throws:
org.apache.maven.plugin.MojoExecutionException
-