org.apache.maven.shared.jarsigner
Class DefaultJarSigner
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.apache.maven.shared.jarsigner.DefaultJarSigner
- All Implemented Interfaces:
- JarSigner, org.codehaus.plexus.logging.LogEnabled
public class DefaultJarSigner
- extends org.codehaus.plexus.logging.AbstractLogEnabled
- implements JarSigner
Default implementation of component JarSigner
.
- Since:
- 1.0
- Version:
- $Id: DefaultJarSigner.java 1195937 2011-11-01 11:38:37Z olamy $
- Author:
- tchemit
Field Summary |
protected java.lang.String |
jarSignerFile
The location of the jarSigner executable file. |
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
jarSignerFile
protected java.lang.String jarSignerFile
- The location of the jarSigner executable file.
DefaultJarSigner
public DefaultJarSigner()
execute
public JarSignerResult execute(JarSignerRequest request)
throws JarSignerException
- Description copied from interface:
JarSigner
- Executes JarSigner tool using the parameters specified by the given invocation request.
- Specified by:
execute
in interface JarSigner
- Parameters:
request
- The invocation request to execute, must not be null
.
- Returns:
- The result of the JarSigner invocation, never
null
.
- Throws:
JarSignerException
- if something fails while init the command
createCommandLine
protected org.codehaus.plexus.util.cli.Commandline createCommandLine(JarSignerRequest request)
throws JarSignerException
- Throws:
JarSignerException
executeCommandLine
protected JarSignerResult executeCommandLine(org.codehaus.plexus.util.cli.Commandline cli,
JarSignerRequest request)
findJarSignerExecutable
protected java.lang.String findJarSignerExecutable()
throws java.io.IOException
- Throws:
java.io.IOException
findExecutable
protected java.lang.String findExecutable(java.lang.String command,
java.lang.String homeDir,
java.lang.String[] subDirs)
- Finds the specified command in any of the given sub directories of the specified JDK/JRE home directory.
- Parameters:
command
- The command to find, must not be null
.homeDir
- The home directory to search in, may be null
.subDirs
- The sub directories of the home directory to search in, must not be null
.
- Returns:
- The (absolute) path to the command if found,
null
otherwise.
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.