Coverage Report - org.apache.maven.plugins.release.HelpMojo
 
Classes in this File Line Coverage Branch Coverage Complexity
HelpMojo
0%
0/866
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 May 22 10:19:30 BST 2012
 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.3.1", 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, "A list of additional exclude filters that will be 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, "Add a new or overwrite the default implementation per provider. The key is the scm prefix and the value is the role hint of the ScmProvider.", 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, "Add a new or overwrite the default implementation per provider. The key is the scm prefix and the value is the role hint of the ScmProvider.", 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, "dryRun (Default: false)", 2 );
 381  0
                 append( sb, "Dry run: don\'t checkout anything from the scm repository, or modify the checkout. The goals (by default at least deploy) will be executed against the current project.", 3 );
 382  0
                 append( sb, "Expression: ${dryRun}", 3 );
 383  0
                 append( sb, "", 0 );
 384  
 
 385  0
                 append( sb, "goals", 2 );
 386  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 );
 387  0
                 append( sb, "Expression: ${goals}", 3 );
 388  0
                 append( sb, "", 0 );
 389  
 
 390  0
                 append( sb, "javaHome (Default: ${java.home})", 2 );
 391  0
                 append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 );
 392  0
                 append( sb, "", 0 );
 393  
 
 394  0
                 append( sb, "localCheckout (Default: false)", 2 );
 395  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 );
 396  0
                 append( sb, "Expression: ${localCheckout}", 3 );
 397  0
                 append( sb, "", 0 );
 398  
 
 399  0
                 append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 );
 400  0
                 append( sb, "The command-line local repository directory in use for this build (if specified).", 3 );
 401  0
                 append( sb, "", 0 );
 402  
 
 403  0
                 append( sb, "mavenExecutorId (Default: invoker)", 2 );
 404  0
                 append( sb, "Role hint of the MavenExecutor implementation to use.", 3 );
 405  0
                 append( sb, "Expression: ${mavenExecutorId}", 3 );
 406  0
                 append( sb, "", 0 );
 407  
 
 408  0
                 append( sb, "mavenHome (Default: ${maven.home})", 2 );
 409  0
                 append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 );
 410  0
                 append( sb, "", 0 );
 411  
 
 412  0
                 append( sb, "password", 2 );
 413  0
                 append( sb, "The SCM password to use.", 3 );
 414  0
                 append( sb, "Expression: ${password}", 3 );
 415  0
                 append( sb, "", 0 );
 416  
 
 417  0
                 append( sb, "pomFileName", 2 );
 418  0
                 append( sb, "The file name of the POM to execute any goals against.", 3 );
 419  0
                 append( sb, "Expression: ${pomFileName}", 3 );
 420  0
                 append( sb, "", 0 );
 421  
 
 422  0
                 append( sb, "providerImplementations", 2 );
 423  0
                 append( sb, "Add a new or overwrite the default implementation per provider. The key is the scm prefix and the value is the role hint of the ScmProvider.", 3 );
 424  0
                 append( sb, "", 0 );
 425  
 
 426  0
                 append( sb, "pushChanges (Default: true)", 2 );
 427  0
                 append( sb, "Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.", 3 );
 428  0
                 append( sb, "Expression: ${pushChanges}", 3 );
 429  0
                 append( sb, "", 0 );
 430  
 
 431  0
                 append( sb, "releaseProfiles", 2 );
 432  0
                 append( sb, "Comma separated profiles to enable on deployment, in addition to active profiles for project execution.", 3 );
 433  0
                 append( sb, "Expression: ${releaseProfiles}", 3 );
 434  0
                 append( sb, "", 0 );
 435  
 
 436  0
                 append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 );
 437  0
                 append( sb, "The message prefix to use for all SCM changes.", 3 );
 438  0
                 append( sb, "Expression: ${scmCommentPrefix}", 3 );
 439  0
                 append( sb, "", 0 );
 440  
 
 441  0
                 append( sb, "tag", 2 );
 442  0
                 append( sb, "The SCM tag to use.", 3 );
 443  0
                 append( sb, "Expression: ${tag}", 3 );
 444  0
                 append( sb, "", 0 );
 445  
 
 446  0
                 append( sb, "tagBase", 2 );
 447  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 );
 448  0
                 append( sb, "Expression: ${tagBase}", 3 );
 449  0
                 append( sb, "", 0 );
 450  
 
 451  0
                 append( sb, "tagNameFormat (Default: @{project.artifactId}-@{project.version})", 2 );
 452  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 );
 453  0
                 append( sb, "Expression: ${tagNameFormat}", 3 );
 454  0
                 append( sb, "", 0 );
 455  
 
 456  0
                 append( sb, "useReleaseProfile (Default: true)", 2 );
 457  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 );
 458  0
                 append( sb, "Expression: ${useReleaseProfile}", 3 );
 459  0
                 append( sb, "", 0 );
 460  
 
 461  0
                 append( sb, "username", 2 );
 462  0
                 append( sb, "The SCM username to use.", 3 );
 463  0
                 append( sb, "Expression: ${username}", 3 );
 464  0
                 append( sb, "", 0 );
 465  
 
 466  0
                 append( sb, "workingDirectory (Default: ${project.build.directory}/checkout)", 2 );
 467  0
                 append( sb, "The checkout directory.", 3 );
 468  0
                 append( sb, "Required: Yes", 3 );
 469  0
                 append( sb, "Expression: ${workingDirectory}", 3 );
 470  0
                 append( sb, "", 0 );
 471  
             }
 472  
         }
 473  
 
 474  0
         if ( goal == null || goal.length() <= 0 || "prepare".equals( goal ) )
 475  
         {
 476  0
             append( sb, "release:prepare", 0 );
 477  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 );
 478  0
             append( sb, "", 0 );
 479  0
             if ( detail )
 480  
             {
 481  0
                 append( sb, "Available parameters:", 1 );
 482  0
                 append( sb, "", 0 );
 483  
 
 484  0
                 append( sb, "addSchema (Default: true)", 2 );
 485  0
                 append( sb, "Whether to add a schema to the POM if it was previously missing on release.", 3 );
 486  0
                 append( sb, "Expression: ${addSchema}", 3 );
 487  0
                 append( sb, "", 0 );
 488  
 
 489  0
                 append( sb, "allowTimestampedSnapshots (Default: false)", 2 );
 490  0
                 append( sb, "Whether to allow timestamped SNAPSHOT dependencies. Default is to fail when finding any SNAPSHOT.", 3 );
 491  0
                 append( sb, "Expression: ${ignoreSnapshots}", 3 );
 492  0
                 append( sb, "", 0 );
 493  
 
 494  0
                 append( sb, "arguments", 2 );
 495  0
                 append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 );
 496  0
                 append( sb, "Expression: ${arguments}", 3 );
 497  0
                 append( sb, "", 0 );
 498  
 
 499  0
                 append( sb, "autoVersionSubmodules (Default: false)", 2 );
 500  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 );
 501  0
                 append( sb, "Expression: ${autoVersionSubmodules}", 3 );
 502  0
                 append( sb, "", 0 );
 503  
 
 504  0
                 append( sb, "checkModificationExcludeList", 2 );
 505  0
                 append( sb, "Command-line version of checkModificationExcludes.", 3 );
 506  0
                 append( sb, "Expression: ${checkModificationExcludeList}", 3 );
 507  0
                 append( sb, "", 0 );
 508  
 
 509  0
                 append( sb, "checkModificationExcludes", 2 );
 510  0
                 append( sb, "A list of additional exclude filters that will be skipped when checking for modifications on the working copy. Is ignored, when checkModificationExcludes is set.", 3 );
 511  0
                 append( sb, "", 0 );
 512  
 
 513  0
                 append( sb, "commitByProject (Default: false)", 2 );
 514  0
                 append( sb, "Commits to do are atomic or by project.", 3 );
 515  0
                 append( sb, "Expression: ${commitByProject}", 3 );
 516  0
                 append( sb, "", 0 );
 517  
 
 518  0
                 append( sb, "completionGoals", 2 );
 519  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 );
 520  0
                 append( sb, "Expression: ${completionGoals}", 3 );
 521  0
                 append( sb, "", 0 );
 522  
 
 523  0
                 append( sb, "developmentVersion", 2 );
 524  0
                 append( sb, "Default version to use for new local working copy.", 3 );
 525  0
                 append( sb, "Expression: ${developmentVersion}", 3 );
 526  0
                 append( sb, "", 0 );
 527  
 
 528  0
                 append( sb, "dryRun (Default: false)", 2 );
 529  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 );
 530  0
                 append( sb, "Expression: ${dryRun}", 3 );
 531  0
                 append( sb, "", 0 );
 532  
 
 533  0
                 append( sb, "generateReleasePoms (Default: false)", 2 );
 534  0
                 append( sb, "Deprecated. Please use release:prepare-with-pom instead.", 3 );
 535  0
                 append( sb, "", 0 );
 536  0
                 append( sb, "(no description available)", 3 );
 537  0
                 append( sb, "Expression: ${generateReleasePoms}", 3 );
 538  0
                 append( sb, "", 0 );
 539  
 
 540  0
                 append( sb, "javaHome (Default: ${java.home})", 2 );
 541  0
                 append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 );
 542  0
                 append( sb, "", 0 );
 543  
 
 544  0
                 append( sb, "localCheckout (Default: false)", 2 );
 545  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 );
 546  0
                 append( sb, "Expression: ${localCheckout}", 3 );
 547  0
                 append( sb, "", 0 );
 548  
 
 549  0
                 append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 );
 550  0
                 append( sb, "The command-line local repository directory in use for this build (if specified).", 3 );
 551  0
                 append( sb, "", 0 );
 552  
 
 553  0
                 append( sb, "mavenExecutorId (Default: invoker)", 2 );
 554  0
                 append( sb, "Role hint of the MavenExecutor implementation to use.", 3 );
 555  0
                 append( sb, "Expression: ${mavenExecutorId}", 3 );
 556  0
                 append( sb, "", 0 );
 557  
 
 558  0
                 append( sb, "mavenHome (Default: ${maven.home})", 2 );
 559  0
                 append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 );
 560  0
                 append( sb, "", 0 );
 561  
 
 562  0
                 append( sb, "password", 2 );
 563  0
                 append( sb, "The SCM password to use.", 3 );
 564  0
                 append( sb, "Expression: ${password}", 3 );
 565  0
                 append( sb, "", 0 );
 566  
 
 567  0
                 append( sb, "pomFileName", 2 );
 568  0
                 append( sb, "The file name of the POM to execute any goals against.", 3 );
 569  0
                 append( sb, "Expression: ${pomFileName}", 3 );
 570  0
                 append( sb, "", 0 );
 571  
 
 572  0
                 append( sb, "preparationGoals (Default: clean verify)", 2 );
 573  0
                 append( sb, "Goals to run as part of the preparation step, after transformation but before committing. Space delimited.", 3 );
 574  0
                 append( sb, "Expression: ${preparationGoals}", 3 );
 575  0
                 append( sb, "", 0 );
 576  
 
 577  0
                 append( sb, "providerImplementations", 2 );
 578  0
                 append( sb, "Add a new or overwrite the default implementation per provider. The key is the scm prefix and the value is the role hint of the ScmProvider.", 3 );
 579  0
                 append( sb, "", 0 );
 580  
 
 581  0
                 append( sb, "pushChanges (Default: true)", 2 );
 582  0
                 append( sb, "Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.", 3 );
 583  0
                 append( sb, "Expression: ${pushChanges}", 3 );
 584  0
                 append( sb, "", 0 );
 585  
 
 586  0
                 append( sb, "releaseVersion", 2 );
 587  0
                 append( sb, "Default version to use when preparing a release or a branch.", 3 );
 588  0
                 append( sb, "Expression: ${releaseVersion}", 3 );
 589  0
                 append( sb, "", 0 );
 590  
 
 591  0
                 append( sb, "remoteTagging (Default: true)", 2 );
 592  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 );
 593  0
                 append( sb, "Expression: ${remoteTagging}", 3 );
 594  0
                 append( sb, "", 0 );
 595  
 
 596  0
                 append( sb, "resume (Default: true)", 2 );
 597  0
                 append( sb, "Resume a previous release attempt from the point where it was stopped.", 3 );
 598  0
                 append( sb, "Expression: ${resume}", 3 );
 599  0
                 append( sb, "", 0 );
 600  
 
 601  0
                 append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 );
 602  0
                 append( sb, "The message prefix to use for all SCM changes.", 3 );
 603  0
                 append( sb, "Expression: ${scmCommentPrefix}", 3 );
 604  0
                 append( sb, "", 0 );
 605  
 
 606  0
                 append( sb, "suppressCommitBeforeTag (Default: false)", 2 );
 607  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 );
 608  0
                 append( sb, "Expression: ${suppressCommitBeforeTag}", 3 );
 609  0
                 append( sb, "", 0 );
 610  
 
 611  0
                 append( sb, "tag", 2 );
 612  0
                 append( sb, "The SCM tag to use.", 3 );
 613  0
                 append( sb, "Expression: ${tag}", 3 );
 614  0
                 append( sb, "", 0 );
 615  
 
 616  0
                 append( sb, "tagBase", 2 );
 617  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 );
 618  0
                 append( sb, "Expression: ${tagBase}", 3 );
 619  0
                 append( sb, "", 0 );
 620  
 
 621  0
                 append( sb, "tagNameFormat (Default: @{project.artifactId}-@{project.version})", 2 );
 622  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 );
 623  0
                 append( sb, "Expression: ${tagNameFormat}", 3 );
 624  0
                 append( sb, "", 0 );
 625  
 
 626  0
                 append( sb, "updateDependencies (Default: true)", 2 );
 627  0
                 append( sb, "Whether to update dependencies version to the next development version.", 3 );
 628  0
                 append( sb, "Expression: ${updateDependencies}", 3 );
 629  0
                 append( sb, "", 0 );
 630  
 
 631  0
                 append( sb, "updateWorkingCopyVersions (Default: true)", 2 );
 632  0
                 append( sb, "Whether to bump the working copy versions to developmentVersion.", 3 );
 633  0
                 append( sb, "Expression: ${updateWorkingCopyVersions}", 3 );
 634  0
                 append( sb, "", 0 );
 635  
 
 636  0
                 append( sb, "useEditMode (Default: false)", 2 );
 637  0
                 append( sb, "Whether to use \'edit\' mode on the SCM, to lock the file for editing during SCM operations.", 3 );
 638  0
                 append( sb, "Expression: ${useEditMode}", 3 );
 639  0
                 append( sb, "", 0 );
 640  
 
 641  0
                 append( sb, "username", 2 );
 642  0
                 append( sb, "The SCM username to use.", 3 );
 643  0
                 append( sb, "Expression: ${username}", 3 );
 644  0
                 append( sb, "", 0 );
 645  
 
 646  0
                 append( sb, "waitBeforeTagging (Default: 0)", 2 );
 647  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 );
 648  0
                 append( sb, "Expression: ${waitBeforeTagging}", 3 );
 649  0
                 append( sb, "", 0 );
 650  
             }
 651  
         }
 652  
 
 653  0
         if ( goal == null || goal.length() <= 0 || "prepare-with-pom".equals( goal ) )
 654  
         {
 655  0
             append( sb, "release:prepare-with-pom", 0 );
 656  0
             append( sb, "Prepare for a release in SCM, fully resolving dependencies for the purpose of producing a \'release POM\'.", 1 );
 657  0
             append( sb, "", 0 );
 658  0
             if ( detail )
 659  
             {
 660  0
                 append( sb, "Available parameters:", 1 );
 661  0
                 append( sb, "", 0 );
 662  
 
 663  0
                 append( sb, "addSchema (Default: true)", 2 );
 664  0
                 append( sb, "Whether to add a schema to the POM if it was previously missing on release.", 3 );
 665  0
                 append( sb, "Expression: ${addSchema}", 3 );
 666  0
                 append( sb, "", 0 );
 667  
 
 668  0
                 append( sb, "allowTimestampedSnapshots (Default: false)", 2 );
 669  0
                 append( sb, "Whether to allow timestamped SNAPSHOT dependencies. Default is to fail when finding any SNAPSHOT.", 3 );
 670  0
                 append( sb, "Expression: ${ignoreSnapshots}", 3 );
 671  0
                 append( sb, "", 0 );
 672  
 
 673  0
                 append( sb, "arguments", 2 );
 674  0
                 append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 );
 675  0
                 append( sb, "Expression: ${arguments}", 3 );
 676  0
                 append( sb, "", 0 );
 677  
 
 678  0
                 append( sb, "autoVersionSubmodules (Default: false)", 2 );
 679  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 );
 680  0
                 append( sb, "Expression: ${autoVersionSubmodules}", 3 );
 681  0
                 append( sb, "", 0 );
 682  
 
 683  0
                 append( sb, "checkModificationExcludeList", 2 );
 684  0
                 append( sb, "Command-line version of checkModificationExcludes.", 3 );
 685  0
                 append( sb, "Expression: ${checkModificationExcludeList}", 3 );
 686  0
                 append( sb, "", 0 );
 687  
 
 688  0
                 append( sb, "checkModificationExcludes", 2 );
 689  0
                 append( sb, "A list of additional exclude filters that will be skipped when checking for modifications on the working copy. Is ignored, when checkModificationExcludes is set.", 3 );
 690  0
                 append( sb, "", 0 );
 691  
 
 692  0
                 append( sb, "commitByProject (Default: false)", 2 );
 693  0
                 append( sb, "Commits to do are atomic or by project.", 3 );
 694  0
                 append( sb, "Expression: ${commitByProject}", 3 );
 695  0
                 append( sb, "", 0 );
 696  
 
 697  0
                 append( sb, "completionGoals", 2 );
 698  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 );
 699  0
                 append( sb, "Expression: ${completionGoals}", 3 );
 700  0
                 append( sb, "", 0 );
 701  
 
 702  0
                 append( sb, "developmentVersion", 2 );
 703  0
                 append( sb, "Default version to use for new local working copy.", 3 );
 704  0
                 append( sb, "Expression: ${developmentVersion}", 3 );
 705  0
                 append( sb, "", 0 );
 706  
 
 707  0
                 append( sb, "dryRun (Default: false)", 2 );
 708  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 );
 709  0
                 append( sb, "Expression: ${dryRun}", 3 );
 710  0
                 append( sb, "", 0 );
 711  
 
 712  0
                 append( sb, "generateReleasePoms (Default: true)", 2 );
 713  0
                 append( sb, "Whether to generate release-pom.xml files that contain resolved information about the project.", 3 );
 714  0
                 append( sb, "Expression: ${generateReleasePoms}", 3 );
 715  0
                 append( sb, "", 0 );
 716  
 
 717  0
                 append( sb, "javaHome (Default: ${java.home})", 2 );
 718  0
                 append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 );
 719  0
                 append( sb, "", 0 );
 720  
 
 721  0
                 append( sb, "localCheckout (Default: false)", 2 );
 722  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 );
 723  0
                 append( sb, "Expression: ${localCheckout}", 3 );
 724  0
                 append( sb, "", 0 );
 725  
 
 726  0
                 append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 );
 727  0
                 append( sb, "The command-line local repository directory in use for this build (if specified).", 3 );
 728  0
                 append( sb, "", 0 );
 729  
 
 730  0
                 append( sb, "mavenExecutorId (Default: invoker)", 2 );
 731  0
                 append( sb, "Role hint of the MavenExecutor implementation to use.", 3 );
 732  0
                 append( sb, "Expression: ${mavenExecutorId}", 3 );
 733  0
                 append( sb, "", 0 );
 734  
 
 735  0
                 append( sb, "mavenHome (Default: ${maven.home})", 2 );
 736  0
                 append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 );
 737  0
                 append( sb, "", 0 );
 738  
 
 739  0
                 append( sb, "password", 2 );
 740  0
                 append( sb, "The SCM password to use.", 3 );
 741  0
                 append( sb, "Expression: ${password}", 3 );
 742  0
                 append( sb, "", 0 );
 743  
 
 744  0
                 append( sb, "pomFileName", 2 );
 745  0
                 append( sb, "The file name of the POM to execute any goals against.", 3 );
 746  0
                 append( sb, "Expression: ${pomFileName}", 3 );
 747  0
                 append( sb, "", 0 );
 748  
 
 749  0
                 append( sb, "preparationGoals (Default: clean verify)", 2 );
 750  0
                 append( sb, "Goals to run as part of the preparation step, after transformation but before committing. Space delimited.", 3 );
 751  0
                 append( sb, "Expression: ${preparationGoals}", 3 );
 752  0
                 append( sb, "", 0 );
 753  
 
 754  0
                 append( sb, "providerImplementations", 2 );
 755  0
                 append( sb, "Add a new or overwrite the default implementation per provider. The key is the scm prefix and the value is the role hint of the ScmProvider.", 3 );
 756  0
                 append( sb, "", 0 );
 757  
 
 758  0
                 append( sb, "pushChanges (Default: true)", 2 );
 759  0
                 append( sb, "Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.", 3 );
 760  0
                 append( sb, "Expression: ${pushChanges}", 3 );
 761  0
                 append( sb, "", 0 );
 762  
 
 763  0
                 append( sb, "releaseVersion", 2 );
 764  0
                 append( sb, "Default version to use when preparing a release or a branch.", 3 );
 765  0
                 append( sb, "Expression: ${releaseVersion}", 3 );
 766  0
                 append( sb, "", 0 );
 767  
 
 768  0
                 append( sb, "remoteTagging (Default: true)", 2 );
 769  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 );
 770  0
                 append( sb, "Expression: ${remoteTagging}", 3 );
 771  0
                 append( sb, "", 0 );
 772  
 
 773  0
                 append( sb, "resume (Default: true)", 2 );
 774  0
                 append( sb, "Resume a previous release attempt from the point where it was stopped.", 3 );
 775  0
                 append( sb, "Expression: ${resume}", 3 );
 776  0
                 append( sb, "", 0 );
 777  
 
 778  0
                 append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 );
 779  0
                 append( sb, "The message prefix to use for all SCM changes.", 3 );
 780  0
                 append( sb, "Expression: ${scmCommentPrefix}", 3 );
 781  0
                 append( sb, "", 0 );
 782  
 
 783  0
                 append( sb, "suppressCommitBeforeTag (Default: false)", 2 );
 784  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 );
 785  0
                 append( sb, "Expression: ${suppressCommitBeforeTag}", 3 );
 786  0
                 append( sb, "", 0 );
 787  
 
 788  0
                 append( sb, "tag", 2 );
 789  0
                 append( sb, "The SCM tag to use.", 3 );
 790  0
                 append( sb, "Expression: ${tag}", 3 );
 791  0
                 append( sb, "", 0 );
 792  
 
 793  0
                 append( sb, "tagBase", 2 );
 794  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 );
 795  0
                 append( sb, "Expression: ${tagBase}", 3 );
 796  0
                 append( sb, "", 0 );
 797  
 
 798  0
                 append( sb, "tagNameFormat (Default: @{project.artifactId}-@{project.version})", 2 );
 799  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 );
 800  0
                 append( sb, "Expression: ${tagNameFormat}", 3 );
 801  0
                 append( sb, "", 0 );
 802  
 
 803  0
                 append( sb, "updateDependencies (Default: true)", 2 );
 804  0
                 append( sb, "Whether to update dependencies version to the next development version.", 3 );
 805  0
                 append( sb, "Expression: ${updateDependencies}", 3 );
 806  0
                 append( sb, "", 0 );
 807  
 
 808  0
                 append( sb, "updateWorkingCopyVersions (Default: true)", 2 );
 809  0
                 append( sb, "Whether to bump the working copy versions to developmentVersion.", 3 );
 810  0
                 append( sb, "Expression: ${updateWorkingCopyVersions}", 3 );
 811  0
                 append( sb, "", 0 );
 812  
 
 813  0
                 append( sb, "useEditMode (Default: false)", 2 );
 814  0
                 append( sb, "Whether to use \'edit\' mode on the SCM, to lock the file for editing during SCM operations.", 3 );
 815  0
                 append( sb, "Expression: ${useEditMode}", 3 );
 816  0
                 append( sb, "", 0 );
 817  
 
 818  0
                 append( sb, "username", 2 );
 819  0
                 append( sb, "The SCM username to use.", 3 );
 820  0
                 append( sb, "Expression: ${username}", 3 );
 821  0
                 append( sb, "", 0 );
 822  
 
 823  0
                 append( sb, "waitBeforeTagging (Default: 0)", 2 );
 824  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 );
 825  0
                 append( sb, "Expression: ${waitBeforeTagging}", 3 );
 826  0
                 append( sb, "", 0 );
 827  
             }
 828  
         }
 829  
 
 830  0
         if ( goal == null || goal.length() <= 0 || "rollback".equals( goal ) )
 831  
         {
 832  0
             append( sb, "release:rollback", 0 );
 833  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 );
 834  0
             append( sb, "", 0 );
 835  0
             if ( detail )
 836  
             {
 837  0
                 append( sb, "Available parameters:", 1 );
 838  0
                 append( sb, "", 0 );
 839  
 
 840  0
                 append( sb, "arguments", 2 );
 841  0
                 append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 );
 842  0
                 append( sb, "Expression: ${arguments}", 3 );
 843  0
                 append( sb, "", 0 );
 844  
 
 845  0
                 append( sb, "javaHome (Default: ${java.home})", 2 );
 846  0
                 append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 );
 847  0
                 append( sb, "", 0 );
 848  
 
 849  0
                 append( sb, "localCheckout (Default: false)", 2 );
 850  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 );
 851  0
                 append( sb, "Expression: ${localCheckout}", 3 );
 852  0
                 append( sb, "", 0 );
 853  
 
 854  0
                 append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 );
 855  0
                 append( sb, "The command-line local repository directory in use for this build (if specified).", 3 );
 856  0
                 append( sb, "", 0 );
 857  
 
 858  0
                 append( sb, "mavenExecutorId (Default: invoker)", 2 );
 859  0
                 append( sb, "Role hint of the MavenExecutor implementation to use.", 3 );
 860  0
                 append( sb, "Expression: ${mavenExecutorId}", 3 );
 861  0
                 append( sb, "", 0 );
 862  
 
 863  0
                 append( sb, "mavenHome (Default: ${maven.home})", 2 );
 864  0
                 append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 );
 865  0
                 append( sb, "", 0 );
 866  
 
 867  0
                 append( sb, "password", 2 );
 868  0
                 append( sb, "The SCM password to use.", 3 );
 869  0
                 append( sb, "Expression: ${password}", 3 );
 870  0
                 append( sb, "", 0 );
 871  
 
 872  0
                 append( sb, "pomFileName", 2 );
 873  0
                 append( sb, "The file name of the POM to execute any goals against.", 3 );
 874  0
                 append( sb, "Expression: ${pomFileName}", 3 );
 875  0
                 append( sb, "", 0 );
 876  
 
 877  0
                 append( sb, "providerImplementations", 2 );
 878  0
                 append( sb, "Add a new or overwrite the default implementation per provider. The key is the scm prefix and the value is the role hint of the ScmProvider.", 3 );
 879  0
                 append( sb, "", 0 );
 880  
 
 881  0
                 append( sb, "pushChanges (Default: true)", 2 );
 882  0
                 append( sb, "Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.", 3 );
 883  0
                 append( sb, "Expression: ${pushChanges}", 3 );
 884  0
                 append( sb, "", 0 );
 885  
 
 886  0
                 append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 );
 887  0
                 append( sb, "The message prefix to use for all SCM changes.", 3 );
 888  0
                 append( sb, "Expression: ${scmCommentPrefix}", 3 );
 889  0
                 append( sb, "", 0 );
 890  
 
 891  0
                 append( sb, "tag", 2 );
 892  0
                 append( sb, "The SCM tag to use.", 3 );
 893  0
                 append( sb, "Expression: ${tag}", 3 );
 894  0
                 append( sb, "", 0 );
 895  
 
 896  0
                 append( sb, "tagBase", 2 );
 897  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 );
 898  0
                 append( sb, "Expression: ${tagBase}", 3 );
 899  0
                 append( sb, "", 0 );
 900  
 
 901  0
                 append( sb, "tagNameFormat (Default: @{project.artifactId}-@{project.version})", 2 );
 902  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 );
 903  0
                 append( sb, "Expression: ${tagNameFormat}", 3 );
 904  0
                 append( sb, "", 0 );
 905  
 
 906  0
                 append( sb, "username", 2 );
 907  0
                 append( sb, "The SCM username to use.", 3 );
 908  0
                 append( sb, "Expression: ${username}", 3 );
 909  0
                 append( sb, "", 0 );
 910  
             }
 911  
         }
 912  
 
 913  0
         if ( goal == null || goal.length() <= 0 || "stage".equals( goal ) )
 914  
         {
 915  0
             append( sb, "release:stage", 0 );
 916  0
             append( sb, "Perform a release from SCM to a staging repository.", 1 );
 917  0
             append( sb, "", 0 );
 918  0
             if ( detail )
 919  
             {
 920  0
                 append( sb, "Available parameters:", 1 );
 921  0
                 append( sb, "", 0 );
 922  
 
 923  0
                 append( sb, "arguments", 2 );
 924  0
                 append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 );
 925  0
                 append( sb, "Expression: ${arguments}", 3 );
 926  0
                 append( sb, "", 0 );
 927  
 
 928  0
                 append( sb, "connectionUrl", 2 );
 929  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 );
 930  0
                 append( sb, "Expression: ${connectionUrl}", 3 );
 931  0
                 append( sb, "", 0 );
 932  
 
 933  0
                 append( sb, "goals", 2 );
 934  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 );
 935  0
                 append( sb, "Expression: ${goals}", 3 );
 936  0
                 append( sb, "", 0 );
 937  
 
 938  0
                 append( sb, "javaHome (Default: ${java.home})", 2 );
 939  0
                 append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 );
 940  0
                 append( sb, "", 0 );
 941  
 
 942  0
                 append( sb, "localCheckout (Default: false)", 2 );
 943  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 );
 944  0
                 append( sb, "Expression: ${localCheckout}", 3 );
 945  0
                 append( sb, "", 0 );
 946  
 
 947  0
                 append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 );
 948  0
                 append( sb, "The command-line local repository directory in use for this build (if specified).", 3 );
 949  0
                 append( sb, "", 0 );
 950  
 
 951  0
                 append( sb, "mavenExecutorId (Default: invoker)", 2 );
 952  0
                 append( sb, "Role hint of the MavenExecutor implementation to use.", 3 );
 953  0
                 append( sb, "Expression: ${mavenExecutorId}", 3 );
 954  0
                 append( sb, "", 0 );
 955  
 
 956  0
                 append( sb, "mavenHome (Default: ${maven.home})", 2 );
 957  0
                 append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 );
 958  0
                 append( sb, "", 0 );
 959  
 
 960  0
                 append( sb, "password", 2 );
 961  0
                 append( sb, "The SCM password to use.", 3 );
 962  0
                 append( sb, "Expression: ${password}", 3 );
 963  0
                 append( sb, "", 0 );
 964  
 
 965  0
                 append( sb, "pomFileName", 2 );
 966  0
                 append( sb, "The file name of the POM to execute any goals against.", 3 );
 967  0
                 append( sb, "Expression: ${pomFileName}", 3 );
 968  0
                 append( sb, "", 0 );
 969  
 
 970  0
                 append( sb, "providerImplementations", 2 );
 971  0
                 append( sb, "Add a new or overwrite the default implementation per provider. The key is the scm prefix and the value is the role hint of the ScmProvider.", 3 );
 972  0
                 append( sb, "", 0 );
 973  
 
 974  0
                 append( sb, "pushChanges (Default: true)", 2 );
 975  0
                 append( sb, "Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.", 3 );
 976  0
                 append( sb, "Expression: ${pushChanges}", 3 );
 977  0
                 append( sb, "", 0 );
 978  
 
 979  0
                 append( sb, "releaseProfiles", 2 );
 980  0
                 append( sb, "Comma separated profiles to enable on deployment, in addition to active profiles for project execution.", 3 );
 981  0
                 append( sb, "Expression: ${releaseProfiles}", 3 );
 982  0
                 append( sb, "", 0 );
 983  
 
 984  0
                 append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 );
 985  0
                 append( sb, "The message prefix to use for all SCM changes.", 3 );
 986  0
                 append( sb, "Expression: ${scmCommentPrefix}", 3 );
 987  0
                 append( sb, "", 0 );
 988  
 
 989  0
                 append( sb, "stagingRepository", 2 );
 990  0
                 append( sb, "URL of the staging repository to use.", 3 );
 991  0
                 append( sb, "Required: Yes", 3 );
 992  0
                 append( sb, "Expression: ${stagingRepository}", 3 );
 993  0
                 append( sb, "", 0 );
 994  
 
 995  0
                 append( sb, "tag", 2 );
 996  0
                 append( sb, "The SCM tag to use.", 3 );
 997  0
                 append( sb, "Expression: ${tag}", 3 );
 998  0
                 append( sb, "", 0 );
 999  
 
 1000  0
                 append( sb, "tagBase", 2 );
 1001  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 );
 1002  0
                 append( sb, "Expression: ${tagBase}", 3 );
 1003  0
                 append( sb, "", 0 );
 1004  
 
 1005  0
                 append( sb, "tagNameFormat (Default: @{project.artifactId}-@{project.version})", 2 );
 1006  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 );
 1007  0
                 append( sb, "Expression: ${tagNameFormat}", 3 );
 1008  0
                 append( sb, "", 0 );
 1009  
 
 1010  0
                 append( sb, "useReleaseProfile (Default: true)", 2 );
 1011  0
                 append( sb, "Whether to use the release profile that adds sources and javadocs to the released artifact, if appropriate.", 3 );
 1012  0
                 append( sb, "Expression: ${useReleaseProfile}", 3 );
 1013  0
                 append( sb, "", 0 );
 1014  
 
 1015  0
                 append( sb, "username", 2 );
 1016  0
                 append( sb, "The SCM username to use.", 3 );
 1017  0
                 append( sb, "Expression: ${username}", 3 );
 1018  0
                 append( sb, "", 0 );
 1019  
 
 1020  0
                 append( sb, "workingDirectory (Default: ${project.build.directory}/checkout)", 2 );
 1021  0
                 append( sb, "The checkout directory.", 3 );
 1022  0
                 append( sb, "Required: Yes", 3 );
 1023  0
                 append( sb, "Expression: ${workingDirectory}", 3 );
 1024  0
                 append( sb, "", 0 );
 1025  
             }
 1026  
         }
 1027  
 
 1028  0
         if ( goal == null || goal.length() <= 0 || "update-versions".equals( goal ) )
 1029  
         {
 1030  0
             append( sb, "release:update-versions", 0 );
 1031  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 );
 1032  0
             append( sb, "", 0 );
 1033  0
             if ( detail )
 1034  
             {
 1035  0
                 append( sb, "Available parameters:", 1 );
 1036  0
                 append( sb, "", 0 );
 1037  
 
 1038  0
                 append( sb, "addSchema (Default: true)", 2 );
 1039  0
                 append( sb, "Whether to add a schema to the POM if it was previously missing on release.", 3 );
 1040  0
                 append( sb, "Expression: ${addSchema}", 3 );
 1041  0
                 append( sb, "", 0 );
 1042  
 
 1043  0
                 append( sb, "arguments", 2 );
 1044  0
                 append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 );
 1045  0
                 append( sb, "Expression: ${arguments}", 3 );
 1046  0
                 append( sb, "", 0 );
 1047  
 
 1048  0
                 append( sb, "autoVersionSubmodules (Default: false)", 2 );
 1049  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 );
 1050  0
                 append( sb, "Expression: ${autoVersionSubmodules}", 3 );
 1051  0
                 append( sb, "", 0 );
 1052  
 
 1053  0
                 append( sb, "developmentVersion", 2 );
 1054  0
                 append( sb, "Default version to use for new local working copy.", 3 );
 1055  0
                 append( sb, "Expression: ${developmentVersion}", 3 );
 1056  0
                 append( sb, "", 0 );
 1057  
 
 1058  0
                 append( sb, "javaHome (Default: ${java.home})", 2 );
 1059  0
                 append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 );
 1060  0
                 append( sb, "", 0 );
 1061  
 
 1062  0
                 append( sb, "localCheckout (Default: false)", 2 );
 1063  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 );
 1064  0
                 append( sb, "Expression: ${localCheckout}", 3 );
 1065  0
                 append( sb, "", 0 );
 1066  
 
 1067  0
                 append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 );
 1068  0
                 append( sb, "The command-line local repository directory in use for this build (if specified).", 3 );
 1069  0
                 append( sb, "", 0 );
 1070  
 
 1071  0
                 append( sb, "mavenExecutorId (Default: invoker)", 2 );
 1072  0
                 append( sb, "Role hint of the MavenExecutor implementation to use.", 3 );
 1073  0
                 append( sb, "Expression: ${mavenExecutorId}", 3 );
 1074  0
                 append( sb, "", 0 );
 1075  
 
 1076  0
                 append( sb, "mavenHome (Default: ${maven.home})", 2 );
 1077  0
                 append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 );
 1078  0
                 append( sb, "", 0 );
 1079  
 
 1080  0
                 append( sb, "password", 2 );
 1081  0
                 append( sb, "The SCM password to use.", 3 );
 1082  0
                 append( sb, "Expression: ${password}", 3 );
 1083  0
                 append( sb, "", 0 );
 1084  
 
 1085  0
                 append( sb, "pomFileName", 2 );
 1086  0
                 append( sb, "The file name of the POM to execute any goals against.", 3 );
 1087  0
                 append( sb, "Expression: ${pomFileName}", 3 );
 1088  0
                 append( sb, "", 0 );
 1089  
 
 1090  0
                 append( sb, "providerImplementations", 2 );
 1091  0
                 append( sb, "Add a new or overwrite the default implementation per provider. The key is the scm prefix and the value is the role hint of the ScmProvider.", 3 );
 1092  0
                 append( sb, "", 0 );
 1093  
 
 1094  0
                 append( sb, "pushChanges (Default: true)", 2 );
 1095  0
                 append( sb, "Implemented with git will or not push changes to the upstream repository. true by default to preserve backward compatibility.", 3 );
 1096  0
                 append( sb, "Expression: ${pushChanges}", 3 );
 1097  0
                 append( sb, "", 0 );
 1098  
 
 1099  0
                 append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 );
 1100  0
                 append( sb, "The message prefix to use for all SCM changes.", 3 );
 1101  0
                 append( sb, "Expression: ${scmCommentPrefix}", 3 );
 1102  0
                 append( sb, "", 0 );
 1103  
 
 1104  0
                 append( sb, "tag", 2 );
 1105  0
                 append( sb, "The SCM tag to use.", 3 );
 1106  0
                 append( sb, "Expression: ${tag}", 3 );
 1107  0
                 append( sb, "", 0 );
 1108  
 
 1109  0
                 append( sb, "tagBase", 2 );
 1110  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 );
 1111  0
                 append( sb, "Expression: ${tagBase}", 3 );
 1112  0
                 append( sb, "", 0 );
 1113  
 
 1114  0
                 append( sb, "tagNameFormat (Default: @{project.artifactId}-@{project.version})", 2 );
 1115  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 );
 1116  0
                 append( sb, "Expression: ${tagNameFormat}", 3 );
 1117  0
                 append( sb, "", 0 );
 1118  
 
 1119  0
                 append( sb, "username", 2 );
 1120  0
                 append( sb, "The SCM username to use.", 3 );
 1121  0
                 append( sb, "Expression: ${username}", 3 );
 1122  0
                 append( sb, "", 0 );
 1123  
             }
 1124  
         }
 1125  
 
 1126  0
         if ( getLog().isInfoEnabled() )
 1127  
         {
 1128  0
             getLog().info( sb.toString() );
 1129  
         }
 1130  0
     }
 1131  
 
 1132  
     /**
 1133  
      * <p>Repeat a String <code>n</code> times to form a new string.</p>
 1134  
      *
 1135  
      * @param str String to repeat
 1136  
      * @param repeat number of times to repeat str
 1137  
      * @return String with repeated String
 1138  
      * @throws NegativeArraySizeException if <code>repeat < 0</code>
 1139  
      * @throws NullPointerException if str is <code>null</code>
 1140  
      */
 1141  
     private static String repeat( String str, int repeat )
 1142  
     {
 1143  0
         StringBuffer buffer = new StringBuffer( repeat * str.length() );
 1144  
 
 1145  0
         for ( int i = 0; i < repeat; i++ )
 1146  
         {
 1147  0
             buffer.append( str );
 1148  
         }
 1149  
 
 1150  0
         return buffer.toString();
 1151  
     }
 1152  
 
 1153  
     /** 
 1154  
      * Append a description to the buffer by respecting the indentSize and lineLength parameters.
 1155  
      * <b>Note</b>: The last character is always a new line.
 1156  
      * 
 1157  
      * @param sb The buffer to append the description, not <code>null</code>.
 1158  
      * @param description The description, not <code>null</code>.
 1159  
      * @param indent The base indentation level of each line, must not be negative.
 1160  
      */
 1161  
     private void append( StringBuffer sb, String description, int indent )
 1162  
     {
 1163  0
         for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); )
 1164  
         {
 1165  0
             sb.append( it.next().toString() ).append( '\n' );
 1166  
         }
 1167  0
     }
 1168  
 
 1169  
     /** 
 1170  
      * Splits the specified text into lines of convenient display length.
 1171  
      * 
 1172  
      * @param text The text to split into lines, must not be <code>null</code>.
 1173  
      * @param indent The base indentation level of each line, must not be negative.
 1174  
      * @param indentSize The size of each indentation, must not be negative.
 1175  
      * @param lineLength The length of the line, must not be negative.
 1176  
      * @return The sequence of display lines, never <code>null</code>.
 1177  
      * @throws NegativeArraySizeException if <code>indent < 0</code>
 1178  
      */
 1179  
     private static List toLines( String text, int indent, int indentSize, int lineLength )
 1180  
     {
 1181  0
         List<String> lines = new ArrayList<String>();
 1182  
 
 1183  0
         String ind = repeat( "\t", indent );
 1184  0
         String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" );
 1185  0
         for ( int i = 0; i < plainLines.length; i++ )
 1186  
         {
 1187  0
             toLines( lines, ind + plainLines[i], indentSize, lineLength );
 1188  
         }
 1189  
 
 1190  0
         return lines;
 1191  
     }
 1192  
 
 1193  
     /** 
 1194  
      * Adds the specified line to the output sequence, performing line wrapping if necessary.
 1195  
      * 
 1196  
      * @param lines The sequence of display lines, must not be <code>null</code>.
 1197  
      * @param line The line to add, must not be <code>null</code>.
 1198  
      * @param indentSize The size of each indentation, must not be negative.
 1199  
      * @param lineLength The length of the line, must not be negative.
 1200  
      */
 1201  
     private static void toLines( List<String> lines, String line, int indentSize, int lineLength )
 1202  
     {
 1203  0
         int lineIndent = getIndentLevel( line );
 1204  0
         StringBuffer buf = new StringBuffer( 256 );
 1205  0
         String[] tokens = line.split( " +" );
 1206  0
         for ( int i = 0; i < tokens.length; i++ )
 1207  
         {
 1208  0
             String token = tokens[i];
 1209  0
             if ( i > 0 )
 1210  
             {
 1211  0
                 if ( buf.length() + token.length() >= lineLength )
 1212  
                 {
 1213  0
                     lines.add( buf.toString() );
 1214  0
                     buf.setLength( 0 );
 1215  0
                     buf.append( repeat( " ", lineIndent * indentSize ) );
 1216  
                 }
 1217  
                 else
 1218  
                 {
 1219  0
                     buf.append( ' ' );
 1220  
                 }
 1221  
             }
 1222  0
             for ( int j = 0; j < token.length(); j++ )
 1223  
             {
 1224  0
                 char c = token.charAt( j );
 1225  0
                 if ( c == '\t' )
 1226  
                 {
 1227  0
                     buf.append( repeat( " ", indentSize - buf.length() % indentSize ) );
 1228  
                 }
 1229  0
                 else if ( c == '\u00A0' )
 1230  
                 {
 1231  0
                     buf.append( ' ' );
 1232  
                 }
 1233  
                 else
 1234  
                 {
 1235  0
                     buf.append( c );
 1236  
                 }
 1237  
             }
 1238  
         }
 1239  0
         lines.add( buf.toString() );
 1240  0
     }
 1241  
 
 1242  
     /** 
 1243  
      * Gets the indentation level of the specified line.
 1244  
      * 
 1245  
      * @param line The line whose indentation level should be retrieved, must not be <code>null</code>.
 1246  
      * @return The indentation level of the line.
 1247  
      */
 1248  
     private static int getIndentLevel( String line )
 1249  
     {
 1250  0
         int level = 0;
 1251  0
         for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ )
 1252  
         {
 1253  0
             level++;
 1254  
         }
 1255  0
         for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ )
 1256  
         {
 1257  0
             if ( line.charAt( i ) == '\t' )
 1258  
             {
 1259  0
                 level++;
 1260  0
                 break;
 1261  
             }
 1262  
         }
 1263  0
         return level;
 1264  
     }
 1265  
 }