org.apache.james.mailet
Class HelpMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.james.mailet.HelpMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class HelpMojo
extends org.apache.maven.plugin.AbstractMojo

Display help information on maven-mailetdocs-plugin.
Call

  mvn mailetdocs:help -Ddetail=true -Dgoal=<goal-name>
to display parameter details.

Version:
generated on Sun Sep 06 10:28:35 BST 2009
Author:
org.apache.maven.tools.plugin.generator.PluginHelpGenerator (version 2.4.3)
Is defined by the goal name:
help
Requires a Maven project to run:
false

Field Summary
private  boolean detail
          If true, display all settable properties for each goal.
private  java.lang.String goal
          The name of the goal for which to show help.
private  int indentSize
          The number of spaces per indentation level, should be positive.
private  int lineLength
          The maximum length of a display line, should be positive.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
HelpMojo()
           
 
Method Summary
private  void append(java.lang.StringBuffer sb, java.lang.String description, int indent)
          Append a description to the buffer by respecting the indentSize and lineLength parameters.
 void execute()
          
private static int getIndentLevel(java.lang.String line)
          Gets the indentation level of the specified line.
private static java.lang.String repeat(java.lang.String str, int repeat)
          Repeat a String n times to form a new string.
private static void toLines(java.util.List lines, java.lang.String line, int indentSize, int lineLength)
          Adds the specified line to the output sequence, performing line wrapping if necessary.
private static java.util.List toLines(java.lang.String text, int indent, int indentSize, int lineLength)
          Splits the specified text into lines of convenient display length.
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

detail

private boolean detail
If true, display all settable properties for each goal.

Is defined by:
expression:
${detail}
default-value:
false

goal

private java.lang.String goal
The name of the goal for which to show help. If unspecified, all goals will be displayed.

Is defined by:
expression:
${goal}

lineLength

private int lineLength
The maximum length of a display line, should be positive.

Is defined by:
expression:
${lineLength}
default-value:
80

indentSize

private int indentSize
The number of spaces per indentation level, should be positive.

Is defined by:
expression:
${indentSize}
default-value:
2
Constructor Detail

HelpMojo

public HelpMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException

Throws:
org.apache.maven.plugin.MojoExecutionException

repeat

private static java.lang.String repeat(java.lang.String str,
                                       int repeat)

Repeat a String n times to form a new string.

Parameters:
str - String to repeat
repeat - number of times to repeat str
Returns:
String with repeated String
Throws:
java.lang.NegativeArraySizeException - if repeat < 0
java.lang.NullPointerException - if str is null

append

private void append(java.lang.StringBuffer sb,
                    java.lang.String description,
                    int indent)
Append a description to the buffer by respecting the indentSize and lineLength parameters. Note: The last character is always a new line.

Parameters:
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.

toLines

private static java.util.List toLines(java.lang.String text,
                                      int indent,
                                      int indentSize,
                                      int lineLength)
Splits the specified text into lines of convenient display length.

Parameters:
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.
Returns:
The sequence of display lines, never null.
Throws:
java.lang.NegativeArraySizeException - if indent < 0

toLines

private static void toLines(java.util.List lines,
                            java.lang.String line,
                            int indentSize,
                            int lineLength)
Adds the specified line to the output sequence, performing line wrapping if necessary.

Parameters:
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.

getIndentLevel

private static int getIndentLevel(java.lang.String line)
Gets the indentation level of the specified line.

Parameters:
line - The line whose indentation level should be retrieved, must not be null.
Returns:
The indentation level of the line.


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.