Package com.github.koraktor.mavanagaiata
Klasse HelpMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.github.koraktor.mavanagaiata.HelpMojo
- Alle implementierten Schnittstellen:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="help",
requiresProject=false,
threadSafe=true)
public class HelpMojo
extends org.apache.maven.plugin.AbstractMojo
Display help information on mavanagaiata.
Call
Call
mvn mavanagaiata:help -Ddetail=true -Dgoal=<goal-name>
to display parameter details.- Autor:
- maven-plugin-tools
-
Feldübersicht
Modifizierer und TypFeldBeschreibungprivate static final int
private boolean
Iftrue
, display all settable properties for each goal.private String
The name of the goal for which to show help.private int
The number of spaces per indentation level, should be positive.private int
The maximum length of a display line, should be positive.private static final String
Von Schnittstelle geerbte Felder org.apache.maven.plugin.Mojo
ROLE
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprivate void
append
(StringBuilder sb, String description, int indent) Append a description to the buffer by respecting the indentSize and lineLength parameters.private Document
build()
void
execute()
findNamedChild
(Node node, String elementName) private static Node
findSingleChild
(Node node, String elementName) private static int
getIndentLevel
(String line) Gets the indentation level of the specified line.private static String
getPropertyFromExpression
(String expression) private static Node
getSingleChild
(Node node, String elementName) private static String
private static boolean
isNotEmpty
(String string) private static String
Repeat a Stringn
times to form a new string.Splits the specified text into lines of convenient display length.private static void
Adds the specified line to the output sequence, performing line wrapping if necessary.private void
writeGoal
(StringBuilder sb, String goalPrefix, Element mojo) private void
writeParameter
(StringBuilder sb, Node parameter, Node configurationElement) Von Klasse geerbte Methoden org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Felddetails
-
detail
@Parameter(property="detail", defaultValue="false") private boolean detailIftrue
, display all settable properties for each goal. -
goal
The name of the goal for which to show help. If unspecified, all goals will be displayed. -
lineLength
@Parameter(property="lineLength", defaultValue="80") private int lineLengthThe maximum length of a display line, should be positive. -
indentSize
@Parameter(property="indentSize", defaultValue="2") private int indentSizeThe number of spaces per indentation level, should be positive. -
PLUGIN_HELP_PATH
- Siehe auch:
-
DEFAULT_LINE_LENGTH
private static final int DEFAULT_LINE_LENGTH- Siehe auch:
-
-
Konstruktordetails
-
HelpMojo
public HelpMojo()
-
-
Methodendetails
-
build
- Löst aus:
org.apache.maven.plugin.MojoExecutionException
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Löst aus:
org.apache.maven.plugin.MojoExecutionException
-
isNotEmpty
-
getValue
private static String getValue(Node node, String elementName) throws org.apache.maven.plugin.MojoExecutionException - Löst aus:
org.apache.maven.plugin.MojoExecutionException
-
getSingleChild
private static Node getSingleChild(Node node, String elementName) throws org.apache.maven.plugin.MojoExecutionException - Löst aus:
org.apache.maven.plugin.MojoExecutionException
-
findNamedChild
-
findSingleChild
private static Node findSingleChild(Node node, String elementName) throws org.apache.maven.plugin.MojoExecutionException - Löst aus:
org.apache.maven.plugin.MojoExecutionException
-
writeGoal
private void writeGoal(StringBuilder sb, String goalPrefix, Element mojo) throws org.apache.maven.plugin.MojoExecutionException - Löst aus:
org.apache.maven.plugin.MojoExecutionException
-
writeParameter
private void writeParameter(StringBuilder sb, Node parameter, Node configurationElement) throws org.apache.maven.plugin.MojoExecutionException - Löst aus:
org.apache.maven.plugin.MojoExecutionException
-
repeat
Repeat a String
n
times to form a new string.- Parameter:
str
- String to repeatrepeat
- number of times to repeat str- Gibt zurück:
- String with repeated String
- Löst aus:
NegativeArraySizeException
- ifrepeat < 0
NullPointerException
- if str isnull
-
append
Append a description to the buffer by respecting the indentSize and lineLength parameters. Note: The last character is always a new line.- Parameter:
sb
- The buffer to append the description, notnull
.description
- The description, notnull
.indent
- The base indentation level of each line, must not be negative.
-
toLines
Splits the specified text into lines of convenient display length.- Parameter:
text
- The text to split into lines, must not benull
.indent
- The base indentation level of each line, must not be negative.indentSize
- The size of each indentation, must not be negative.lineLength
- The length of the line, must not be negative.- Gibt zurück:
- The sequence of display lines, never
null
. - Löst aus:
NegativeArraySizeException
- ifindent < 0
-
toLines
Adds the specified line to the output sequence, performing line wrapping if necessary.- Parameter:
lines
- The sequence of display lines, must not benull
.line
- The line to add, must not benull
.indentSize
- The size of each indentation, must not be negative.lineLength
- The length of the line, must not be negative.
-
getIndentLevel
Gets the indentation level of the specified line.- Parameter:
line
- The line whose indentation level should be retrieved, must not benull
.- Gibt zurück:
- The indentation level of the line.
-
getPropertyFromExpression
-