org.codehaus.plexus.tools.cli
Class AbstractCli

java.lang.Object
  extended by org.codehaus.plexus.tools.cli.AbstractCli
All Implemented Interfaces:
Cli

public abstract class AbstractCli
extends java.lang.Object
implements Cli

Version:
$Id: AbstractCli.java 8335 2009-08-12 13:55:32Z bentmann $
Author:
jason van zyl

Field Summary
static char DEBUG
           
static char ERRORS
           
static char HELP
           
private  org.apache.commons.cli.Options options
           
static char QUIET
           
static char SET_SYSTEM_PROPERTY
           
static char VERSION
           
 
Constructor Summary
AbstractCli()
           
 
Method Summary
abstract  org.apache.commons.cli.Options buildCliOptions(org.apache.commons.cli.Options options)
           
 org.apache.commons.cli.Options buildDefaultCliOptions()
           
private static java.lang.String[] cleanArgs(java.lang.String[] args)
           
 void displayHelp()
           
 int execute(java.lang.String[] args)
           
 int execute(java.lang.String[] args, org.codehaus.plexus.classworlds.ClassWorld classWorld)
           
private  java.util.Properties getExecutionProperties(org.apache.commons.cli.CommandLine commandLine)
           
 java.lang.String getPomPropertiesPath()
           
abstract  void invokePlexusComponent(org.apache.commons.cli.CommandLine cli, org.codehaus.plexus.PlexusContainer container)
           
 org.apache.commons.cli.CommandLine parse(java.lang.String[] args)
           
private  void setCliProperty(java.lang.String property, java.util.Properties executionProperties)
           
protected  void showError(java.lang.String message, java.lang.Exception e, boolean show)
           
protected  int showFatalError(java.lang.String message, java.lang.Exception e, boolean show)
           
private  void showVersion()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUIET

public static final char QUIET
See Also:
Constant Field Values

DEBUG

public static final char DEBUG
See Also:
Constant Field Values

ERRORS

public static final char ERRORS
See Also:
Constant Field Values

HELP

public static final char HELP
See Also:
Constant Field Values

VERSION

public static final char VERSION
See Also:
Constant Field Values

SET_SYSTEM_PROPERTY

public static final char SET_SYSTEM_PROPERTY
See Also:
Constant Field Values

options

private org.apache.commons.cli.Options options
Constructor Detail

AbstractCli

public AbstractCli()
Method Detail

buildCliOptions

public abstract org.apache.commons.cli.Options buildCliOptions(org.apache.commons.cli.Options options)
Specified by:
buildCliOptions in interface Cli

invokePlexusComponent

public abstract void invokePlexusComponent(org.apache.commons.cli.CommandLine cli,
                                           org.codehaus.plexus.PlexusContainer container)
                                    throws java.lang.Exception
Specified by:
invokePlexusComponent in interface Cli
Throws:
java.lang.Exception

getPomPropertiesPath

public java.lang.String getPomPropertiesPath()
Specified by:
getPomPropertiesPath in interface Cli

execute

public int execute(java.lang.String[] args)

execute

public int execute(java.lang.String[] args,
                   org.codehaus.plexus.classworlds.ClassWorld classWorld)

showFatalError

protected int showFatalError(java.lang.String message,
                             java.lang.Exception e,
                             boolean show)

showError

protected void showError(java.lang.String message,
                         java.lang.Exception e,
                         boolean show)

showVersion

private void showVersion()

getExecutionProperties

private java.util.Properties getExecutionProperties(org.apache.commons.cli.CommandLine commandLine)

setCliProperty

private void setCliProperty(java.lang.String property,
                            java.util.Properties executionProperties)

buildDefaultCliOptions

public org.apache.commons.cli.Options buildDefaultCliOptions()

parse

public org.apache.commons.cli.CommandLine parse(java.lang.String[] args)
                                         throws org.apache.commons.cli.ParseException
Throws:
org.apache.commons.cli.ParseException

cleanArgs

private static java.lang.String[] cleanArgs(java.lang.String[] args)

displayHelp

public void displayHelp()