@Mojo(name="help",
      requiresProject=false,
      threadSafe=true)
public class HelpMojo
extends org.apache.maven.plugin.AbstractMojo
mvn johnzon:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.| Modifier and Type | Field and Description | 
|---|---|
| private static int | DEFAULT_LINE_LENGTH | 
| private boolean | detailIf  true, display all settable properties for each goal. | 
| private String | goalThe name of the goal for which to show help. | 
| private int | indentSizeThe number of spaces per indentation level, should be positive. | 
| private int | lineLengthThe maximum length of a display line, should be positive. | 
| private static String | PLUGIN_HELP_PATH | 
| Constructor and Description | 
|---|
| HelpMojo() | 
| Modifier and Type | Method and Description | 
|---|---|
| private 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() | 
| private List<Node> | findNamedChild(Node node,
              String elementName) | 
| private Node | findSingleChild(Node node,
               String elementName) | 
| private static int | getIndentLevel(String line)Gets the indentation level of the specified line. | 
| private String | getPropertyFromExpression(String expression) | 
| private Node | getSingleChild(Node node,
              String elementName) | 
| private String | getValue(Node node,
        String elementName) | 
| private static boolean | isNotEmpty(String string) | 
| private static String | repeat(String str,
      int repeat)Repeat a String  ntimes to form a new string. | 
| private static void | toLines(List<String> lines,
       String line,
       int indentSize,
       int lineLength)Adds the specified line to the output sequence, performing line wrapping if necessary. | 
| private static List<String> | toLines(String text,
       int indent,
       int indentSize,
       int lineLength)Splits the specified text into lines of convenient display length. | 
| private void | writeGoal(StringBuilder sb,
         String goalPrefix,
         Element mojo) | 
| private void | writeParameter(StringBuilder sb,
              Node parameter,
              Node configurationElement) | 
@Parameter(property="detail",
           defaultValue="false")
private boolean detail
true, display all settable properties for each goal.@Parameter(property="goal") private String goal
@Parameter(property="lineLength",
           defaultValue="80")
private int lineLength
@Parameter(property="indentSize",
           defaultValue="2")
private int indentSize
private static final String PLUGIN_HELP_PATH
private static final int DEFAULT_LINE_LENGTH
private Document build() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic void execute()
             throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprivate static boolean isNotEmpty(String string)
private String getValue(Node node, String elementName) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprivate Node getSingleChild(Node node, String elementName) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprivate Node findSingleChild(Node node, String elementName) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprivate void writeGoal(StringBuilder sb, String goalPrefix, Element mojo) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprivate void writeParameter(StringBuilder sb, Node parameter, Node configurationElement) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprivate static String repeat(String str, int repeat)
Repeat a String n times to form a new string.
str - String to repeatrepeat - number of times to repeat strNegativeArraySizeException - if repeat < 0NullPointerException - if str is nullprivate void append(StringBuilder sb, String description, int indent)
sb - The buffer to append the description, not null.description - The description, not null.indent - The base indentation level of each line, must not be negative.private static List<String> toLines(String text, int indent, int indentSize, int lineLength)
text - The text to split into lines, must not be null.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.null.NegativeArraySizeException - if indent < 0private static void toLines(List<String> lines, String line, int indentSize, int lineLength)
lines - The sequence of display lines, must not be null.line - The line to add, must not be null.indentSize - The size of each indentation, must not be negative.lineLength - The length of the line, must not be negative.private static int getIndentLevel(String line)
line - The line whose indentation level should be retrieved, must not be null.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.