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
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.maven.shared.jarsigner.JarSignerRequest
createRequest
(File archive) Creates the jar signer request to be executed.protected 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 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.plugins.jarsigner.AbstractJarsignerMojo
decrypt, execute, getStorepass, getStoretype, processArchive
Methods 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:AbstractJarsignerMojo
Pre-processes a given archive.- Overrides:
preProcessArchive
in 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:AbstractJarsignerMojo
Validate the user supplied configuration/parameters.- Overrides:
validateParameters
in 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:
createRequest
in 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:
processArchives
in classAbstractJarsignerMojo
- Parameters:
archives
- list of jar files to process- Throws:
org.apache.maven.plugin.MojoExecutionException
- if an error occurs during the processing of archives