org.codehaus.mojo.webstart
Interface JarSignerMojo


public interface JarSignerMojo

Provides an abstraction for all Mojos that are capable of signing jar files. Most use cases will involve signing jars with the keytool provided with the java development kit. However, a particular enterprise may require a different method of signing jars. In a corporate environment, PCs typically have a company certificate installed so that applications like Java Webstart know that when code is signed by the company certificate it can be trusted. Companies don't want to expose this certificate's private key to individual developers. Instead, the company needs to keep the key secret and provide a customised way of developers submitting jar files to be signed. This interface allows enterprise users to develop a Mojo which doesn't use the java keytool to sign jars. For example, the Maven Webstart plugin signs jars as part of its operation. Using this interface, the Webstart plugin is able to use pluggable jar signers (although it will use JarSignMojo as a default) so that the user can plug in a custom Mojo to sign their jars.


Method Summary
 void execute()
          Executes the jar signing process.
 void setJarPath(File jarPath)
          Sets the location of the unsigned jar file.
 void setSignedJar(File signedJar)
          Sets the output filename for the signed jar.
 

Method Detail

setJarPath

void setJarPath(File jarPath)
Sets the location of the unsigned jar file.

Parameters:
jarPath -

setSignedJar

void setSignedJar(File signedJar)
Sets the output filename for the signed jar. This may be the same location as specified in setJarPath(). If this is the case, the unsigned jar file will be overwritten with the signed jar file.

Parameters:
signedJar -

execute

void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Executes the jar signing process. Same throws declaration as AbstractMojo.execute()

Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException


Copyright © 2007-2011 Codehaus. All Rights Reserved.