org.codehaus.mojo.keytool
Class AbstractCmdLineKeyToolMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.keytool.AbstractKeyToolMojo
          extended by org.codehaus.mojo.keytool.AbstractCmdLineKeyToolMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
ExportMojo, ImportMojo

public abstract class AbstractCmdLineKeyToolMojo
extends AbstractKeyToolMojo

Version:
1.0 2008-02-03
Author:
Juergen Mayrbaeurl

Field Summary
 
Fields inherited from class org.codehaus.mojo.keytool.AbstractKeyToolMojo
keystore, workingDirectory
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractCmdLineKeyToolMojo()
           
 
Method Summary
protected  void addArgIf(List arguments, boolean b, String value)
          Convenience method to add an argument to the command line conditionally based on the given flag.
protected  void addArgIfNotEmpty(List arguments, String key, String value)
          Convenience method to add an argument to the command line if the the value is not null or empty.
protected  void addArgIfNotEmpty(List arguments, String key, String value, boolean repeatKey)
          Convenience method to add an argument to the command line if the the value is not null or empty.
protected  void addArgIfNotEmpty2(List arguments, String key, String value, boolean ignored)
          Convenience method to add an argument to the command line if the the value is not null or empty.
protected  void createParentDirIfNecessary(String file)
           
protected  int executeCommandLine(org.codehaus.plexus.util.cli.Commandline commandLine, InputStream inputStream, org.codehaus.plexus.util.cli.StreamConsumer stream1, org.codehaus.plexus.util.cli.StreamConsumer stream2)
           
protected  String getKeytoolPath()
          Get the path of jarsigner tool depending the OS.
 
Methods inherited from class org.codehaus.mojo.keytool.AbstractKeyToolMojo
getKeystore, getWorkingDir, setKeystore, setWorkingDir
 
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
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Constructor Detail

AbstractCmdLineKeyToolMojo

public AbstractCmdLineKeyToolMojo()
Method Detail

getKeytoolPath

protected String getKeytoolPath()
Get the path of jarsigner tool depending the OS.

Returns:
the path of the jarsigner tool

addArgIf

protected void addArgIf(List arguments,
                        boolean b,
                        String value)
Convenience method to add an argument to the command line conditionally based on the given flag.

Parameters:
arguments - the list to which the argument may be added
b - the flag which controls if the argument is added or not.
value - the argument value to be added.

addArgIfNotEmpty

protected void addArgIfNotEmpty(List arguments,
                                String key,
                                String value)
Convenience method to add an argument to the command line if the the value is not null or empty.

Moreover, the value could be comma separated.

Parameters:
arguments - the list to which the argument may be added
key - the argument name.
value - the argument value to be added.
See Also:
addArgIfNotEmpty(java.util.List,String,String,boolean)

addArgIfNotEmpty2

protected void addArgIfNotEmpty2(List arguments,
                                 String key,
                                 String value,
                                 boolean ignored)
Convenience method to add an argument to the command line if the the value is not null or empty.

Moreover, the value could be comma separated.

Parameters:
arguments - the list to which the argument may be added
key - the argument name.
value - the argument value to be added.
ignored -

addArgIfNotEmpty

protected void addArgIfNotEmpty(List arguments,
                                String key,
                                String value,
                                boolean repeatKey)
Convenience method to add an argument to the command line if the the value is not null or empty.

Moreover, the value could be comma separated.

Parameters:
arguments - the list to which the argument may be added
key - the argument name.
value - the argument value to be added.
repeatKey - repeat or not the key in the command line

executeCommandLine

protected int executeCommandLine(org.codehaus.plexus.util.cli.Commandline commandLine,
                                 InputStream inputStream,
                                 org.codehaus.plexus.util.cli.StreamConsumer stream1,
                                 org.codehaus.plexus.util.cli.StreamConsumer stream2)
                          throws org.codehaus.plexus.util.cli.CommandLineException
Throws:
org.codehaus.plexus.util.cli.CommandLineException

createParentDirIfNecessary

protected void createParentDirIfNecessary(String file)


Copyright © 2005-2011 Codehaus. All Rights Reserved.