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
- Plexus component:
- role:
- "org.apache.maven.shared.jarsigner.JarSigner"
- role-hint:
- "default"
|
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 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 Commandline createCommandLine(JarSignerRequest request)
throws JarSignerException
- Throws:
JarSignerException
executeCommandLine
protected JarSignerResult executeCommandLine(Commandline cli,
JarSignerRequest request)
findJarSignerExecutable
protected String findJarSignerExecutable()
throws IOException
- Throws:
IOException
findExecutable
protected String findExecutable(String command,
String homeDir,
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-2011 The Apache Software Foundation. All Rights Reserved.