|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.cli.App
The CLI wrapper for controlling MavenSession processes which are encapsulated in the MavenSession bean.
Field Summary | |
static java.lang.String |
POM_FILE_NAME
Default file name for an XML-based POM. |
Constructor Summary | |
App()
Constructor. |
Method Summary | |
protected void |
displayGoals()
Display helpful information regarding all documented goals. |
protected void |
displayGoals(boolean pluginOnly,
java.lang.String plugin)
Display helpful information regarding all documented goals. |
void |
doMain(java.lang.String[] args,
java.util.Date fullStart)
Perform main operations in a non-static method. |
protected void |
exit(int status)
To allow subclasses stop the app from exiting |
protected java.lang.String |
format(java.lang.String orig,
int width,
char pad)
Produce a formatted/padded string. |
protected static java.lang.String |
formatTime(long ms)
Format a time string. |
protected org.apache.commons.cli.CommandLine |
getCli()
Get the CLI parser. |
MavenJellyContext |
getRootContext()
Retrieve the Jelly rootContext. |
void |
initialize(java.lang.String[] args)
Perform initialization. |
protected void |
initializeRootContext()
Initialize the IO streams. |
void |
initializeSystemProperties()
Setup any system properties that have been specified on the CLI. |
static void |
main(java.lang.String[] args)
Main CLI entry point for MavenSession. |
protected void |
printConsoleMavenHeader()
Prints the MavenSession header. |
protected void |
setCli(org.apache.commons.cli.CommandLine commandLine)
Set the cli parser. |
void |
setRootContext(MavenJellyContext rootContext)
Set Jelly rootContext. |
protected java.lang.String |
wrapConsoleMessage(java.lang.String msg,
int wrapIndent,
int lineWidth)
Nicely wraps a message for console output, using a word BreakIterator instance to determine wrapping breaks. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String POM_FILE_NAME
Constructor Detail |
public App()
Method Detail |
public static void main(java.lang.String[] args)
args
- CLI arguments.protected static java.lang.String formatTime(long ms)
ms
- Duration in ms.
public void doMain(java.lang.String[] args, java.util.Date fullStart)
args
- Arguments passed in from main().fullStart
- Date the mavenSession process was started.public MavenJellyContext getRootContext()
public void initialize(java.lang.String[] args) throws org.apache.commons.cli.ParseException, java.net.MalformedURLException, java.io.IOException
args
- The command-line arguments.
org.apache.commons.cli.ParseException
- If there is an error parsing the command-line.
java.io.IOException
- If there is an error while reading the project descriptor.
java.net.MalformedURLException
- If any of the the URLs denoting the local or remote repositories is malformed.public void initializeSystemProperties()
public void setRootContext(MavenJellyContext rootContext)
rootContext
- The mavenSession jelly rootContext.protected void displayGoals()
protected void displayGoals(boolean pluginOnly, java.lang.String plugin)
pluginOnly
- show information for the given plugin onlyplugin
- plugin to show info forprotected void exit(int status)
status
- the value to exit withprotected java.lang.String format(java.lang.String orig, int width, char pad)
orig
- The string to format.width
- The width of the resulting formatted string.pad
- The trailing pad character.
width
.protected org.apache.commons.cli.CommandLine getCli()
protected void initializeRootContext() throws java.io.IOException
java.io.IOException
- on error creating XML output and handling System.err and outprotected void printConsoleMavenHeader()
protected void setCli(org.apache.commons.cli.CommandLine commandLine)
commandLine
- The command line parser.protected java.lang.String wrapConsoleMessage(java.lang.String msg, int wrapIndent, int lineWidth)
msg
- the string message for the consolewrapIndent
- the number of characters to indent all lines after the first onelineWidth
- the console width that determines where to wrap
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |