Coverage Report - org.apache.maven.plugins.release.HelpMojo
 
Classes in this File Line Coverage Branch Coverage Complexity
HelpMojo
0%
0/862
0%
0/110
10.167
 
 1  
 package org.apache.maven.plugins.release;
 2  
 
 3  
 import java.util.ArrayList;
 4  
 import java.util.Iterator;
 5  
 import java.util.List;
 6  
 
 7  
 import org.apache.maven.plugin.AbstractMojo;
 8  
 import org.apache.maven.plugin.MojoExecutionException;
 9  
 
 10  
 /**
 11  
  * Display help information on maven-release-plugin.<br/> Call <pre>  mvn release:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</pre> to display parameter details.
 12  
  *
 13  
  * @version generated on Tue Dec 13 17:15:34 GMT 2011
 14  
  * @author org.apache.maven.tools.plugin.generator.PluginHelpGenerator (version 2.8)
 15  
  * @goal help
 16  
  * @requiresProject false
 17  
  * @threadSafe
 18  
  */
 19  
 @SuppressWarnings( "all" )
 20  0
 public class HelpMojo
 21  
     extends AbstractMojo
 22  
 {
 23  
     /**
 24  
      * If <code>true</code>, display all settable properties for each goal.
 25  
      * 
 26  
      * @parameter expression="${detail}" default-value="false"
 27  
      */
 28  
     private boolean detail;
 29  
 
 30  
     /**
 31  
      * The name of the goal for which to show help. If unspecified, all goals will be displayed.
 32  
      * 
 33  
      * @parameter expression="${goal}"
 34  
      */
 35  
     private java.lang.String goal;
 36  
 
 37  
     /**
 38  
      * The maximum length of a display line, should be positive.
 39  
      * 
 40  
      * @parameter expression="${lineLength}" default-value="80"
 41  
      */
 42  
     private int lineLength;
 43  
 
 44  
     /**
 45  
      * The number of spaces per indentation level, should be positive.
 46  
      * 
 47  
      * @parameter expression="${indentSize}" default-value="2"
 48  
      */
 49  
     private int indentSize;
 50  
 
 51  
 
 52  
     /** {@inheritDoc} */
 53  
     public void execute()
 54  
         throws MojoExecutionException
 55  
     {
 56  0
         if ( lineLength <= 0 )
 57  
         {
 58  0
             getLog().warn( "The parameter 'lineLength' should be positive, using '80' as default." );
 59  0
             lineLength = 80;
 60  
         }
 61  0
         if ( indentSize <= 0 )
 62  
         {
 63  0
             getLog().warn( "The parameter 'indentSize' should be positive, using '2' as default." );
 64  0
             indentSize = 2;
 65  
         }
 66  
 
 67  0
         StringBuffer sb = new StringBuffer();
 68  
 
 69  0
         append( sb, "org.apache.maven.plugins:maven-release-plugin:2.2.2", 0 );
 70  0
         append( sb, "", 0 );
 71  
 
 72  0
         append( sb, "Maven Release Plugin", 0 );
 73  0
         append( sb, "This plugin is used to release a project with Maven, saving a lot of repetitive, manual work.", 1 );
 74  0
         append( sb, "", 0 );
 75  
 
 76  0
         if ( goal == null || goal.length() <= 0 )
 77  
         {
 78  0
             append( sb, "This plugin has 9 goals:", 0 );
 79  0
             append( sb, "", 0 );
 80  
         }
 81  
 
 82  0
         if ( goal == null || goal.length() <= 0 || "branch".equals( goal ) )
 83  
         {
 84  0
             append( sb, "release:branch", 0 );
 85  0
             append( sb, "Branch a project in SCM, using the same steps as the release:prepare goal, creating a branch instead of a tag. For more info see http://maven.apache.org/plugins/maven-release-plugin/examples/branch.html.", 1 );
 86  0
             append( sb, "", 0 );
 87  0
             if ( detail )
 88  
             {
 89  0
                 append( sb, "Available parameters:", 1 );
 90  0
                 append( sb, "", 0 );
 91  
 
 92  0
                 append( sb, "addSchema (Default: true)", 2 );
 93  0
                 append( sb, "Whether to add a schema to the POM if it was previously missing on release.", 3 );
 94  0
                 append( sb, "Expression: ${addSchema}", 3 );
 95  0
                 append( sb, "", 0 );
 96  
 
 97  0
                 append( sb, "arguments", 2 );
 98  0
                 append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 );
 99  0
                 append( sb, "Expression: ${arguments}", 3 );
 100  0
                 append( sb, "", 0 );
 101  
 
 102  0
                 append( sb, "autoVersionSubmodules (Default: false)", 2 );
 103  0
                 append( sb, "Whether to automatically assign submodules the parent version. If set to false, the user will be prompted for the version of each submodules.", 3 );
 104  0
                 append( sb, "Expression: ${autoVersionSubmodules}", 3 );
 105  0
                 append( sb, "", 0 );
 106  
 
 107  0
                 append( sb, "branchBase", 2 );
 108  0
                 append( sb, "The branch base directory in SVN, you must define it if you don\'t use the standard svn layout (trunk/tags/branches). For example, http://svn.apache.org/repos/asf/maven/plugins/branches. The URL is an SVN URL and does not include the SCM provider and protocol.", 3 );
 109  0
                 append( sb, "Expression: ${branchBase}", 3 );
 110  0
                 append( sb, "", 0 );
 111  
 
 112  0
                 append( sb, "branchName", 2 );
 113  0
                 append( sb, "The branch name to use.", 3 );
 114  0
                 append( sb, "Required: Yes", 3 );
 115  0
                 append( sb, "Expression: ${branchName}", 3 );
 116  0
                 append( sb, "", 0 );
 117  
 
 118  0
                 append( sb, "checkModificationExcludeList", 2 );
 119  0
                 append( sb, "Command-line version of checkModificationExcludes", 3 );
 120  0
                 append( sb, "Expression: ${checkModificationExcludeList}", 3 );
 121  0
                 append( sb, "", 0 );
 122  
 
 123  0
                 append( sb, "checkModificationExcludes", 2 );
 124  0
                 append( sb, "Additional files that will skipped when checking for modifications on the working copy. Is ignored, when checkModificationExcludes is set.", 3 );
 125  0
                 append( sb, "", 0 );
 126  
 
 127  0
                 append( sb, "developmentVersion", 2 );
 128  0
                 append( sb, "Default version to use for new local working copy.", 3 );
 129  0
                 append( sb, "Expression: ${developmentVersion}", 3 );
 130  0
                 append( sb, "", 0 );
 131  
 
 132  0
                 append( sb, "dryRun (Default: false)", 2 );
 133  0
                 append( sb, "Dry run: don\'t checkin or tag anything in the scm repository, or modify the checkout. Running mvn -DdryRun=true release:prepare is useful in order to check that modifications to poms and scm operations (only listed on the console) are working as expected. Modified POMs are written alongside the originals without modifying them.", 3 );
 134  0
                 append( sb, "Expression: ${dryRun}", 3 );
 135  0
                 append( sb, "", 0 );
 136  
 
 137  0
                 append( sb, "javaHome (Default: ${java.home})", 2 );
 138  0
                 append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 );
 139  0
                 append( sb, "", 0 );
 140  
 
 141  0
                 append( sb, "localCheckout (Default: false)", 2 );
 142  0
                 append( sb, "Use a local checkout instead of doing a checkout from the upstream repository. ATTENTION: This will only work with distributed SCMs which support the file:// protocol like e.g. git, jgit or hg! TODO: we should think about having the defaults for the various SCM providers provided via modello!", 3 );
 143  0
                 append( sb, "Expression: ${localCheckout}", 3 );
 144  0
                 append( sb, "", 0 );
 145  
 
 146  0
                 append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 );
 147  0
                 append( sb, "The command-line local repository directory in use for this build (if specified).", 3 );
 148  0
                 append( sb, "", 0 );
 149  
 
 150  0
                 append( sb, "mavenExecutorId (Default: invoker)", 2 );
 151  0
                 append( sb, "Role hint of the MavenExecutor implementation to use.", 3 );
 152  0
                 append( sb, "Expression: ${mavenExecutorId}", 3 );
 153  0
                 append( sb, "", 0 );
 154  
 
 155  0
                 append( sb, "mavenHome (Default: ${maven.home})", 2 );
 156  0
                 append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 );
 157  0
                 append( sb, "", 0 );
 158  
 
 159  0
                 append( sb, "password", 2 );
 160  0
                 append( sb, "The SCM password to use.", 3 );
 161  0
                 append( sb, "Expression: ${password}", 3 );
 162  0
                 append( sb, "", 0 );
 163  
 
 164  0
                 append( sb, "pomFileName", 2 );
 165  0
                 append( sb, "The file name of the POM to execute any goals against.", 3 );
 166  0
                 append( sb, "Expression: ${pomFileName}", 3 );
 167  0
                 append( sb, "", 0 );
 168  
 
 169  0
                 append( sb, "providerImplementations", 2 );
 170  0
                 append( sb, "List of provider implementations.", 3 );
 171  0
                 append( sb, "", 0 );
 172  
 
 173  0
                 append( sb, "pushChanges (Default: true)", 2 );
 174  0
                 append( sb, "Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.", 3 );
 175  0
                 append( sb, "Expression: ${pushChanges}", 3 );
 176  0
                 append( sb, "", 0 );
 177  
 
 178  0
                 append( sb, "releaseVersion", 2 );
 179  0
                 append( sb, "Default version to use when preparing a release or a branch.", 3 );
 180  0
                 append( sb, "Expression: ${releaseVersion}", 3 );
 181  0
                 append( sb, "", 0 );
 182  
 
 183  0
                 append( sb, "remoteTagging (Default: true)", 2 );
 184  0
                 append( sb, "currently only implemented with svn scm. Enable a workaround to prevent issue due to svn client > 1.5.0 (http://jira.codehaus.org/browse/SCM-406)", 3 );
 185  0
                 append( sb, "Expression: ${remoteTagging}", 3 );
 186  0
                 append( sb, "", 0 );
 187  
 
 188  0
                 append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 );
 189  0
                 append( sb, "The message prefix to use for all SCM changes.", 3 );
 190  0
                 append( sb, "Expression: ${scmCommentPrefix}", 3 );
 191  0
                 append( sb, "", 0 );
 192  
 
 193  0
                 append( sb, "suppressCommitBeforeBranch (Default: false)", 2 );
 194  0
                 append( sb, "Whether to suppress a commit of changes to the working copy before the tag is created.\n\nThis requires remoteTagging to be set to false.\n\nsuppressCommitBeforeBranch is useful when you want to avoid poms with released versions in all revisions of your trunk or development branch.", 3 );
 195  0
                 append( sb, "Expression: ${suppressCommitBeforeBranch}", 3 );
 196  0
                 append( sb, "", 0 );
 197  
 
 198  0
                 append( sb, "tag", 2 );
 199  0
                 append( sb, "The SCM tag to use.", 3 );
 200  0
                 append( sb, "Expression: ${tag}", 3 );
 201  0
                 append( sb, "", 0 );
 202  
 
 203  0
                 append( sb, "tagBase", 2 );
 204  0
                 append( sb, "The tag base directory in SVN, you must define it if you don\'t use the standard svn layout (trunk/tags/branches). For example, http://svn.apache.org/repos/asf/maven/plugins/tags. The URL is an SVN URL and does not include the SCM provider and protocol.", 3 );
 205  0
                 append( sb, "Expression: ${tagBase}", 3 );
 206  0
                 append( sb, "", 0 );
 207  
 
 208  0
                 append( sb, "tagNameFormat (Default: @{project.artifactId}-@{project.version})", 2 );
 209  0
                 append( sb, "Format to use when generating the tag name if none is specified. Property interpolation is performed on the tag, but in order to ensure that the interpolation occurs during release, you must use @{...} to reference the properties rather than ${...}. The following properties are available:\n-\tgroupId or project.groupId - The groupId of the root project.\n-\tartifactId or project.artifactId - The artifactId of the root project.\n-\tversion or project.version - The release version of the root project.\n", 3 );
 210  0
                 append( sb, "Expression: ${tagNameFormat}", 3 );
 211  0
                 append( sb, "", 0 );
 212  
 
 213  0
                 append( sb, "updateBranchVersions (Default: false)", 2 );
 214  0
                 append( sb, "Whether to update versions in the branch.", 3 );
 215  0
                 append( sb, "Expression: ${updateBranchVersions}", 3 );
 216  0
                 append( sb, "", 0 );
 217  
 
 218  0
                 append( sb, "updateDependencies (Default: true)", 2 );
 219  0
                 append( sb, "Whether to update dependencies version to the next development version.", 3 );
 220  0
                 append( sb, "Expression: ${updateDependencies}", 3 );
 221  0
                 append( sb, "", 0 );
 222  
 
 223  0
                 append( sb, "updateVersionsToSnapshot (Default: true)", 2 );
 224  0
                 append( sb, "Whether to update versions to SNAPSHOT in the branch.", 3 );
 225  0
                 append( sb, "Expression: ${updateVersionsToSnapshot}", 3 );
 226  0
                 append( sb, "", 0 );
 227  
 
 228  0
                 append( sb, "updateWorkingCopyVersions (Default: true)", 2 );
 229  0
                 append( sb, "Whether to update versions in the working copy.", 3 );
 230  0
                 append( sb, "Expression: ${updateWorkingCopyVersions}", 3 );
 231  0
                 append( sb, "", 0 );
 232  
 
 233  0
                 append( sb, "useEditMode (Default: false)", 2 );
 234  0
                 append( sb, "Whether to use \'edit\' mode on the SCM, to lock the file for editing during SCM operations.", 3 );
 235  0
                 append( sb, "Expression: ${useEditMode}", 3 );
 236  0
                 append( sb, "", 0 );
 237  
 
 238  0
                 append( sb, "username", 2 );
 239  0
                 append( sb, "The SCM username to use.", 3 );
 240  0
                 append( sb, "Expression: ${username}", 3 );
 241  0
                 append( sb, "", 0 );
 242  
             }
 243  
         }
 244  
 
 245  0
         if ( goal == null || goal.length() <= 0 || "clean".equals( goal ) )
 246  
         {
 247  0
             append( sb, "release:clean", 0 );
 248  0
             append( sb, "Clean up after a release preparation. This is done automatically after a successful release:perform, so is best served for cleaning up a failed or abandoned release, or a dry run. Note that only the working copy is cleaned up, no previous steps are rolled back. For more info see http://maven.apache.org/plugins/maven-release-plugin/examples/clean-release.html.", 1 );
 249  0
             append( sb, "", 0 );
 250  0
             if ( detail )
 251  
             {
 252  0
                 append( sb, "Available parameters:", 1 );
 253  0
                 append( sb, "", 0 );
 254  
 
 255  0
                 append( sb, "arguments", 2 );
 256  0
                 append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 );
 257  0
                 append( sb, "Expression: ${arguments}", 3 );
 258  0
                 append( sb, "", 0 );
 259  
 
 260  0
                 append( sb, "javaHome (Default: ${java.home})", 2 );
 261  0
                 append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 );
 262  0
                 append( sb, "", 0 );
 263  
 
 264  0
                 append( sb, "localCheckout (Default: false)", 2 );
 265  0
                 append( sb, "Use a local checkout instead of doing a checkout from the upstream repository. ATTENTION: This will only work with distributed SCMs which support the file:// protocol like e.g. git, jgit or hg! TODO: we should think about having the defaults for the various SCM providers provided via modello!", 3 );
 266  0
                 append( sb, "Expression: ${localCheckout}", 3 );
 267  0
                 append( sb, "", 0 );
 268  
 
 269  0
                 append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 );
 270  0
                 append( sb, "The command-line local repository directory in use for this build (if specified).", 3 );
 271  0
                 append( sb, "", 0 );
 272  
 
 273  0
                 append( sb, "mavenExecutorId (Default: invoker)", 2 );
 274  0
                 append( sb, "Role hint of the MavenExecutor implementation to use.", 3 );
 275  0
                 append( sb, "Expression: ${mavenExecutorId}", 3 );
 276  0
                 append( sb, "", 0 );
 277  
 
 278  0
                 append( sb, "mavenHome (Default: ${maven.home})", 2 );
 279  0
                 append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 );
 280  0
                 append( sb, "", 0 );
 281  
 
 282  0
                 append( sb, "password", 2 );
 283  0
                 append( sb, "The SCM password to use.", 3 );
 284  0
                 append( sb, "Expression: ${password}", 3 );
 285  0
                 append( sb, "", 0 );
 286  
 
 287  0
                 append( sb, "pomFileName", 2 );
 288  0
                 append( sb, "The file name of the POM to execute any goals against.", 3 );
 289  0
                 append( sb, "Expression: ${pomFileName}", 3 );
 290  0
                 append( sb, "", 0 );
 291  
 
 292  0
                 append( sb, "providerImplementations", 2 );
 293  0
                 append( sb, "List of provider implementations.", 3 );
 294  0
                 append( sb, "", 0 );
 295  
 
 296  0
                 append( sb, "pushChanges (Default: true)", 2 );
 297  0
                 append( sb, "Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.", 3 );
 298  0
                 append( sb, "Expression: ${pushChanges}", 3 );
 299  0
                 append( sb, "", 0 );
 300  
 
 301  0
                 append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 );
 302  0
                 append( sb, "The message prefix to use for all SCM changes.", 3 );
 303  0
                 append( sb, "Expression: ${scmCommentPrefix}", 3 );
 304  0
                 append( sb, "", 0 );
 305  
 
 306  0
                 append( sb, "tag", 2 );
 307  0
                 append( sb, "The SCM tag to use.", 3 );
 308  0
                 append( sb, "Expression: ${tag}", 3 );
 309  0
                 append( sb, "", 0 );
 310  
 
 311  0
                 append( sb, "tagBase", 2 );
 312  0
                 append( sb, "The tag base directory in SVN, you must define it if you don\'t use the standard svn layout (trunk/tags/branches). For example, http://svn.apache.org/repos/asf/maven/plugins/tags. The URL is an SVN URL and does not include the SCM provider and protocol.", 3 );
 313  0
                 append( sb, "Expression: ${tagBase}", 3 );
 314  0
                 append( sb, "", 0 );
 315  
 
 316  0
                 append( sb, "tagNameFormat (Default: @{project.artifactId}-@{project.version})", 2 );
 317  0
                 append( sb, "Format to use when generating the tag name if none is specified. Property interpolation is performed on the tag, but in order to ensure that the interpolation occurs during release, you must use @{...} to reference the properties rather than ${...}. The following properties are available:\n-\tgroupId or project.groupId - The groupId of the root project.\n-\tartifactId or project.artifactId - The artifactId of the root project.\n-\tversion or project.version - The release version of the root project.\n", 3 );
 318  0
                 append( sb, "Expression: ${tagNameFormat}", 3 );
 319  0
                 append( sb, "", 0 );
 320  
 
 321  0
                 append( sb, "username", 2 );
 322  0
                 append( sb, "The SCM username to use.", 3 );
 323  0
                 append( sb, "Expression: ${username}", 3 );
 324  0
                 append( sb, "", 0 );
 325  
             }
 326  
         }
 327  
 
 328  0
         if ( goal == null || goal.length() <= 0 || "help".equals( goal ) )
 329  
         {
 330  0
             append( sb, "release:help", 0 );
 331  0
             append( sb, "Display help information on maven-release-plugin.\nCall\n\u00a0\u00a0mvn\u00a0release:help\u00a0-Ddetail=true\u00a0-Dgoal=<goal-name>\nto display parameter details.", 1 );
 332  0
             append( sb, "", 0 );
 333  0
             if ( detail )
 334  
             {
 335  0
                 append( sb, "Available parameters:", 1 );
 336  0
                 append( sb, "", 0 );
 337  
 
 338  0
                 append( sb, "detail (Default: false)", 2 );
 339  0
                 append( sb, "If true, display all settable properties for each goal.", 3 );
 340  0
                 append( sb, "Expression: ${detail}", 3 );
 341  0
                 append( sb, "", 0 );
 342  
 
 343  0
                 append( sb, "goal", 2 );
 344  0
                 append( sb, "The name of the goal for which to show help. If unspecified, all goals will be displayed.", 3 );
 345  0
                 append( sb, "Expression: ${goal}", 3 );
 346  0
                 append( sb, "", 0 );
 347  
 
 348  0
                 append( sb, "indentSize (Default: 2)", 2 );
 349  0
                 append( sb, "The number of spaces per indentation level, should be positive.", 3 );
 350  0
                 append( sb, "Expression: ${indentSize}", 3 );
 351  0
                 append( sb, "", 0 );
 352  
 
 353  0
                 append( sb, "lineLength (Default: 80)", 2 );
 354  0
                 append( sb, "The maximum length of a display line, should be positive.", 3 );
 355  0
                 append( sb, "Expression: ${lineLength}", 3 );
 356  0
                 append( sb, "", 0 );
 357  
             }
 358  
         }
 359  
 
 360  0
         if ( goal == null || goal.length() <= 0 || "perform".equals( goal ) )
 361  
         {
 362  0
             append( sb, "release:perform", 0 );
 363  0
             append( sb, "Perform a release from SCM, either from a specified tag, or the tag representing the previous release in the working copy created by release:prepare. For more info see http://maven.apache.org/plugins/maven-release-plugin/examples/perform-release.html.", 1 );
 364  0
             append( sb, "", 0 );
 365  0
             if ( detail )
 366  
             {
 367  0
                 append( sb, "Available parameters:", 1 );
 368  0
                 append( sb, "", 0 );
 369  
 
 370  0
                 append( sb, "arguments", 2 );
 371  0
                 append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 );
 372  0
                 append( sb, "Expression: ${arguments}", 3 );
 373  0
                 append( sb, "", 0 );
 374  
 
 375  0
                 append( sb, "connectionUrl", 2 );
 376  0
                 append( sb, "The SCM URL to checkout from. If omitted, the one from the release.properties file is used, followed by the URL from the current POM.", 3 );
 377  0
                 append( sb, "Expression: ${connectionUrl}", 3 );
 378  0
                 append( sb, "", 0 );
 379  
 
 380  0
                 append( sb, "goals", 2 );
 381  0
                 append( sb, "A space separated list of goals to execute on deployment. Default value is either deploy or deploy site-deploy, if the project has a <distributionManagement>/<site> element.", 3 );
 382  0
                 append( sb, "Expression: ${goals}", 3 );
 383  0
                 append( sb, "", 0 );
 384  
 
 385  0
                 append( sb, "javaHome (Default: ${java.home})", 2 );
 386  0
                 append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 );
 387  0
                 append( sb, "", 0 );
 388  
 
 389  0
                 append( sb, "localCheckout (Default: false)", 2 );
 390  0
                 append( sb, "Use a local checkout instead of doing a checkout from the upstream repository. ATTENTION: This will only work with distributed SCMs which support the file:// protocol like e.g. git, jgit or hg! TODO: we should think about having the defaults for the various SCM providers provided via modello!", 3 );
 391  0
                 append( sb, "Expression: ${localCheckout}", 3 );
 392  0
                 append( sb, "", 0 );
 393  
 
 394  0
                 append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 );
 395  0
                 append( sb, "The command-line local repository directory in use for this build (if specified).", 3 );
 396  0
                 append( sb, "", 0 );
 397  
 
 398  0
                 append( sb, "mavenExecutorId (Default: invoker)", 2 );
 399  0
                 append( sb, "Role hint of the MavenExecutor implementation to use.", 3 );
 400  0
                 append( sb, "Expression: ${mavenExecutorId}", 3 );
 401  0
                 append( sb, "", 0 );
 402  
 
 403  0
                 append( sb, "mavenHome (Default: ${maven.home})", 2 );
 404  0
                 append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 );
 405  0
                 append( sb, "", 0 );
 406  
 
 407  0
                 append( sb, "password", 2 );
 408  0
                 append( sb, "The SCM password to use.", 3 );
 409  0
                 append( sb, "Expression: ${password}", 3 );
 410  0
                 append( sb, "", 0 );
 411  
 
 412  0
                 append( sb, "pomFileName", 2 );
 413  0
                 append( sb, "The file name of the POM to execute any goals against.", 3 );
 414  0
                 append( sb, "Expression: ${pomFileName}", 3 );
 415  0
                 append( sb, "", 0 );
 416  
 
 417  0
                 append( sb, "providerImplementations", 2 );
 418  0
                 append( sb, "List of provider implementations.", 3 );
 419  0
                 append( sb, "", 0 );
 420  
 
 421  0
                 append( sb, "pushChanges (Default: true)", 2 );
 422  0
                 append( sb, "Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.", 3 );
 423  0
                 append( sb, "Expression: ${pushChanges}", 3 );
 424  0
                 append( sb, "", 0 );
 425  
 
 426  0
                 append( sb, "releaseProfiles", 2 );
 427  0
                 append( sb, "Comma separated profiles to enable on deployment, in addition to active profiles for project execution.", 3 );
 428  0
                 append( sb, "Expression: ${releaseProfiles}", 3 );
 429  0
                 append( sb, "", 0 );
 430  
 
 431  0
                 append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 );
 432  0
                 append( sb, "The message prefix to use for all SCM changes.", 3 );
 433  0
                 append( sb, "Expression: ${scmCommentPrefix}", 3 );
 434  0
                 append( sb, "", 0 );
 435  
 
 436  0
                 append( sb, "tag", 2 );
 437  0
                 append( sb, "The SCM tag to use.", 3 );
 438  0
                 append( sb, "Expression: ${tag}", 3 );
 439  0
                 append( sb, "", 0 );
 440  
 
 441  0
                 append( sb, "tagBase", 2 );
 442  0
                 append( sb, "The tag base directory in SVN, you must define it if you don\'t use the standard svn layout (trunk/tags/branches). For example, http://svn.apache.org/repos/asf/maven/plugins/tags. The URL is an SVN URL and does not include the SCM provider and protocol.", 3 );
 443  0
                 append( sb, "Expression: ${tagBase}", 3 );
 444  0
                 append( sb, "", 0 );
 445  
 
 446  0
                 append( sb, "tagNameFormat (Default: @{project.artifactId}-@{project.version})", 2 );
 447  0
                 append( sb, "Format to use when generating the tag name if none is specified. Property interpolation is performed on the tag, but in order to ensure that the interpolation occurs during release, you must use @{...} to reference the properties rather than ${...}. The following properties are available:\n-\tgroupId or project.groupId - The groupId of the root project.\n-\tartifactId or project.artifactId - The artifactId of the root project.\n-\tversion or project.version - The release version of the root project.\n", 3 );
 448  0
                 append( sb, "Expression: ${tagNameFormat}", 3 );
 449  0
                 append( sb, "", 0 );
 450  
 
 451  0
                 append( sb, "useReleaseProfile (Default: true)", 2 );
 452  0
                 append( sb, "Whether to use the release profile that adds sources and javadocs to the released artifact, if appropriate. If set to true, the release plugin sets the property \'performRelease\' to true, which activates the profile \'release-profile\', which is inherited from the super pom.", 3 );
 453  0
                 append( sb, "Expression: ${useReleaseProfile}", 3 );
 454  0
                 append( sb, "", 0 );
 455  
 
 456  0
                 append( sb, "username", 2 );
 457  0
                 append( sb, "The SCM username to use.", 3 );
 458  0
                 append( sb, "Expression: ${username}", 3 );
 459  0
                 append( sb, "", 0 );
 460  
 
 461  0
                 append( sb, "workingDirectory (Default: ${project.build.directory}/checkout)", 2 );
 462  0
                 append( sb, "The checkout directory.", 3 );
 463  0
                 append( sb, "Required: Yes", 3 );
 464  0
                 append( sb, "Expression: ${workingDirectory}", 3 );
 465  0
                 append( sb, "", 0 );
 466  
             }
 467  
         }
 468  
 
 469  0
         if ( goal == null || goal.length() <= 0 || "prepare".equals( goal ) )
 470  
         {
 471  0
             append( sb, "release:prepare", 0 );
 472  0
             append( sb, "Prepare for a release in SCM. Steps through several phases to ensure the POM is ready to be released and then prepares SCM to eventually contain a tagged version of the release and a record in the local copy of the parameters used. This can be followed by a call to release:perform. For more info see http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html.", 1 );
 473  0
             append( sb, "", 0 );
 474  0
             if ( detail )
 475  
             {
 476  0
                 append( sb, "Available parameters:", 1 );
 477  0
                 append( sb, "", 0 );
 478  
 
 479  0
                 append( sb, "addSchema (Default: true)", 2 );
 480  0
                 append( sb, "Whether to add a schema to the POM if it was previously missing on release.", 3 );
 481  0
                 append( sb, "Expression: ${addSchema}", 3 );
 482  0
                 append( sb, "", 0 );
 483  
 
 484  0
                 append( sb, "allowTimestampedSnapshots (Default: false)", 2 );
 485  0
                 append( sb, "Whether to allow timestamped SNAPSHOT dependencies. Default is to fail when finding any SNAPSHOT.", 3 );
 486  0
                 append( sb, "Expression: ${ignoreSnapshots}", 3 );
 487  0
                 append( sb, "", 0 );
 488  
 
 489  0
                 append( sb, "arguments", 2 );
 490  0
                 append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 );
 491  0
                 append( sb, "Expression: ${arguments}", 3 );
 492  0
                 append( sb, "", 0 );
 493  
 
 494  0
                 append( sb, "autoVersionSubmodules (Default: false)", 2 );
 495  0
                 append( sb, "Whether to automatically assign submodules the parent version. If set to false, the user will be prompted for the version of each submodules.", 3 );
 496  0
                 append( sb, "Expression: ${autoVersionSubmodules}", 3 );
 497  0
                 append( sb, "", 0 );
 498  
 
 499  0
                 append( sb, "checkModificationExcludeList", 2 );
 500  0
                 append( sb, "Command-line version of checkModificationExcludes", 3 );
 501  0
                 append( sb, "Expression: ${checkModificationExcludeList}", 3 );
 502  0
                 append( sb, "", 0 );
 503  
 
 504  0
                 append( sb, "checkModificationExcludes", 2 );
 505  0
                 append( sb, "Additional files that will skipped when checking for modifications on the working copy. Is ignored, when checkModificationExcludes is set.", 3 );
 506  0
                 append( sb, "", 0 );
 507  
 
 508  0
                 append( sb, "commitByProject (Default: false)", 2 );
 509  0
                 append( sb, "Commits to do are atomic or by project.", 3 );
 510  0
                 append( sb, "Expression: ${commitByProject}", 3 );
 511  0
                 append( sb, "", 0 );
 512  
 
 513  0
                 append( sb, "completionGoals", 2 );
 514  0
                 append( sb, "Goals to run on completion of the preparation step, after transformation back to the next development version but before committing. Space delimited.", 3 );
 515  0
                 append( sb, "Expression: ${completionGoals}", 3 );
 516  0
                 append( sb, "", 0 );
 517  
 
 518  0
                 append( sb, "developmentVersion", 2 );
 519  0
                 append( sb, "Default version to use for new local working copy.", 3 );
 520  0
                 append( sb, "Expression: ${developmentVersion}", 3 );
 521  0
                 append( sb, "", 0 );
 522  
 
 523  0
                 append( sb, "dryRun (Default: false)", 2 );
 524  0
                 append( sb, "Dry run: don\'t checkin or tag anything in the scm repository, or modify the checkout. Running mvn -DdryRun=true release:prepare is useful in order to check that modifications to poms and scm operations (only listed on the console) are working as expected. Modified POMs are written alongside the originals without modifying them.", 3 );
 525  0
                 append( sb, "Expression: ${dryRun}", 3 );
 526  0
                 append( sb, "", 0 );
 527  
 
 528  0
                 append( sb, "generateReleasePoms (Default: false)", 2 );
 529  0
                 append( sb, "Deprecated. Please use release:prepare-with-pom instead.", 3 );
 530  0
                 append( sb, "", 0 );
 531  0
                 append( sb, "(no description available)", 3 );
 532  0
                 append( sb, "Expression: ${generateReleasePoms}", 3 );
 533  0
                 append( sb, "", 0 );
 534  
 
 535  0
                 append( sb, "javaHome (Default: ${java.home})", 2 );
 536  0
                 append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 );
 537  0
                 append( sb, "", 0 );
 538  
 
 539  0
                 append( sb, "localCheckout (Default: false)", 2 );
 540  0
                 append( sb, "Use a local checkout instead of doing a checkout from the upstream repository. ATTENTION: This will only work with distributed SCMs which support the file:// protocol like e.g. git, jgit or hg! TODO: we should think about having the defaults for the various SCM providers provided via modello!", 3 );
 541  0
                 append( sb, "Expression: ${localCheckout}", 3 );
 542  0
                 append( sb, "", 0 );
 543  
 
 544  0
                 append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 );
 545  0
                 append( sb, "The command-line local repository directory in use for this build (if specified).", 3 );
 546  0
                 append( sb, "", 0 );
 547  
 
 548  0
                 append( sb, "mavenExecutorId (Default: invoker)", 2 );
 549  0
                 append( sb, "Role hint of the MavenExecutor implementation to use.", 3 );
 550  0
                 append( sb, "Expression: ${mavenExecutorId}", 3 );
 551  0
                 append( sb, "", 0 );
 552  
 
 553  0
                 append( sb, "mavenHome (Default: ${maven.home})", 2 );
 554  0
                 append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 );
 555  0
                 append( sb, "", 0 );
 556  
 
 557  0
                 append( sb, "password", 2 );
 558  0
                 append( sb, "The SCM password to use.", 3 );
 559  0
                 append( sb, "Expression: ${password}", 3 );
 560  0
                 append( sb, "", 0 );
 561  
 
 562  0
                 append( sb, "pomFileName", 2 );
 563  0
                 append( sb, "The file name of the POM to execute any goals against.", 3 );
 564  0
                 append( sb, "Expression: ${pomFileName}", 3 );
 565  0
                 append( sb, "", 0 );
 566  
 
 567  0
                 append( sb, "preparationGoals (Default: clean verify)", 2 );
 568  0
                 append( sb, "Goals to run as part of the preparation step, after transformation but before committing. Space delimited.", 3 );
 569  0
                 append( sb, "Expression: ${preparationGoals}", 3 );
 570  0
                 append( sb, "", 0 );
 571  
 
 572  0
                 append( sb, "providerImplementations", 2 );
 573  0
                 append( sb, "List of provider implementations.", 3 );
 574  0
                 append( sb, "", 0 );
 575  
 
 576  0
                 append( sb, "pushChanges (Default: true)", 2 );
 577  0
                 append( sb, "Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.", 3 );
 578  0
                 append( sb, "Expression: ${pushChanges}", 3 );
 579  0
                 append( sb, "", 0 );
 580  
 
 581  0
                 append( sb, "releaseVersion", 2 );
 582  0
                 append( sb, "Default version to use when preparing a release or a branch.", 3 );
 583  0
                 append( sb, "Expression: ${releaseVersion}", 3 );
 584  0
                 append( sb, "", 0 );
 585  
 
 586  0
                 append( sb, "remoteTagging (Default: true)", 2 );
 587  0
                 append( sb, "Currently only implemented with svn scm.\n-\tEnables a workaround to prevent issue due to svn client > 1.5.0 (fixed in 1.6.5) (http://jira.codehaus.org/browse/SCM-406)\n-\tYou may not want to use this in conjunction with suppressCommitBeforeTag, such that no poms with released versions are committed to the working copy ever.\n", 3 );
 588  0
                 append( sb, "Expression: ${remoteTagging}", 3 );
 589  0
                 append( sb, "", 0 );
 590  
 
 591  0
                 append( sb, "resume (Default: true)", 2 );
 592  0
                 append( sb, "Resume a previous release attempt from the point where it was stopped.", 3 );
 593  0
                 append( sb, "Expression: ${resume}", 3 );
 594  0
                 append( sb, "", 0 );
 595  
 
 596  0
                 append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 );
 597  0
                 append( sb, "The message prefix to use for all SCM changes.", 3 );
 598  0
                 append( sb, "Expression: ${scmCommentPrefix}", 3 );
 599  0
                 append( sb, "", 0 );
 600  
 
 601  0
                 append( sb, "suppressCommitBeforeTag (Default: false)", 2 );
 602  0
                 append( sb, "Whether to suppress a commit of changes to the working copy before the tag is created.\n\nThis requires remoteTagging to be set to false.\n\nsuppressCommitBeforeTag is useful when you want to avoid poms with released versions in all revisions of your trunk or development branch.", 3 );
 603  0
                 append( sb, "Expression: ${suppressCommitBeforeTag}", 3 );
 604  0
                 append( sb, "", 0 );
 605  
 
 606  0
                 append( sb, "tag", 2 );
 607  0
                 append( sb, "The SCM tag to use.", 3 );
 608  0
                 append( sb, "Expression: ${tag}", 3 );
 609  0
                 append( sb, "", 0 );
 610  
 
 611  0
                 append( sb, "tagBase", 2 );
 612  0
                 append( sb, "The tag base directory in SVN, you must define it if you don\'t use the standard svn layout (trunk/tags/branches). For example, http://svn.apache.org/repos/asf/maven/plugins/tags. The URL is an SVN URL and does not include the SCM provider and protocol.", 3 );
 613  0
                 append( sb, "Expression: ${tagBase}", 3 );
 614  0
                 append( sb, "", 0 );
 615  
 
 616  0
                 append( sb, "tagNameFormat (Default: @{project.artifactId}-@{project.version})", 2 );
 617  0
                 append( sb, "Format to use when generating the tag name if none is specified. Property interpolation is performed on the tag, but in order to ensure that the interpolation occurs during release, you must use @{...} to reference the properties rather than ${...}. The following properties are available:\n-\tgroupId or project.groupId - The groupId of the root project.\n-\tartifactId or project.artifactId - The artifactId of the root project.\n-\tversion or project.version - The release version of the root project.\n", 3 );
 618  0
                 append( sb, "Expression: ${tagNameFormat}", 3 );
 619  0
                 append( sb, "", 0 );
 620  
 
 621  0
                 append( sb, "updateDependencies (Default: true)", 2 );
 622  0
                 append( sb, "Whether to update dependencies version to the next development version.", 3 );
 623  0
                 append( sb, "Expression: ${updateDependencies}", 3 );
 624  0
                 append( sb, "", 0 );
 625  
 
 626  0
                 append( sb, "updateWorkingCopyVersions (Default: true)", 2 );
 627  0
                 append( sb, "Whether to bump the working copy versions to developmentVersion.", 3 );
 628  0
                 append( sb, "Expression: ${updateWorkingCopyVersions}", 3 );
 629  0
                 append( sb, "", 0 );
 630  
 
 631  0
                 append( sb, "useEditMode (Default: false)", 2 );
 632  0
                 append( sb, "Whether to use \'edit\' mode on the SCM, to lock the file for editing during SCM operations.", 3 );
 633  0
                 append( sb, "Expression: ${useEditMode}", 3 );
 634  0
                 append( sb, "", 0 );
 635  
 
 636  0
                 append( sb, "username", 2 );
 637  0
                 append( sb, "The SCM username to use.", 3 );
 638  0
                 append( sb, "Expression: ${username}", 3 );
 639  0
                 append( sb, "", 0 );
 640  
 
 641  0
                 append( sb, "waitBeforeTagging (Default: 0)", 2 );
 642  0
                 append( sb, "Wait the specified number of second before creating the tag.\nwaitBeforeTagging is useful when your source repository is synced between several instances and access to it is determined by geographical location, like the SVN repository at the Apache Software Foundation.", 3 );
 643  0
                 append( sb, "Expression: ${waitBeforeTagging}", 3 );
 644  0
                 append( sb, "", 0 );
 645  
             }
 646  
         }
 647  
 
 648  0
         if ( goal == null || goal.length() <= 0 || "prepare-with-pom".equals( goal ) )
 649  
         {
 650  0
             append( sb, "release:prepare-with-pom", 0 );
 651  0
             append( sb, "Prepare for a release in SCM, fully resolving dependencies for the purpose of producing a \'release POM\'.", 1 );
 652  0
             append( sb, "", 0 );
 653  0
             if ( detail )
 654  
             {
 655  0
                 append( sb, "Available parameters:", 1 );
 656  0
                 append( sb, "", 0 );
 657  
 
 658  0
                 append( sb, "addSchema (Default: true)", 2 );
 659  0
                 append( sb, "Whether to add a schema to the POM if it was previously missing on release.", 3 );
 660  0
                 append( sb, "Expression: ${addSchema}", 3 );
 661  0
                 append( sb, "", 0 );
 662  
 
 663  0
                 append( sb, "allowTimestampedSnapshots (Default: false)", 2 );
 664  0
                 append( sb, "Whether to allow timestamped SNAPSHOT dependencies. Default is to fail when finding any SNAPSHOT.", 3 );
 665  0
                 append( sb, "Expression: ${ignoreSnapshots}", 3 );
 666  0
                 append( sb, "", 0 );
 667  
 
 668  0
                 append( sb, "arguments", 2 );
 669  0
                 append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 );
 670  0
                 append( sb, "Expression: ${arguments}", 3 );
 671  0
                 append( sb, "", 0 );
 672  
 
 673  0
                 append( sb, "autoVersionSubmodules (Default: false)", 2 );
 674  0
                 append( sb, "Whether to automatically assign submodules the parent version. If set to false, the user will be prompted for the version of each submodules.", 3 );
 675  0
                 append( sb, "Expression: ${autoVersionSubmodules}", 3 );
 676  0
                 append( sb, "", 0 );
 677  
 
 678  0
                 append( sb, "checkModificationExcludeList", 2 );
 679  0
                 append( sb, "Command-line version of checkModificationExcludes", 3 );
 680  0
                 append( sb, "Expression: ${checkModificationExcludeList}", 3 );
 681  0
                 append( sb, "", 0 );
 682  
 
 683  0
                 append( sb, "checkModificationExcludes", 2 );
 684  0
                 append( sb, "Additional files that will skipped when checking for modifications on the working copy. Is ignored, when checkModificationExcludes is set.", 3 );
 685  0
                 append( sb, "", 0 );
 686  
 
 687  0
                 append( sb, "commitByProject (Default: false)", 2 );
 688  0
                 append( sb, "Commits to do are atomic or by project.", 3 );
 689  0
                 append( sb, "Expression: ${commitByProject}", 3 );
 690  0
                 append( sb, "", 0 );
 691  
 
 692  0
                 append( sb, "completionGoals", 2 );
 693  0
                 append( sb, "Goals to run on completion of the preparation step, after transformation back to the next development version but before committing. Space delimited.", 3 );
 694  0
                 append( sb, "Expression: ${completionGoals}", 3 );
 695  0
                 append( sb, "", 0 );
 696  
 
 697  0
                 append( sb, "developmentVersion", 2 );
 698  0
                 append( sb, "Default version to use for new local working copy.", 3 );
 699  0
                 append( sb, "Expression: ${developmentVersion}", 3 );
 700  0
                 append( sb, "", 0 );
 701  
 
 702  0
                 append( sb, "dryRun (Default: false)", 2 );
 703  0
                 append( sb, "Dry run: don\'t checkin or tag anything in the scm repository, or modify the checkout. Running mvn -DdryRun=true release:prepare is useful in order to check that modifications to poms and scm operations (only listed on the console) are working as expected. Modified POMs are written alongside the originals without modifying them.", 3 );
 704  0
                 append( sb, "Expression: ${dryRun}", 3 );
 705  0
                 append( sb, "", 0 );
 706  
 
 707  0
                 append( sb, "generateReleasePoms (Default: true)", 2 );
 708  0
                 append( sb, "Whether to generate release-pom.xml files that contain resolved information about the project.", 3 );
 709  0
                 append( sb, "Expression: ${generateReleasePoms}", 3 );
 710  0
                 append( sb, "", 0 );
 711  
 
 712  0
                 append( sb, "javaHome (Default: ${java.home})", 2 );
 713  0
                 append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 );
 714  0
                 append( sb, "", 0 );
 715  
 
 716  0
                 append( sb, "localCheckout (Default: false)", 2 );
 717  0
                 append( sb, "Use a local checkout instead of doing a checkout from the upstream repository. ATTENTION: This will only work with distributed SCMs which support the file:// protocol like e.g. git, jgit or hg! TODO: we should think about having the defaults for the various SCM providers provided via modello!", 3 );
 718  0
                 append( sb, "Expression: ${localCheckout}", 3 );
 719  0
                 append( sb, "", 0 );
 720  
 
 721  0
                 append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 );
 722  0
                 append( sb, "The command-line local repository directory in use for this build (if specified).", 3 );
 723  0
                 append( sb, "", 0 );
 724  
 
 725  0
                 append( sb, "mavenExecutorId (Default: invoker)", 2 );
 726  0
                 append( sb, "Role hint of the MavenExecutor implementation to use.", 3 );
 727  0
                 append( sb, "Expression: ${mavenExecutorId}", 3 );
 728  0
                 append( sb, "", 0 );
 729  
 
 730  0
                 append( sb, "mavenHome (Default: ${maven.home})", 2 );
 731  0
                 append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 );
 732  0
                 append( sb, "", 0 );
 733  
 
 734  0
                 append( sb, "password", 2 );
 735  0
                 append( sb, "The SCM password to use.", 3 );
 736  0
                 append( sb, "Expression: ${password}", 3 );
 737  0
                 append( sb, "", 0 );
 738  
 
 739  0
                 append( sb, "pomFileName", 2 );
 740  0
                 append( sb, "The file name of the POM to execute any goals against.", 3 );
 741  0
                 append( sb, "Expression: ${pomFileName}", 3 );
 742  0
                 append( sb, "", 0 );
 743  
 
 744  0
                 append( sb, "preparationGoals (Default: clean verify)", 2 );
 745  0
                 append( sb, "Goals to run as part of the preparation step, after transformation but before committing. Space delimited.", 3 );
 746  0
                 append( sb, "Expression: ${preparationGoals}", 3 );
 747  0
                 append( sb, "", 0 );
 748  
 
 749  0
                 append( sb, "providerImplementations", 2 );
 750  0
                 append( sb, "List of provider implementations.", 3 );
 751  0
                 append( sb, "", 0 );
 752  
 
 753  0
                 append( sb, "pushChanges (Default: true)", 2 );
 754  0
                 append( sb, "Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.", 3 );
 755  0
                 append( sb, "Expression: ${pushChanges}", 3 );
 756  0
                 append( sb, "", 0 );
 757  
 
 758  0
                 append( sb, "releaseVersion", 2 );
 759  0
                 append( sb, "Default version to use when preparing a release or a branch.", 3 );
 760  0
                 append( sb, "Expression: ${releaseVersion}", 3 );
 761  0
                 append( sb, "", 0 );
 762  
 
 763  0
                 append( sb, "remoteTagging (Default: true)", 2 );
 764  0
                 append( sb, "Currently only implemented with svn scm.\n-\tEnables a workaround to prevent issue due to svn client > 1.5.0 (fixed in 1.6.5) (http://jira.codehaus.org/browse/SCM-406)\n-\tYou may not want to use this in conjunction with suppressCommitBeforeTag, such that no poms with released versions are committed to the working copy ever.\n", 3 );
 765  0
                 append( sb, "Expression: ${remoteTagging}", 3 );
 766  0
                 append( sb, "", 0 );
 767  
 
 768  0
                 append( sb, "resume (Default: true)", 2 );
 769  0
                 append( sb, "Resume a previous release attempt from the point where it was stopped.", 3 );
 770  0
                 append( sb, "Expression: ${resume}", 3 );
 771  0
                 append( sb, "", 0 );
 772  
 
 773  0
                 append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 );
 774  0
                 append( sb, "The message prefix to use for all SCM changes.", 3 );
 775  0
                 append( sb, "Expression: ${scmCommentPrefix}", 3 );
 776  0
                 append( sb, "", 0 );
 777  
 
 778  0
                 append( sb, "suppressCommitBeforeTag (Default: false)", 2 );
 779  0
                 append( sb, "Whether to suppress a commit of changes to the working copy before the tag is created.\n\nThis requires remoteTagging to be set to false.\n\nsuppressCommitBeforeTag is useful when you want to avoid poms with released versions in all revisions of your trunk or development branch.", 3 );
 780  0
                 append( sb, "Expression: ${suppressCommitBeforeTag}", 3 );
 781  0
                 append( sb, "", 0 );
 782  
 
 783  0
                 append( sb, "tag", 2 );
 784  0
                 append( sb, "The SCM tag to use.", 3 );
 785  0
                 append( sb, "Expression: ${tag}", 3 );
 786  0
                 append( sb, "", 0 );
 787  
 
 788  0
                 append( sb, "tagBase", 2 );
 789  0
                 append( sb, "The tag base directory in SVN, you must define it if you don\'t use the standard svn layout (trunk/tags/branches). For example, http://svn.apache.org/repos/asf/maven/plugins/tags. The URL is an SVN URL and does not include the SCM provider and protocol.", 3 );
 790  0
                 append( sb, "Expression: ${tagBase}", 3 );
 791  0
                 append( sb, "", 0 );
 792  
 
 793  0
                 append( sb, "tagNameFormat (Default: @{project.artifactId}-@{project.version})", 2 );
 794  0
                 append( sb, "Format to use when generating the tag name if none is specified. Property interpolation is performed on the tag, but in order to ensure that the interpolation occurs during release, you must use @{...} to reference the properties rather than ${...}. The following properties are available:\n-\tgroupId or project.groupId - The groupId of the root project.\n-\tartifactId or project.artifactId - The artifactId of the root project.\n-\tversion or project.version - The release version of the root project.\n", 3 );
 795  0
                 append( sb, "Expression: ${tagNameFormat}", 3 );
 796  0
                 append( sb, "", 0 );
 797  
 
 798  0
                 append( sb, "updateDependencies (Default: true)", 2 );
 799  0
                 append( sb, "Whether to update dependencies version to the next development version.", 3 );
 800  0
                 append( sb, "Expression: ${updateDependencies}", 3 );
 801  0
                 append( sb, "", 0 );
 802  
 
 803  0
                 append( sb, "updateWorkingCopyVersions (Default: true)", 2 );
 804  0
                 append( sb, "Whether to bump the working copy versions to developmentVersion.", 3 );
 805  0
                 append( sb, "Expression: ${updateWorkingCopyVersions}", 3 );
 806  0
                 append( sb, "", 0 );
 807  
 
 808  0
                 append( sb, "useEditMode (Default: false)", 2 );
 809  0
                 append( sb, "Whether to use \'edit\' mode on the SCM, to lock the file for editing during SCM operations.", 3 );
 810  0
                 append( sb, "Expression: ${useEditMode}", 3 );
 811  0
                 append( sb, "", 0 );
 812  
 
 813  0
                 append( sb, "username", 2 );
 814  0
                 append( sb, "The SCM username to use.", 3 );
 815  0
                 append( sb, "Expression: ${username}", 3 );
 816  0
                 append( sb, "", 0 );
 817  
 
 818  0
                 append( sb, "waitBeforeTagging (Default: 0)", 2 );
 819  0
                 append( sb, "Wait the specified number of second before creating the tag.\nwaitBeforeTagging is useful when your source repository is synced between several instances and access to it is determined by geographical location, like the SVN repository at the Apache Software Foundation.", 3 );
 820  0
                 append( sb, "Expression: ${waitBeforeTagging}", 3 );
 821  0
                 append( sb, "", 0 );
 822  
             }
 823  
         }
 824  
 
 825  0
         if ( goal == null || goal.length() <= 0 || "rollback".equals( goal ) )
 826  
         {
 827  0
             append( sb, "release:rollback", 0 );
 828  0
             append( sb, "Rollback changes made by a previous release. This requires that the previous release descriptor release.properties is still available in the local working copy. For more info see http://maven.apache.org/plugins/maven-release-plugin/examples/rollback-release.html.", 1 );
 829  0
             append( sb, "", 0 );
 830  0
             if ( detail )
 831  
             {
 832  0
                 append( sb, "Available parameters:", 1 );
 833  0
                 append( sb, "", 0 );
 834  
 
 835  0
                 append( sb, "arguments", 2 );
 836  0
                 append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 );
 837  0
                 append( sb, "Expression: ${arguments}", 3 );
 838  0
                 append( sb, "", 0 );
 839  
 
 840  0
                 append( sb, "javaHome (Default: ${java.home})", 2 );
 841  0
                 append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 );
 842  0
                 append( sb, "", 0 );
 843  
 
 844  0
                 append( sb, "localCheckout (Default: false)", 2 );
 845  0
                 append( sb, "Use a local checkout instead of doing a checkout from the upstream repository. ATTENTION: This will only work with distributed SCMs which support the file:// protocol like e.g. git, jgit or hg! TODO: we should think about having the defaults for the various SCM providers provided via modello!", 3 );
 846  0
                 append( sb, "Expression: ${localCheckout}", 3 );
 847  0
                 append( sb, "", 0 );
 848  
 
 849  0
                 append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 );
 850  0
                 append( sb, "The command-line local repository directory in use for this build (if specified).", 3 );
 851  0
                 append( sb, "", 0 );
 852  
 
 853  0
                 append( sb, "mavenExecutorId (Default: invoker)", 2 );
 854  0
                 append( sb, "Role hint of the MavenExecutor implementation to use.", 3 );
 855  0
                 append( sb, "Expression: ${mavenExecutorId}", 3 );
 856  0
                 append( sb, "", 0 );
 857  
 
 858  0
                 append( sb, "mavenHome (Default: ${maven.home})", 2 );
 859  0
                 append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 );
 860  0
                 append( sb, "", 0 );
 861  
 
 862  0
                 append( sb, "password", 2 );
 863  0
                 append( sb, "The SCM password to use.", 3 );
 864  0
                 append( sb, "Expression: ${password}", 3 );
 865  0
                 append( sb, "", 0 );
 866  
 
 867  0
                 append( sb, "pomFileName", 2 );
 868  0
                 append( sb, "The file name of the POM to execute any goals against.", 3 );
 869  0
                 append( sb, "Expression: ${pomFileName}", 3 );
 870  0
                 append( sb, "", 0 );
 871  
 
 872  0
                 append( sb, "providerImplementations", 2 );
 873  0
                 append( sb, "List of provider implementations.", 3 );
 874  0
                 append( sb, "", 0 );
 875  
 
 876  0
                 append( sb, "pushChanges (Default: true)", 2 );
 877  0
                 append( sb, "Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.", 3 );
 878  0
                 append( sb, "Expression: ${pushChanges}", 3 );
 879  0
                 append( sb, "", 0 );
 880  
 
 881  0
                 append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 );
 882  0
                 append( sb, "The message prefix to use for all SCM changes.", 3 );
 883  0
                 append( sb, "Expression: ${scmCommentPrefix}", 3 );
 884  0
                 append( sb, "", 0 );
 885  
 
 886  0
                 append( sb, "tag", 2 );
 887  0
                 append( sb, "The SCM tag to use.", 3 );
 888  0
                 append( sb, "Expression: ${tag}", 3 );
 889  0
                 append( sb, "", 0 );
 890  
 
 891  0
                 append( sb, "tagBase", 2 );
 892  0
                 append( sb, "The tag base directory in SVN, you must define it if you don\'t use the standard svn layout (trunk/tags/branches). For example, http://svn.apache.org/repos/asf/maven/plugins/tags. The URL is an SVN URL and does not include the SCM provider and protocol.", 3 );
 893  0
                 append( sb, "Expression: ${tagBase}", 3 );
 894  0
                 append( sb, "", 0 );
 895  
 
 896  0
                 append( sb, "tagNameFormat (Default: @{project.artifactId}-@{project.version})", 2 );
 897  0
                 append( sb, "Format to use when generating the tag name if none is specified. Property interpolation is performed on the tag, but in order to ensure that the interpolation occurs during release, you must use @{...} to reference the properties rather than ${...}. The following properties are available:\n-\tgroupId or project.groupId - The groupId of the root project.\n-\tartifactId or project.artifactId - The artifactId of the root project.\n-\tversion or project.version - The release version of the root project.\n", 3 );
 898  0
                 append( sb, "Expression: ${tagNameFormat}", 3 );
 899  0
                 append( sb, "", 0 );
 900  
 
 901  0
                 append( sb, "username", 2 );
 902  0
                 append( sb, "The SCM username to use.", 3 );
 903  0
                 append( sb, "Expression: ${username}", 3 );
 904  0
                 append( sb, "", 0 );
 905  
             }
 906  
         }
 907  
 
 908  0
         if ( goal == null || goal.length() <= 0 || "stage".equals( goal ) )
 909  
         {
 910  0
             append( sb, "release:stage", 0 );
 911  0
             append( sb, "Perform a release from SCM to a staging repository.", 1 );
 912  0
             append( sb, "", 0 );
 913  0
             if ( detail )
 914  
             {
 915  0
                 append( sb, "Available parameters:", 1 );
 916  0
                 append( sb, "", 0 );
 917  
 
 918  0
                 append( sb, "arguments", 2 );
 919  0
                 append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 );
 920  0
                 append( sb, "Expression: ${arguments}", 3 );
 921  0
                 append( sb, "", 0 );
 922  
 
 923  0
                 append( sb, "connectionUrl", 2 );
 924  0
                 append( sb, "The SCM URL to checkout from. If omitted, the one from the release.properties file is used, followed by the URL from the current POM.", 3 );
 925  0
                 append( sb, "Expression: ${connectionUrl}", 3 );
 926  0
                 append( sb, "", 0 );
 927  
 
 928  0
                 append( sb, "goals", 2 );
 929  0
                 append( sb, "A comma or space separated list of goals to execute on deployment. Default value is either deploy or deploy site-deploy, if the project has a <distributionManagement>/<site> element.", 3 );
 930  0
                 append( sb, "Expression: ${goals}", 3 );
 931  0
                 append( sb, "", 0 );
 932  
 
 933  0
                 append( sb, "javaHome (Default: ${java.home})", 2 );
 934  0
                 append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 );
 935  0
                 append( sb, "", 0 );
 936  
 
 937  0
                 append( sb, "localCheckout (Default: false)", 2 );
 938  0
                 append( sb, "Use a local checkout instead of doing a checkout from the upstream repository. ATTENTION: This will only work with distributed SCMs which support the file:// protocol like e.g. git, jgit or hg! TODO: we should think about having the defaults for the various SCM providers provided via modello!", 3 );
 939  0
                 append( sb, "Expression: ${localCheckout}", 3 );
 940  0
                 append( sb, "", 0 );
 941  
 
 942  0
                 append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 );
 943  0
                 append( sb, "The command-line local repository directory in use for this build (if specified).", 3 );
 944  0
                 append( sb, "", 0 );
 945  
 
 946  0
                 append( sb, "mavenExecutorId (Default: invoker)", 2 );
 947  0
                 append( sb, "Role hint of the MavenExecutor implementation to use.", 3 );
 948  0
                 append( sb, "Expression: ${mavenExecutorId}", 3 );
 949  0
                 append( sb, "", 0 );
 950  
 
 951  0
                 append( sb, "mavenHome (Default: ${maven.home})", 2 );
 952  0
                 append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 );
 953  0
                 append( sb, "", 0 );
 954  
 
 955  0
                 append( sb, "password", 2 );
 956  0
                 append( sb, "The SCM password to use.", 3 );
 957  0
                 append( sb, "Expression: ${password}", 3 );
 958  0
                 append( sb, "", 0 );
 959  
 
 960  0
                 append( sb, "pomFileName", 2 );
 961  0
                 append( sb, "The file name of the POM to execute any goals against.", 3 );
 962  0
                 append( sb, "Expression: ${pomFileName}", 3 );
 963  0
                 append( sb, "", 0 );
 964  
 
 965  0
                 append( sb, "providerImplementations", 2 );
 966  0
                 append( sb, "List of provider implementations.", 3 );
 967  0
                 append( sb, "", 0 );
 968  
 
 969  0
                 append( sb, "pushChanges (Default: true)", 2 );
 970  0
                 append( sb, "Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.", 3 );
 971  0
                 append( sb, "Expression: ${pushChanges}", 3 );
 972  0
                 append( sb, "", 0 );
 973  
 
 974  0
                 append( sb, "releaseProfiles", 2 );
 975  0
                 append( sb, "Comma separated profiles to enable on deployment, in addition to active profiles for project execution.", 3 );
 976  0
                 append( sb, "Expression: ${releaseProfiles}", 3 );
 977  0
                 append( sb, "", 0 );
 978  
 
 979  0
                 append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 );
 980  0
                 append( sb, "The message prefix to use for all SCM changes.", 3 );
 981  0
                 append( sb, "Expression: ${scmCommentPrefix}", 3 );
 982  0
                 append( sb, "", 0 );
 983  
 
 984  0
                 append( sb, "stagingRepository", 2 );
 985  0
                 append( sb, "URL of the staging repository to use.", 3 );
 986  0
                 append( sb, "Required: Yes", 3 );
 987  0
                 append( sb, "Expression: ${stagingRepository}", 3 );
 988  0
                 append( sb, "", 0 );
 989  
 
 990  0
                 append( sb, "tag", 2 );
 991  0
                 append( sb, "The SCM tag to use.", 3 );
 992  0
                 append( sb, "Expression: ${tag}", 3 );
 993  0
                 append( sb, "", 0 );
 994  
 
 995  0
                 append( sb, "tagBase", 2 );
 996  0
                 append( sb, "The tag base directory in SVN, you must define it if you don\'t use the standard svn layout (trunk/tags/branches). For example, http://svn.apache.org/repos/asf/maven/plugins/tags. The URL is an SVN URL and does not include the SCM provider and protocol.", 3 );
 997  0
                 append( sb, "Expression: ${tagBase}", 3 );
 998  0
                 append( sb, "", 0 );
 999  
 
 1000  0
                 append( sb, "tagNameFormat (Default: @{project.artifactId}-@{project.version})", 2 );
 1001  0
                 append( sb, "Format to use when generating the tag name if none is specified. Property interpolation is performed on the tag, but in order to ensure that the interpolation occurs during release, you must use @{...} to reference the properties rather than ${...}. The following properties are available:\n-\tgroupId or project.groupId - The groupId of the root project.\n-\tartifactId or project.artifactId - The artifactId of the root project.\n-\tversion or project.version - The release version of the root project.\n", 3 );
 1002  0
                 append( sb, "Expression: ${tagNameFormat}", 3 );
 1003  0
                 append( sb, "", 0 );
 1004  
 
 1005  0
                 append( sb, "useReleaseProfile (Default: true)", 2 );
 1006  0
                 append( sb, "Whether to use the release profile that adds sources and javadocs to the released artifact, if appropriate.", 3 );
 1007  0
                 append( sb, "Expression: ${useReleaseProfile}", 3 );
 1008  0
                 append( sb, "", 0 );
 1009  
 
 1010  0
                 append( sb, "username", 2 );
 1011  0
                 append( sb, "The SCM username to use.", 3 );
 1012  0
                 append( sb, "Expression: ${username}", 3 );
 1013  0
                 append( sb, "", 0 );
 1014  
 
 1015  0
                 append( sb, "workingDirectory (Default: ${project.build.directory}/checkout)", 2 );
 1016  0
                 append( sb, "The checkout directory.", 3 );
 1017  0
                 append( sb, "Required: Yes", 3 );
 1018  0
                 append( sb, "Expression: ${workingDirectory}", 3 );
 1019  0
                 append( sb, "", 0 );
 1020  
             }
 1021  
         }
 1022  
 
 1023  0
         if ( goal == null || goal.length() <= 0 || "update-versions".equals( goal ) )
 1024  
         {
 1025  0
             append( sb, "release:update-versions", 0 );
 1026  0
             append( sb, "Update the POM versions for a project. This performs the normal version updates of the release:prepare goal without making other modifications to the SCM such as tagging. For more info see http://maven.apache.org/plugins/maven-release-plugin/examples/update-versions.html.", 1 );
 1027  0
             append( sb, "", 0 );
 1028  0
             if ( detail )
 1029  
             {
 1030  0
                 append( sb, "Available parameters:", 1 );
 1031  0
                 append( sb, "", 0 );
 1032  
 
 1033  0
                 append( sb, "addSchema (Default: true)", 2 );
 1034  0
                 append( sb, "Whether to add a schema to the POM if it was previously missing on release.", 3 );
 1035  0
                 append( sb, "Expression: ${addSchema}", 3 );
 1036  0
                 append( sb, "", 0 );
 1037  
 
 1038  0
                 append( sb, "arguments", 2 );
 1039  0
                 append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 );
 1040  0
                 append( sb, "Expression: ${arguments}", 3 );
 1041  0
                 append( sb, "", 0 );
 1042  
 
 1043  0
                 append( sb, "autoVersionSubmodules (Default: false)", 2 );
 1044  0
                 append( sb, "Whether to automatically assign submodules the parent version. If set to false, the user will be prompted for the version of each submodules.", 3 );
 1045  0
                 append( sb, "Expression: ${autoVersionSubmodules}", 3 );
 1046  0
                 append( sb, "", 0 );
 1047  
 
 1048  0
                 append( sb, "developmentVersion", 2 );
 1049  0
                 append( sb, "Default version to use for new local working copy.", 3 );
 1050  0
                 append( sb, "Expression: ${developmentVersion}", 3 );
 1051  0
                 append( sb, "", 0 );
 1052  
 
 1053  0
                 append( sb, "javaHome (Default: ${java.home})", 2 );
 1054  0
                 append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 );
 1055  0
                 append( sb, "", 0 );
 1056  
 
 1057  0
                 append( sb, "localCheckout (Default: false)", 2 );
 1058  0
                 append( sb, "Use a local checkout instead of doing a checkout from the upstream repository. ATTENTION: This will only work with distributed SCMs which support the file:// protocol like e.g. git, jgit or hg! TODO: we should think about having the defaults for the various SCM providers provided via modello!", 3 );
 1059  0
                 append( sb, "Expression: ${localCheckout}", 3 );
 1060  0
                 append( sb, "", 0 );
 1061  
 
 1062  0
                 append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 );
 1063  0
                 append( sb, "The command-line local repository directory in use for this build (if specified).", 3 );
 1064  0
                 append( sb, "", 0 );
 1065  
 
 1066  0
                 append( sb, "mavenExecutorId (Default: invoker)", 2 );
 1067  0
                 append( sb, "Role hint of the MavenExecutor implementation to use.", 3 );
 1068  0
                 append( sb, "Expression: ${mavenExecutorId}", 3 );
 1069  0
                 append( sb, "", 0 );
 1070  
 
 1071  0
                 append( sb, "mavenHome (Default: ${maven.home})", 2 );
 1072  0
                 append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 );
 1073  0
                 append( sb, "", 0 );
 1074  
 
 1075  0
                 append( sb, "password", 2 );
 1076  0
                 append( sb, "The SCM password to use.", 3 );
 1077  0
                 append( sb, "Expression: ${password}", 3 );
 1078  0
                 append( sb, "", 0 );
 1079  
 
 1080  0
                 append( sb, "pomFileName", 2 );
 1081  0
                 append( sb, "The file name of the POM to execute any goals against.", 3 );
 1082  0
                 append( sb, "Expression: ${pomFileName}", 3 );
 1083  0
                 append( sb, "", 0 );
 1084  
 
 1085  0
                 append( sb, "providerImplementations", 2 );
 1086  0
                 append( sb, "List of provider implementations.", 3 );
 1087  0
                 append( sb, "", 0 );
 1088  
 
 1089  0
                 append( sb, "pushChanges (Default: true)", 2 );
 1090  0
                 append( sb, "Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.", 3 );
 1091  0
                 append( sb, "Expression: ${pushChanges}", 3 );
 1092  0
                 append( sb, "", 0 );
 1093  
 
 1094  0
                 append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 );
 1095  0
                 append( sb, "The message prefix to use for all SCM changes.", 3 );
 1096  0
                 append( sb, "Expression: ${scmCommentPrefix}", 3 );
 1097  0
                 append( sb, "", 0 );
 1098  
 
 1099  0
                 append( sb, "tag", 2 );
 1100  0
                 append( sb, "The SCM tag to use.", 3 );
 1101  0
                 append( sb, "Expression: ${tag}", 3 );
 1102  0
                 append( sb, "", 0 );
 1103  
 
 1104  0
                 append( sb, "tagBase", 2 );
 1105  0
                 append( sb, "The tag base directory in SVN, you must define it if you don\'t use the standard svn layout (trunk/tags/branches). For example, http://svn.apache.org/repos/asf/maven/plugins/tags. The URL is an SVN URL and does not include the SCM provider and protocol.", 3 );
 1106  0
                 append( sb, "Expression: ${tagBase}", 3 );
 1107  0
                 append( sb, "", 0 );
 1108  
 
 1109  0
                 append( sb, "tagNameFormat (Default: @{project.artifactId}-@{project.version})", 2 );
 1110  0
                 append( sb, "Format to use when generating the tag name if none is specified. Property interpolation is performed on the tag, but in order to ensure that the interpolation occurs during release, you must use @{...} to reference the properties rather than ${...}. The following properties are available:\n-\tgroupId or project.groupId - The groupId of the root project.\n-\tartifactId or project.artifactId - The artifactId of the root project.\n-\tversion or project.version - The release version of the root project.\n", 3 );
 1111  0
                 append( sb, "Expression: ${tagNameFormat}", 3 );
 1112  0
                 append( sb, "", 0 );
 1113  
 
 1114  0
                 append( sb, "username", 2 );
 1115  0
                 append( sb, "The SCM username to use.", 3 );
 1116  0
                 append( sb, "Expression: ${username}", 3 );
 1117  0
                 append( sb, "", 0 );
 1118  
             }
 1119  
         }
 1120  
 
 1121  0
         if ( getLog().isInfoEnabled() )
 1122  
         {
 1123  0
             getLog().info( sb.toString() );
 1124  
         }
 1125  0
     }
 1126  
 
 1127  
     /**
 1128  
      * <p>Repeat a String <code>n</code> times to form a new string.</p>
 1129  
      *
 1130  
      * @param str String to repeat
 1131  
      * @param repeat number of times to repeat str
 1132  
      * @return String with repeated String
 1133  
      * @throws NegativeArraySizeException if <code>repeat < 0</code>
 1134  
      * @throws NullPointerException if str is <code>null</code>
 1135  
      */
 1136  
     private static String repeat( String str, int repeat )
 1137  
     {
 1138  0
         StringBuffer buffer = new StringBuffer( repeat * str.length() );
 1139  
 
 1140  0
         for ( int i = 0; i < repeat; i++ )
 1141  
         {
 1142  0
             buffer.append( str );
 1143  
         }
 1144  
 
 1145  0
         return buffer.toString();
 1146  
     }
 1147  
 
 1148  
     /** 
 1149  
      * Append a description to the buffer by respecting the indentSize and lineLength parameters.
 1150  
      * <b>Note</b>: The last character is always a new line.
 1151  
      * 
 1152  
      * @param sb The buffer to append the description, not <code>null</code>.
 1153  
      * @param description The description, not <code>null</code>.
 1154  
      * @param indent The base indentation level of each line, must not be negative.
 1155  
      */
 1156  
     private void append( StringBuffer sb, String description, int indent )
 1157  
     {
 1158  0
         for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); )
 1159  
         {
 1160  0
             sb.append( it.next().toString() ).append( '\n' );
 1161  
         }
 1162  0
     }
 1163  
 
 1164  
     /** 
 1165  
      * Splits the specified text into lines of convenient display length.
 1166  
      * 
 1167  
      * @param text The text to split into lines, must not be <code>null</code>.
 1168  
      * @param indent The base indentation level of each line, must not be negative.
 1169  
      * @param indentSize The size of each indentation, must not be negative.
 1170  
      * @param lineLength The length of the line, must not be negative.
 1171  
      * @return The sequence of display lines, never <code>null</code>.
 1172  
      * @throws NegativeArraySizeException if <code>indent < 0</code>
 1173  
      */
 1174  
     private static List toLines( String text, int indent, int indentSize, int lineLength )
 1175  
     {
 1176  0
         List<String> lines = new ArrayList<String>();
 1177  
 
 1178  0
         String ind = repeat( "\t", indent );
 1179  0
         String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" );
 1180  0
         for ( int i = 0; i < plainLines.length; i++ )
 1181  
         {
 1182  0
             toLines( lines, ind + plainLines[i], indentSize, lineLength );
 1183  
         }
 1184  
 
 1185  0
         return lines;
 1186  
     }
 1187  
 
 1188  
     /** 
 1189  
      * Adds the specified line to the output sequence, performing line wrapping if necessary.
 1190  
      * 
 1191  
      * @param lines The sequence of display lines, must not be <code>null</code>.
 1192  
      * @param line The line to add, must not be <code>null</code>.
 1193  
      * @param indentSize The size of each indentation, must not be negative.
 1194  
      * @param lineLength The length of the line, must not be negative.
 1195  
      */
 1196  
     private static void toLines( List<String> lines, String line, int indentSize, int lineLength )
 1197  
     {
 1198  0
         int lineIndent = getIndentLevel( line );
 1199  0
         StringBuffer buf = new StringBuffer( 256 );
 1200  0
         String[] tokens = line.split( " +" );
 1201  0
         for ( int i = 0; i < tokens.length; i++ )
 1202  
         {
 1203  0
             String token = tokens[i];
 1204  0
             if ( i > 0 )
 1205  
             {
 1206  0
                 if ( buf.length() + token.length() >= lineLength )
 1207  
                 {
 1208  0
                     lines.add( buf.toString() );
 1209  0
                     buf.setLength( 0 );
 1210  0
                     buf.append( repeat( " ", lineIndent * indentSize ) );
 1211  
                 }
 1212  
                 else
 1213  
                 {
 1214  0
                     buf.append( ' ' );
 1215  
                 }
 1216  
             }
 1217  0
             for ( int j = 0; j < token.length(); j++ )
 1218  
             {
 1219  0
                 char c = token.charAt( j );
 1220  0
                 if ( c == '\t' )
 1221  
                 {
 1222  0
                     buf.append( repeat( " ", indentSize - buf.length() % indentSize ) );
 1223  
                 }
 1224  0
                 else if ( c == '\u00A0' )
 1225  
                 {
 1226  0
                     buf.append( ' ' );
 1227  
                 }
 1228  
                 else
 1229  
                 {
 1230  0
                     buf.append( c );
 1231  
                 }
 1232  
             }
 1233  
         }
 1234  0
         lines.add( buf.toString() );
 1235  0
     }
 1236  
 
 1237  
     /** 
 1238  
      * Gets the indentation level of the specified line.
 1239  
      * 
 1240  
      * @param line The line whose indentation level should be retrieved, must not be <code>null</code>.
 1241  
      * @return The indentation level of the line.
 1242  
      */
 1243  
     private static int getIndentLevel( String line )
 1244  
     {
 1245  0
         int level = 0;
 1246  0
         for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ )
 1247  
         {
 1248  0
             level++;
 1249  
         }
 1250  0
         for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ )
 1251  
         {
 1252  0
             if ( line.charAt( i ) == '\t' )
 1253  
             {
 1254  0
                 level++;
 1255  0
                 break;
 1256  
             }
 1257  
         }
 1258  0
         return level;
 1259  
     }
 1260  
 }