public class App
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
POM_FILE_NAME
Default file name for an XML-based POM.
|
| Constructor and Description |
|---|
App()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final java.lang.String POM_FILE_NAME
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 wrapCopyright © 2001-2013 Apache Software Foundation. All Rights Reserved.