org.apache.maven.plugins.jarsigner
Class AbstractJarsignerMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by 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.

Version:
$Id: AbstractJarsignerMojo.java 817065 2009-09-20 17:51:11Z bentmann $
Author:
Christian Schulte

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractJarsignerMojo()
           
 
Method Summary
 void execute()
           
protected abstract  org.codehaus.plexus.util.cli.Commandline getCommandline(File archive, org.codehaus.plexus.util.cli.Commandline commandLine)
          Gets the Commandline to execute for a given Java archive taking a command line prepared for executing jarsigner.
protected  String getCommandlineInfo(org.codehaus.plexus.util.cli.Commandline commandLine)
          Gets a string representation of a Commandline.
protected  void preProcessArchive(File archive)
          Pre-processes a given archive.
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractJarsignerMojo

public AbstractJarsignerMojo()
Method Detail

execute

public final void execute()
                   throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

getCommandline

protected abstract org.codehaus.plexus.util.cli.Commandline getCommandline(File archive,
                                                                           org.codehaus.plexus.util.cli.Commandline commandLine)
Gets the Commandline to execute for a given Java archive taking a command line prepared for executing jarsigner.

Parameters:
archive - The Java archive to get a Commandline to execute for.
commandLine - A Commandline prepared for executing jarsigner without any arguments.
Returns:
A Commandline for executing jarsigner with archive.
Throws:
NullPointerException - if archive or commandLine is null.

getCommandlineInfo

protected String getCommandlineInfo(org.codehaus.plexus.util.cli.Commandline commandLine)
Gets a string representation of a Commandline.

This method creates the string representation by calling commandLine.toString() by default.

Parameters:
commandLine - The Commandline to get a string representation of.
Returns:
The string representation of commandLine.
Throws:
NullPointerException - if commandLine is null.

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 be null.
Throws:
org.apache.maven.plugin.MojoExecutionException - If pre-processing failed.


Copyright © 2002-2009 The Apache Software Foundation. All Rights Reserved.