Coverage Report - org.apache.maven.plugin.dependency.HelpMojo
 
Classes in this File Line Coverage Branch Coverage Complexity
HelpMojo
0%
0/916
0%
0/182
9.667
 
 1  
 package org.apache.maven.plugin.dependency;
 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-dependency-plugin.<br/> Call <pre>  mvn dependency:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</pre> to display parameter details.
 12  
  *
 13  
  * @version generated on Wed Jan 07 16:33:25 EST 2009
 14  
  * @author org.apache.maven.tools.plugin.generator.PluginHelpGenerator (version 2.4.3)
 15  
  * @goal help
 16  
  * @requiresProject false
 17  
  */
 18  0
 public class HelpMojo
 19  
     extends AbstractMojo
 20  
 {
 21  
     /**
 22  
      * If <code>true</code>, display all settable properties for each goal.
 23  
      * 
 24  
      * @parameter expression="${detail}" default-value="false"
 25  
      */
 26  
     private boolean detail;
 27  
 
 28  
     /**
 29  
      * The name of the goal for which to show help. If unspecified, all goals will be displayed.
 30  
      * 
 31  
      * @parameter expression="${goal}"
 32  
      */
 33  
     private java.lang.String goal;
 34  
 
 35  
     /**
 36  
      * The maximum length of a display line, should be positive.
 37  
      * 
 38  
      * @parameter expression="${lineLength}" default-value="80"
 39  
      */
 40  
     private int lineLength;
 41  
 
 42  
     /**
 43  
      * The number of spaces per indentation level, should be positive.
 44  
      * 
 45  
      * @parameter expression="${indentSize}" default-value="2"
 46  
      */
 47  
     private int indentSize;
 48  
 
 49  
 
 50  
     /** {@inheritDoc} */
 51  
     public void execute()
 52  
         throws MojoExecutionException
 53  
     {
 54  0
         if ( lineLength <= 0 )
 55  
         {
 56  0
             getLog().warn( "The parameter 'lineLength' should be positive, using '80' as default." );
 57  0
             lineLength = 80;
 58  
         }
 59  0
         if ( indentSize <= 0 )
 60  
         {
 61  0
             getLog().warn( "The parameter 'indentSize' should be positive, using '2' as default." );
 62  0
             indentSize = 2;
 63  
         }
 64  
 
 65  0
         StringBuffer sb = new StringBuffer();
 66  
 
 67  0
         append( sb, "org.apache.maven.plugins:maven-dependency-plugin:2.1", 0 );
 68  0
         append( sb, "", 0 );
 69  
 
 70  0
         append( sb, "Maven Dependency Plugin 2.1", 0 );
 71  0
         append( sb, "Provides utility goals to work with dependencies like copying, unpacking, analyzing, resolving and many more.", 1 );
 72  0
         append( sb, "", 0 );
 73  
 
 74  0
         if ( goal == null || goal.length() <= 0 )
 75  
         {
 76  0
             append( sb, "This plugin has 18 goals:", 0 );
 77  0
             append( sb, "", 0 );
 78  
         }
 79  
 
 80  0
         if ( goal == null || goal.length() <= 0 || "analyze".equals( goal ) )
 81  
         {
 82  0
             append( sb, "dependency:analyze", 0 );
 83  0
             append( sb, "Analyzes the dependencies of this project and determines which are: used and declared; used and undeclared; unused and declared. This goal is intended to be used standalone, thus it always executes the test-compile phase - use the dependency:analyze-only goal instead when participating in the build lifecycle.", 1 );
 84  0
             append( sb, "", 0 );
 85  0
             if ( detail )
 86  
             {
 87  0
                 append( sb, "Available parameters:", 1 );
 88  0
                 append( sb, "", 0 );
 89  
 
 90  0
                 append( sb, "failOnWarning (Default: false)", 2 );
 91  0
                 append( sb, "Whether to fail the build if a dependency warning is found.", 3 );
 92  0
                 append( sb, "", 0 );
 93  
 
 94  0
                 append( sb, "ignoreNonCompile (Default: false)", 2 );
 95  0
                 append( sb, "Ignore Runtime,Provide,Test,System scopes for unused dependency analysis", 3 );
 96  0
                 append( sb, "", 0 );
 97  
 
 98  0
                 append( sb, "outputXML (Default: false)", 2 );
 99  0
                 append( sb, "Output the xml for the missing dependencies", 3 );
 100  0
                 append( sb, "", 0 );
 101  
 
 102  0
                 append( sb, "scriptableFlag (Default: $$$%%%)", 2 );
 103  0
                 append( sb, "Flag to use for scriptable output", 3 );
 104  0
                 append( sb, "", 0 );
 105  
 
 106  0
                 append( sb, "scriptableOutput (Default: false)", 2 );
 107  0
                 append( sb, "Output scriptable values", 3 );
 108  0
                 append( sb, "", 0 );
 109  
 
 110  0
                 append( sb, "verbose (Default: false)", 2 );
 111  0
                 append( sb, "Output used dependencies", 3 );
 112  0
                 append( sb, "", 0 );
 113  
             }
 114  
         }
 115  
 
 116  0
         if ( goal == null || goal.length() <= 0 || "analyze-dep-mgt".equals( goal ) )
 117  
         {
 118  0
             append( sb, "dependency:analyze-dep-mgt", 0 );
 119  0
             append( sb, "This mojo looks at the dependencies after final resolution and looks for mismatches in your dependencyManagement section. In versions of maven prior to 2.0.6, it was possible to inherit versions that didn\'t match your dependencyManagement. See MNG-1577 for more info. This mojo is also usefull for just detecting projects that override the dependencyManagement directly. Set ignoreDirect to false to detect these otherwise normal conditions.", 1 );
 120  0
             append( sb, "", 0 );
 121  0
             if ( detail )
 122  
             {
 123  0
                 append( sb, "Available parameters:", 1 );
 124  0
                 append( sb, "", 0 );
 125  
 
 126  0
                 append( sb, "failBuild (Default: false)", 2 );
 127  0
                 append( sb, "Fail the build if a problem is detected.", 3 );
 128  0
                 append( sb, "", 0 );
 129  
 
 130  0
                 append( sb, "ignoreDirect (Default: true)", 2 );
 131  0
                 append( sb, "Ignore Direct Dependency Overrides of dependencyManagement section.", 3 );
 132  0
                 append( sb, "", 0 );
 133  
             }
 134  
         }
 135  
 
 136  0
         if ( goal == null || goal.length() <= 0 || "analyze-only".equals( goal ) )
 137  
         {
 138  0
             append( sb, "dependency:analyze-only", 0 );
 139  0
             append( sb, "Analyzes the dependencies of this project and determines which are: used and declared; used and undeclared; unused and declared. This goal is intended to be used in the build lifecycle, thus it assumes that the test-compile phase has been executed - use the dependency:analyze goal instead when running standalone.", 1 );
 140  0
             append( sb, "", 0 );
 141  0
             if ( detail )
 142  
             {
 143  0
                 append( sb, "Available parameters:", 1 );
 144  0
                 append( sb, "", 0 );
 145  
 
 146  0
                 append( sb, "failOnWarning (Default: false)", 2 );
 147  0
                 append( sb, "Whether to fail the build if a dependency warning is found.", 3 );
 148  0
                 append( sb, "", 0 );
 149  
 
 150  0
                 append( sb, "ignoreNonCompile (Default: false)", 2 );
 151  0
                 append( sb, "Ignore Runtime,Provide,Test,System scopes for unused dependency analysis", 3 );
 152  0
                 append( sb, "", 0 );
 153  
 
 154  0
                 append( sb, "outputXML (Default: false)", 2 );
 155  0
                 append( sb, "Output the xml for the missing dependencies", 3 );
 156  0
                 append( sb, "", 0 );
 157  
 
 158  0
                 append( sb, "scriptableFlag (Default: $$$%%%)", 2 );
 159  0
                 append( sb, "Flag to use for scriptable output", 3 );
 160  0
                 append( sb, "", 0 );
 161  
 
 162  0
                 append( sb, "scriptableOutput (Default: false)", 2 );
 163  0
                 append( sb, "Output scriptable values", 3 );
 164  0
                 append( sb, "", 0 );
 165  
 
 166  0
                 append( sb, "verbose (Default: false)", 2 );
 167  0
                 append( sb, "Output used dependencies", 3 );
 168  0
                 append( sb, "", 0 );
 169  
             }
 170  
         }
 171  
 
 172  0
         if ( goal == null || goal.length() <= 0 || "analyze-report".equals( goal ) )
 173  
         {
 174  0
             append( sb, "dependency:analyze-report", 0 );
 175  0
             append( sb, "Analyzes the dependencies of this project and produces a report that summarises which are: used and declared; used and undeclared; unused and declared.", 1 );
 176  0
             append( sb, "", 0 );
 177  0
             if ( detail )
 178  
             {
 179  0
                 append( sb, "Available parameters:", 1 );
 180  0
                 append( sb, "", 0 );
 181  
             }
 182  
         }
 183  
 
 184  0
         if ( goal == null || goal.length() <= 0 || "build-classpath".equals( goal ) )
 185  
         {
 186  0
             append( sb, "dependency:build-classpath", 0 );
 187  0
             append( sb, "This goal will output a classpath string of dependencies from the local repository to a file or log.", 1 );
 188  0
             append( sb, "", 0 );
 189  0
             if ( detail )
 190  
             {
 191  0
                 append( sb, "Available parameters:", 1 );
 192  0
                 append( sb, "", 0 );
 193  
 
 194  0
                 append( sb, "attach (Default: false)", 2 );
 195  0
                 append( sb, "Attach the classpath file to the main artifact so it can be installed and deployed.", 3 );
 196  0
                 append( sb, "", 0 );
 197  
 
 198  0
                 append( sb, "classifier", 2 );
 199  0
                 append( sb, "Specify classifier to look for. Example: sources", 3 );
 200  0
                 append( sb, "", 0 );
 201  
 
 202  0
                 append( sb, "cpFile", 2 );
 203  0
                 append( sb, "Deprecated. use outputFile instead", 3 );
 204  0
                 append( sb, "", 0 );
 205  0
                 append( sb, "The file to write the classpath string. If undefined, it just prints the classpath as [INFO]. This parameter is deprecated. Use outputFile instead.", 3 );
 206  0
                 append( sb, "", 0 );
 207  
 
 208  0
                 append( sb, "excludeArtifactIds", 2 );
 209  0
                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
 210  0
                 append( sb, "", 0 );
 211  
 
 212  0
                 append( sb, "excludeClassifiers", 2 );
 213  0
                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 214  0
                 append( sb, "", 0 );
 215  
 
 216  0
                 append( sb, "excludeGroupIds", 2 );
 217  0
                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
 218  0
                 append( sb, "", 0 );
 219  
 
 220  0
                 append( sb, "excludeScope", 2 );
 221  0
                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
 222  0
                 append( sb, "", 0 );
 223  
 
 224  0
                 append( sb, "excludeTransitive (Default: false)", 2 );
 225  0
                 append( sb, "If we should exclude transitive dependencies", 3 );
 226  0
                 append( sb, "", 0 );
 227  
 
 228  0
                 append( sb, "excludeTypes", 2 );
 229  0
                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 230  0
                 append( sb, "", 0 );
 231  
 
 232  0
                 append( sb, "fileSeparator", 2 );
 233  0
                 append( sb, "Override the char used between the paths. This field is initialized to contain the first character of the value of the system property file.separator. On UNIX systems the value of this field is \'/\'; on Microsoft Windows systems it is \'\\\'. The default is File.separator", 3 );
 234  0
                 append( sb, "", 0 );
 235  
 
 236  0
                 append( sb, "includeArtifactIds", 2 );
 237  0
                 append( sb, "Comma separated list of Artifact names to include.", 3 );
 238  0
                 append( sb, "", 0 );
 239  
 
 240  0
                 append( sb, "includeClassifiers", 2 );
 241  0
                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
 242  0
                 append( sb, "", 0 );
 243  
 
 244  0
                 append( sb, "includeGroupIds", 2 );
 245  0
                 append( sb, "Comma separated list of GroupIds to include.", 3 );
 246  0
                 append( sb, "", 0 );
 247  
 
 248  0
                 append( sb, "includeScope", 2 );
 249  0
                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
 250  0
                 append( sb, "", 0 );
 251  
 
 252  0
                 append( sb, "includeTypes", 2 );
 253  0
                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
 254  0
                 append( sb, "", 0 );
 255  
 
 256  0
                 append( sb, "localRepoProperty", 2 );
 257  0
                 append( sb, "Replace the absolute path to the local repo with this property. This field is ignored it prefix is declared. The value will be forced to \'${M2_REPO}\' if no value is provided AND the attach flag is true.", 3 );
 258  0
                 append( sb, "", 0 );
 259  
 
 260  0
                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
 261  0
                 append( sb, "Directory to store flag files", 3 );
 262  0
                 append( sb, "", 0 );
 263  
 
 264  0
                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
 265  0
                 append( sb, "Output absolute filename for resolved artifacts", 3 );
 266  0
                 append( sb, "", 0 );
 267  
 
 268  0
                 append( sb, "outputFile", 2 );
 269  0
                 append( sb, "The file to write the classpath string. If undefined, it just prints the classpath as [INFO].", 3 );
 270  0
                 append( sb, "", 0 );
 271  
 
 272  0
                 append( sb, "outputFilterFile (Default: false)", 2 );
 273  0
                 append( sb, "Write out the classpath in a format compatible with filtering (classpath=xxxxx)", 3 );
 274  0
                 append( sb, "", 0 );
 275  
 
 276  0
                 append( sb, "overWriteIfNewer (Default: true)", 2 );
 277  0
                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
 278  0
                 append( sb, "", 0 );
 279  
 
 280  0
                 append( sb, "overWriteReleases (Default: false)", 2 );
 281  0
                 append( sb, "Overwrite release artifacts", 3 );
 282  0
                 append( sb, "", 0 );
 283  
 
 284  0
                 append( sb, "overWriteSnapshots (Default: false)", 2 );
 285  0
                 append( sb, "Overwrite snapshot artifacts", 3 );
 286  0
                 append( sb, "", 0 );
 287  
 
 288  0
                 append( sb, "pathSeparator", 2 );
 289  0
                 append( sb, "Override the char used between path folders. The system-dependent path-separator character. This field is initialized to contain the first character of the value of the system property path.separator. This character is used to separate filenames in a sequence of files given as a path list. On UNIX systems, this character is \':\'; on Microsoft Windows systems it is \';\'.", 3 );
 290  0
                 append( sb, "", 0 );
 291  
 
 292  0
                 append( sb, "prefix", 2 );
 293  0
                 append( sb, "The prefix to prepend on each dependent artifact. If undefined, the paths refer to the actual files store in the local repository (the stipVersion parameter does nothing then).", 3 );
 294  0
                 append( sb, "", 0 );
 295  
 
 296  0
                 append( sb, "regenerateFile (Default: false)", 2 );
 297  0
                 append( sb, "If \'true\', it skips the up-to-date-check, and always regenerates the classpath file.", 3 );
 298  0
                 append( sb, "", 0 );
 299  
 
 300  0
                 append( sb, "silent (Default: false)", 2 );
 301  0
                 append( sb, "If the plugin should be silent.", 3 );
 302  0
                 append( sb, "", 0 );
 303  
 
 304  0
                 append( sb, "stripVersion (Default: false)", 2 );
 305  0
                 append( sb, "Strip artifact version during copy (only works if prefix is set)", 3 );
 306  0
                 append( sb, "", 0 );
 307  
 
 308  0
                 append( sb, "type (Default: java-source)", 2 );
 309  0
                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
 310  0
                 append( sb, "", 0 );
 311  
             }
 312  
         }
 313  
 
 314  0
         if ( goal == null || goal.length() <= 0 || "copy".equals( goal ) )
 315  
         {
 316  0
             append( sb, "dependency:copy", 0 );
 317  0
             append( sb, "Goal that copies a list of artifacts from the repository to defined locations.", 1 );
 318  0
             append( sb, "", 0 );
 319  0
             if ( detail )
 320  
             {
 321  0
                 append( sb, "Available parameters:", 1 );
 322  0
                 append( sb, "", 0 );
 323  
 
 324  0
                 append( sb, "artifactItems", 2 );
 325  0
                 append( sb, "Collection of ArtifactItems to work on. (ArtifactItem contains groupId, artifactId, version, type, classifier, location, destFile, markerFile and overwrite.) See \'Usage\' and \'Javadoc\' for details.", 3 );
 326  0
                 append( sb, "", 0 );
 327  
 
 328  0
                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
 329  0
                 append( sb, "Output absolute filename for resolved artifacts", 3 );
 330  0
                 append( sb, "", 0 );
 331  
 
 332  0
                 append( sb, "outputDirectory (Default: ${project.build.directory}/dependency)", 2 );
 333  0
                 append( sb, "Default location used for mojo unless overridden in ArtifactItem", 3 );
 334  0
                 append( sb, "", 0 );
 335  
 
 336  0
                 append( sb, "overWriteIfNewer (Default: true)", 2 );
 337  0
                 append( sb, "Overwrite if newer", 3 );
 338  0
                 append( sb, "", 0 );
 339  
 
 340  0
                 append( sb, "overWriteReleases (Default: false)", 2 );
 341  0
                 append( sb, "Overwrite release artifacts", 3 );
 342  0
                 append( sb, "", 0 );
 343  
 
 344  0
                 append( sb, "overWriteSnapshots (Default: false)", 2 );
 345  0
                 append( sb, "Overwrite snapshot artifacts", 3 );
 346  0
                 append( sb, "", 0 );
 347  
 
 348  0
                 append( sb, "silent (Default: false)", 2 );
 349  0
                 append( sb, "If the plugin should be silent.", 3 );
 350  0
                 append( sb, "", 0 );
 351  
 
 352  0
                 append( sb, "stripVersion (Default: false)", 2 );
 353  0
                 append( sb, "Strip artifact version during copy", 3 );
 354  0
                 append( sb, "", 0 );
 355  
             }
 356  
         }
 357  
 
 358  0
         if ( goal == null || goal.length() <= 0 || "copy-dependencies".equals( goal ) )
 359  
         {
 360  0
             append( sb, "dependency:copy-dependencies", 0 );
 361  0
             append( sb, "Goal that copies the project dependencies from the repository to a defined location.", 1 );
 362  0
             append( sb, "", 0 );
 363  0
             if ( detail )
 364  
             {
 365  0
                 append( sb, "Available parameters:", 1 );
 366  0
                 append( sb, "", 0 );
 367  
 
 368  0
                 append( sb, "classifier", 2 );
 369  0
                 append( sb, "Specify classifier to look for. Example: sources", 3 );
 370  0
                 append( sb, "", 0 );
 371  
 
 372  0
                 append( sb, "copyPom (Default: false)", 2 );
 373  0
                 append( sb, "Also copy the pom of each artifact.", 3 );
 374  0
                 append( sb, "", 0 );
 375  
 
 376  0
                 append( sb, "excludeArtifactIds", 2 );
 377  0
                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
 378  0
                 append( sb, "", 0 );
 379  
 
 380  0
                 append( sb, "excludeClassifiers", 2 );
 381  0
                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 382  0
                 append( sb, "", 0 );
 383  
 
 384  0
                 append( sb, "excludeGroupIds", 2 );
 385  0
                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
 386  0
                 append( sb, "", 0 );
 387  
 
 388  0
                 append( sb, "excludeScope", 2 );
 389  0
                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
 390  0
                 append( sb, "", 0 );
 391  
 
 392  0
                 append( sb, "excludeTransitive (Default: false)", 2 );
 393  0
                 append( sb, "If we should exclude transitive dependencies", 3 );
 394  0
                 append( sb, "", 0 );
 395  
 
 396  0
                 append( sb, "excludeTypes", 2 );
 397  0
                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 398  0
                 append( sb, "", 0 );
 399  
 
 400  0
                 append( sb, "failOnMissingClassifierArtifact (Default: true)", 2 );
 401  0
                 append( sb, "This only applies if the classifier parameter is used.", 3 );
 402  0
                 append( sb, "", 0 );
 403  
 
 404  0
                 append( sb, "includeArtifactIds", 2 );
 405  0
                 append( sb, "Comma separated list of Artifact names to include.", 3 );
 406  0
                 append( sb, "", 0 );
 407  
 
 408  0
                 append( sb, "includeClassifiers", 2 );
 409  0
                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
 410  0
                 append( sb, "", 0 );
 411  
 
 412  0
                 append( sb, "includeGroupIds", 2 );
 413  0
                 append( sb, "Comma separated list of GroupIds to include.", 3 );
 414  0
                 append( sb, "", 0 );
 415  
 
 416  0
                 append( sb, "includeScope", 2 );
 417  0
                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
 418  0
                 append( sb, "", 0 );
 419  
 
 420  0
                 append( sb, "includeTypes", 2 );
 421  0
                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
 422  0
                 append( sb, "", 0 );
 423  
 
 424  0
                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
 425  0
                 append( sb, "Directory to store flag files", 3 );
 426  0
                 append( sb, "", 0 );
 427  
 
 428  0
                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
 429  0
                 append( sb, "Output absolute filename for resolved artifacts", 3 );
 430  0
                 append( sb, "", 0 );
 431  
 
 432  0
                 append( sb, "outputDirectory (Default: ${project.build.directory}/dependency)", 2 );
 433  0
                 append( sb, "Default location used for mojo unless overridden in ArtifactItem", 3 );
 434  0
                 append( sb, "", 0 );
 435  
 
 436  0
                 append( sb, "overWriteIfNewer (Default: true)", 2 );
 437  0
                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
 438  0
                 append( sb, "", 0 );
 439  
 
 440  0
                 append( sb, "overWriteReleases (Default: false)", 2 );
 441  0
                 append( sb, "Overwrite release artifacts", 3 );
 442  0
                 append( sb, "", 0 );
 443  
 
 444  0
                 append( sb, "overWriteSnapshots (Default: false)", 2 );
 445  0
                 append( sb, "Overwrite snapshot artifacts", 3 );
 446  0
                 append( sb, "", 0 );
 447  
 
 448  0
                 append( sb, "silent (Default: false)", 2 );
 449  0
                 append( sb, "If the plugin should be silent.", 3 );
 450  0
                 append( sb, "", 0 );
 451  
 
 452  0
                 append( sb, "stripVersion (Default: false)", 2 );
 453  0
                 append( sb, "Strip artifact version during copy", 3 );
 454  0
                 append( sb, "", 0 );
 455  
 
 456  0
                 append( sb, "type (Default: java-source)", 2 );
 457  0
                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
 458  0
                 append( sb, "", 0 );
 459  
 
 460  0
                 append( sb, "useRepositoryLayout (Default: false)", 2 );
 461  0
                 append( sb, "Place each artifact in the same directory layout as a default repository.\nexample: /outputDirectory/junit/junit/3.8.1/junit-3.8.1.jar", 3 );
 462  0
                 append( sb, "", 0 );
 463  
 
 464  0
                 append( sb, "useSubDirectoryPerArtifact (Default: false)", 2 );
 465  0
                 append( sb, "Place each file in a separate subdirectory. (example /outputDirectory/junit-3.8.1-jar)", 3 );
 466  0
                 append( sb, "", 0 );
 467  
 
 468  0
                 append( sb, "useSubDirectoryPerType (Default: false)", 2 );
 469  0
                 append( sb, "Place each type of file in a separate subdirectory. (example /outputDirectory/jars /outputDirectory/wars etc)", 3 );
 470  0
                 append( sb, "", 0 );
 471  
             }
 472  
         }
 473  
 
 474  0
         if ( goal == null || goal.length() <= 0 || "get".equals( goal ) )
 475  
         {
 476  0
             append( sb, "dependency:get", 0 );
 477  0
             append( sb, "Downloads a single artifact transitively from a specified remote repository.", 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, "artifact", 2 );
 485  0
                 append( sb, "A string of the form groupId:artifactId:version[:packaging].", 3 );
 486  0
                 append( sb, "", 0 );
 487  
 
 488  0
                 append( sb, "artifactId", 2 );
 489  0
                 append( sb, "The artifactId of the artifact to download", 3 );
 490  0
                 append( sb, "", 0 );
 491  
 
 492  0
                 append( sb, "groupId", 2 );
 493  0
                 append( sb, "The groupId of the artifact to download", 3 );
 494  0
                 append( sb, "", 0 );
 495  
 
 496  0
                 append( sb, "packaging (Default: jar)", 2 );
 497  0
                 append( sb, "The packaging of the artifact to download", 3 );
 498  0
                 append( sb, "", 0 );
 499  
 
 500  0
                 append( sb, "repositoryId (Default: temp)", 2 );
 501  0
                 append( sb, "The id of the repository from which we\'ll download the artifact", 3 );
 502  0
                 append( sb, "", 0 );
 503  
 
 504  0
                 append( sb, "repositoryUrl", 2 );
 505  0
                 append( sb, "The url of the repository from which we\'ll download the artifact", 3 );
 506  0
                 append( sb, "", 0 );
 507  
 
 508  0
                 append( sb, "transitive (Default: true)", 2 );
 509  0
                 append( sb, "Download transitively, retrieving the specified artifact and all of its dependencies.", 3 );
 510  0
                 append( sb, "", 0 );
 511  
 
 512  0
                 append( sb, "version", 2 );
 513  0
                 append( sb, "The version of the artifact to download", 3 );
 514  0
                 append( sb, "", 0 );
 515  
             }
 516  
         }
 517  
 
 518  0
         if ( goal == null || goal.length() <= 0 || "go-offline".equals( goal ) )
 519  
         {
 520  0
             append( sb, "dependency:go-offline", 0 );
 521  0
             append( sb, "Goal that resolves all project dependencies, including plugins and reports and their dependencies.", 1 );
 522  0
             append( sb, "", 0 );
 523  0
             if ( detail )
 524  
             {
 525  0
                 append( sb, "Available parameters:", 1 );
 526  0
                 append( sb, "", 0 );
 527  
 
 528  0
                 append( sb, "classifier", 2 );
 529  0
                 append( sb, "Specify classifier to look for. Example: sources", 3 );
 530  0
                 append( sb, "", 0 );
 531  
 
 532  0
                 append( sb, "excludeArtifactIds", 2 );
 533  0
                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
 534  0
                 append( sb, "", 0 );
 535  
 
 536  0
                 append( sb, "excludeClassifiers", 2 );
 537  0
                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 538  0
                 append( sb, "", 0 );
 539  
 
 540  0
                 append( sb, "excludeGroupIds", 2 );
 541  0
                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
 542  0
                 append( sb, "", 0 );
 543  
 
 544  0
                 append( sb, "excludeScope", 2 );
 545  0
                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
 546  0
                 append( sb, "", 0 );
 547  
 
 548  0
                 append( sb, "excludeTransitive (Default: false)", 2 );
 549  0
                 append( sb, "If we should exclude transitive dependencies", 3 );
 550  0
                 append( sb, "", 0 );
 551  
 
 552  0
                 append( sb, "excludeTypes", 2 );
 553  0
                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 554  0
                 append( sb, "", 0 );
 555  
 
 556  0
                 append( sb, "includeArtifactIds", 2 );
 557  0
                 append( sb, "Comma separated list of Artifact names to include.", 3 );
 558  0
                 append( sb, "", 0 );
 559  
 
 560  0
                 append( sb, "includeClassifiers", 2 );
 561  0
                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
 562  0
                 append( sb, "", 0 );
 563  
 
 564  0
                 append( sb, "includeGroupIds", 2 );
 565  0
                 append( sb, "Comma separated list of GroupIds to include.", 3 );
 566  0
                 append( sb, "", 0 );
 567  
 
 568  0
                 append( sb, "includeScope", 2 );
 569  0
                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
 570  0
                 append( sb, "", 0 );
 571  
 
 572  0
                 append( sb, "includeTypes", 2 );
 573  0
                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
 574  0
                 append( sb, "", 0 );
 575  
 
 576  0
                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
 577  0
                 append( sb, "Directory to store flag files", 3 );
 578  0
                 append( sb, "", 0 );
 579  
 
 580  0
                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
 581  0
                 append( sb, "Output absolute filename for resolved artifacts", 3 );
 582  0
                 append( sb, "", 0 );
 583  
 
 584  0
                 append( sb, "outputFile", 2 );
 585  0
                 append( sb, "If specified, this parameter will cause the dependencies to be written to the path specified, instead of writing to the console.", 3 );
 586  0
                 append( sb, "", 0 );
 587  
 
 588  0
                 append( sb, "overWriteIfNewer (Default: true)", 2 );
 589  0
                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
 590  0
                 append( sb, "", 0 );
 591  
 
 592  0
                 append( sb, "overWriteReleases (Default: false)", 2 );
 593  0
                 append( sb, "Overwrite release artifacts", 3 );
 594  0
                 append( sb, "", 0 );
 595  
 
 596  0
                 append( sb, "overWriteSnapshots (Default: false)", 2 );
 597  0
                 append( sb, "Overwrite snapshot artifacts", 3 );
 598  0
                 append( sb, "", 0 );
 599  
 
 600  0
                 append( sb, "silent (Default: false)", 2 );
 601  0
                 append( sb, "If the plugin should be silent.", 3 );
 602  0
                 append( sb, "", 0 );
 603  
 
 604  0
                 append( sb, "type (Default: java-source)", 2 );
 605  0
                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
 606  0
                 append( sb, "", 0 );
 607  
             }
 608  
         }
 609  
 
 610  0
         if ( goal == null || goal.length() <= 0 || "help".equals( goal ) )
 611  
         {
 612  0
             append( sb, "dependency:help", 0 );
 613  0
             append( sb, "Display help information on maven-dependency-plugin.\nCall\n\u00a0\u00a0mvn\u00a0dependency:help\u00a0-Ddetail=true\u00a0-Dgoal=<goal-name>\nto display parameter details.", 1 );
 614  0
             append( sb, "", 0 );
 615  0
             if ( detail )
 616  
             {
 617  0
                 append( sb, "Available parameters:", 1 );
 618  0
                 append( sb, "", 0 );
 619  
 
 620  0
                 append( sb, "detail (Default: false)", 2 );
 621  0
                 append( sb, "If true, display all settable properties for each goal.", 3 );
 622  0
                 append( sb, "", 0 );
 623  
 
 624  0
                 append( sb, "goal", 2 );
 625  0
                 append( sb, "The name of the goal for which to show help. If unspecified, all goals will be displayed.", 3 );
 626  0
                 append( sb, "", 0 );
 627  
 
 628  0
                 append( sb, "lineLength (Default: 80)", 2 );
 629  0
                 append( sb, "The maximum length of a display line, should be positive.", 3 );
 630  0
                 append( sb, "", 0 );
 631  
 
 632  0
                 append( sb, "indentSize (Default: 2)", 2 );
 633  0
                 append( sb, "The number of spaces per indentation level, should be positive.", 3 );
 634  0
                 append( sb, "", 0 );
 635  
             }
 636  
         }
 637  
 
 638  0
         if ( goal == null || goal.length() <= 0 || "list".equals( goal ) )
 639  
         {
 640  0
             append( sb, "dependency:list", 0 );
 641  0
             append( sb, "Displays the list of dependencies for this project.", 1 );
 642  0
             append( sb, "", 0 );
 643  0
             if ( detail )
 644  
             {
 645  0
                 append( sb, "Available parameters:", 1 );
 646  0
                 append( sb, "", 0 );
 647  
 
 648  0
                 append( sb, "classifier", 2 );
 649  0
                 append( sb, "Specify classifier to look for. Example: sources", 3 );
 650  0
                 append( sb, "", 0 );
 651  
 
 652  0
                 append( sb, "excludeArtifactIds", 2 );
 653  0
                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
 654  0
                 append( sb, "", 0 );
 655  
 
 656  0
                 append( sb, "excludeClassifiers", 2 );
 657  0
                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 658  0
                 append( sb, "", 0 );
 659  
 
 660  0
                 append( sb, "excludeGroupIds", 2 );
 661  0
                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
 662  0
                 append( sb, "", 0 );
 663  
 
 664  0
                 append( sb, "excludeScope", 2 );
 665  0
                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
 666  0
                 append( sb, "", 0 );
 667  
 
 668  0
                 append( sb, "excludeTransitive (Default: false)", 2 );
 669  0
                 append( sb, "If we should exclude transitive dependencies", 3 );
 670  0
                 append( sb, "", 0 );
 671  
 
 672  0
                 append( sb, "excludeTypes", 2 );
 673  0
                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 674  0
                 append( sb, "", 0 );
 675  
 
 676  0
                 append( sb, "includeArtifactIds", 2 );
 677  0
                 append( sb, "Comma separated list of Artifact names to include.", 3 );
 678  0
                 append( sb, "", 0 );
 679  
 
 680  0
                 append( sb, "includeClassifiers", 2 );
 681  0
                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
 682  0
                 append( sb, "", 0 );
 683  
 
 684  0
                 append( sb, "includeGroupIds", 2 );
 685  0
                 append( sb, "Comma separated list of GroupIds to include.", 3 );
 686  0
                 append( sb, "", 0 );
 687  
 
 688  0
                 append( sb, "includeScope", 2 );
 689  0
                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
 690  0
                 append( sb, "", 0 );
 691  
 
 692  0
                 append( sb, "includeTypes", 2 );
 693  0
                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
 694  0
                 append( sb, "", 0 );
 695  
 
 696  0
                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
 697  0
                 append( sb, "Directory to store flag files", 3 );
 698  0
                 append( sb, "", 0 );
 699  
 
 700  0
                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
 701  0
                 append( sb, "Output absolute filename for resolved artifacts", 3 );
 702  0
                 append( sb, "", 0 );
 703  
 
 704  0
                 append( sb, "outputFile", 2 );
 705  0
                 append( sb, "If specified, this parameter will cause the dependencies to be written to the path specified, instead of writing to the console.", 3 );
 706  0
                 append( sb, "", 0 );
 707  
 
 708  0
                 append( sb, "outputScope (Default: true)", 2 );
 709  0
                 append( sb, "If we should display the scope when resolving", 3 );
 710  0
                 append( sb, "", 0 );
 711  
 
 712  0
                 append( sb, "overWriteIfNewer (Default: true)", 2 );
 713  0
                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
 714  0
                 append( sb, "", 0 );
 715  
 
 716  0
                 append( sb, "overWriteReleases (Default: false)", 2 );
 717  0
                 append( sb, "Overwrite release artifacts", 3 );
 718  0
                 append( sb, "", 0 );
 719  
 
 720  0
                 append( sb, "overWriteSnapshots (Default: false)", 2 );
 721  0
                 append( sb, "Overwrite snapshot artifacts", 3 );
 722  0
                 append( sb, "", 0 );
 723  
 
 724  0
                 append( sb, "silent (Default: false)", 2 );
 725  0
                 append( sb, "If the plugin should be silent.", 3 );
 726  0
                 append( sb, "", 0 );
 727  
 
 728  0
                 append( sb, "type (Default: java-source)", 2 );
 729  0
                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
 730  0
                 append( sb, "", 0 );
 731  
             }
 732  
         }
 733  
 
 734  0
         if ( goal == null || goal.length() <= 0 || "purge-local-repository".equals( goal ) )
 735  
         {
 736  0
             append( sb, "dependency:purge-local-repository", 0 );
 737  0
             append( sb, "Remove the project dependencies from the local repository, and optionally re-resolve them.", 1 );
 738  0
             append( sb, "", 0 );
 739  0
             if ( detail )
 740  
             {
 741  0
                 append( sb, "Available parameters:", 1 );
 742  0
                 append( sb, "", 0 );
 743  
 
 744  0
                 append( sb, "actTransitively (Default: true)", 2 );
 745  0
                 append( sb, "Whether this mojo should act on all transitive dependencies. Default value is true.", 3 );
 746  0
                 append( sb, "", 0 );
 747  
 
 748  0
                 append( sb, "exclude", 2 );
 749  0
                 append( sb, "Comma-separated list of groupId:artifactId entries, which should be used to exclude artifacts from deletion/refresh. This is a command-line alternative to the excludes parameter, since List parameters are not currently compatible with CLI specification.", 3 );
 750  0
                 append( sb, "", 0 );
 751  
 
 752  0
                 append( sb, "excludes", 2 );
 753  0
                 append( sb, "The list of dependencies in the form of groupId:artifactId which should NOT be deleted/refreshed. This is useful for third-party artifacts.", 3 );
 754  0
                 append( sb, "", 0 );
 755  
 
 756  0
                 append( sb, "reResolve (Default: true)", 2 );
 757  0
                 append( sb, "Whether to re-resolve the artifacts once they have been deleted from the local repository. If you are running this mojo from the command-line, you may want to disable this. By default, artifacts will be re-resolved.", 3 );
 758  0
                 append( sb, "", 0 );
 759  
 
 760  0
                 append( sb, "resolutionFuzziness (Default: file)", 2 );
 761  0
                 append( sb, "Determines how liberally the plugin will delete an artifact from the local repository. Values are:\n\n-\tfile (default) - Eliminate only the artifact\'s file.\n-\tversion - Eliminate all files associated with the artifact\'s version.\n-\tartifactId - Eliminate all files associated with the artifact\'s artifactId.\n-\tgroupId - Eliminate all files associated with the artifact\'s groupId.\n", 3 );
 762  0
                 append( sb, "", 0 );
 763  
 
 764  0
                 append( sb, "verbose (Default: false)", 2 );
 765  0
                 append( sb, "Whether this plugin should output verbose messages. Default is false.", 3 );
 766  0
                 append( sb, "", 0 );
 767  
             }
 768  
         }
 769  
 
 770  0
         if ( goal == null || goal.length() <= 0 || "resolve".equals( goal ) )
 771  
         {
 772  0
             append( sb, "dependency:resolve", 0 );
 773  0
             append( sb, "Goal that resolves the project dependencies from the repository.", 1 );
 774  0
             append( sb, "", 0 );
 775  0
             if ( detail )
 776  
             {
 777  0
                 append( sb, "Available parameters:", 1 );
 778  0
                 append( sb, "", 0 );
 779  
 
 780  0
                 append( sb, "classifier", 2 );
 781  0
                 append( sb, "Specify classifier to look for. Example: sources", 3 );
 782  0
                 append( sb, "", 0 );
 783  
 
 784  0
                 append( sb, "excludeArtifactIds", 2 );
 785  0
                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
 786  0
                 append( sb, "", 0 );
 787  
 
 788  0
                 append( sb, "excludeClassifiers", 2 );
 789  0
                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 790  0
                 append( sb, "", 0 );
 791  
 
 792  0
                 append( sb, "excludeGroupIds", 2 );
 793  0
                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
 794  0
                 append( sb, "", 0 );
 795  
 
 796  0
                 append( sb, "excludeScope", 2 );
 797  0
                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
 798  0
                 append( sb, "", 0 );
 799  
 
 800  0
                 append( sb, "excludeTransitive (Default: false)", 2 );
 801  0
                 append( sb, "If we should exclude transitive dependencies", 3 );
 802  0
                 append( sb, "", 0 );
 803  
 
 804  0
                 append( sb, "excludeTypes", 2 );
 805  0
                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 806  0
                 append( sb, "", 0 );
 807  
 
 808  0
                 append( sb, "includeArtifactIds", 2 );
 809  0
                 append( sb, "Comma separated list of Artifact names to include.", 3 );
 810  0
                 append( sb, "", 0 );
 811  
 
 812  0
                 append( sb, "includeClassifiers", 2 );
 813  0
                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
 814  0
                 append( sb, "", 0 );
 815  
 
 816  0
                 append( sb, "includeGroupIds", 2 );
 817  0
                 append( sb, "Comma separated list of GroupIds to include.", 3 );
 818  0
                 append( sb, "", 0 );
 819  
 
 820  0
                 append( sb, "includeScope", 2 );
 821  0
                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
 822  0
                 append( sb, "", 0 );
 823  
 
 824  0
                 append( sb, "includeTypes", 2 );
 825  0
                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
 826  0
                 append( sb, "", 0 );
 827  
 
 828  0
                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
 829  0
                 append( sb, "Directory to store flag files", 3 );
 830  0
                 append( sb, "", 0 );
 831  
 
 832  0
                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
 833  0
                 append( sb, "Output absolute filename for resolved artifacts", 3 );
 834  0
                 append( sb, "", 0 );
 835  
 
 836  0
                 append( sb, "outputFile", 2 );
 837  0
                 append( sb, "If specified, this parameter will cause the dependencies to be written to the path specified, instead of writing to the console.", 3 );
 838  0
                 append( sb, "", 0 );
 839  
 
 840  0
                 append( sb, "outputScope (Default: true)", 2 );
 841  0
                 append( sb, "If we should display the scope when resolving", 3 );
 842  0
                 append( sb, "", 0 );
 843  
 
 844  0
                 append( sb, "overWriteIfNewer (Default: true)", 2 );
 845  0
                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
 846  0
                 append( sb, "", 0 );
 847  
 
 848  0
                 append( sb, "overWriteReleases (Default: false)", 2 );
 849  0
                 append( sb, "Overwrite release artifacts", 3 );
 850  0
                 append( sb, "", 0 );
 851  
 
 852  0
                 append( sb, "overWriteSnapshots (Default: false)", 2 );
 853  0
                 append( sb, "Overwrite snapshot artifacts", 3 );
 854  0
                 append( sb, "", 0 );
 855  
 
 856  0
                 append( sb, "silent (Default: false)", 2 );
 857  0
                 append( sb, "If the plugin should be silent.", 3 );
 858  0
                 append( sb, "", 0 );
 859  
 
 860  0
                 append( sb, "type (Default: java-source)", 2 );
 861  0
                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
 862  0
                 append( sb, "", 0 );
 863  
             }
 864  
         }
 865  
 
 866  0
         if ( goal == null || goal.length() <= 0 || "resolve-plugins".equals( goal ) )
 867  
         {
 868  0
             append( sb, "dependency:resolve-plugins", 0 );
 869  0
             append( sb, "Goal that resolves all project plugins and reports and their dependencies.", 1 );
 870  0
             append( sb, "", 0 );
 871  0
             if ( detail )
 872  
             {
 873  0
                 append( sb, "Available parameters:", 1 );
 874  0
                 append( sb, "", 0 );
 875  
 
 876  0
                 append( sb, "classifier", 2 );
 877  0
                 append( sb, "Specify classifier to look for. Example: sources", 3 );
 878  0
                 append( sb, "", 0 );
 879  
 
 880  0
                 append( sb, "excludeArtifactIds", 2 );
 881  0
                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
 882  0
                 append( sb, "", 0 );
 883  
 
 884  0
                 append( sb, "excludeClassifiers", 2 );
 885  0
                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 886  0
                 append( sb, "", 0 );
 887  
 
 888  0
                 append( sb, "excludeGroupIds", 2 );
 889  0
                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
 890  0
                 append( sb, "", 0 );
 891  
 
 892  0
                 append( sb, "excludeScope", 2 );
 893  0
                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
 894  0
                 append( sb, "", 0 );
 895  
 
 896  0
                 append( sb, "excludeTransitive (Default: false)", 2 );
 897  0
                 append( sb, "If we should exclude transitive dependencies", 3 );
 898  0
                 append( sb, "", 0 );
 899  
 
 900  0
                 append( sb, "excludeTypes", 2 );
 901  0
                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 902  0
                 append( sb, "", 0 );
 903  
 
 904  0
                 append( sb, "includeArtifactIds", 2 );
 905  0
                 append( sb, "Comma separated list of Artifact names to include.", 3 );
 906  0
                 append( sb, "", 0 );
 907  
 
 908  0
                 append( sb, "includeClassifiers", 2 );
 909  0
                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
 910  0
                 append( sb, "", 0 );
 911  
 
 912  0
                 append( sb, "includeGroupIds", 2 );
 913  0
                 append( sb, "Comma separated list of GroupIds to include.", 3 );
 914  0
                 append( sb, "", 0 );
 915  
 
 916  0
                 append( sb, "includeScope", 2 );
 917  0
                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
 918  0
                 append( sb, "", 0 );
 919  
 
 920  0
                 append( sb, "includeTypes", 2 );
 921  0
                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
 922  0
                 append( sb, "", 0 );
 923  
 
 924  0
                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
 925  0
                 append( sb, "Directory to store flag files", 3 );
 926  0
                 append( sb, "", 0 );
 927  
 
 928  0
                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
 929  0
                 append( sb, "Output absolute filename for resolved artifacts", 3 );
 930  0
                 append( sb, "", 0 );
 931  
 
 932  0
                 append( sb, "outputFile", 2 );
 933  0
                 append( sb, "If specified, this parameter will cause the dependencies to be written to the path specified, instead of writing to the console.", 3 );
 934  0
                 append( sb, "", 0 );
 935  
 
 936  0
                 append( sb, "overWriteIfNewer (Default: true)", 2 );
 937  0
                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
 938  0
                 append( sb, "", 0 );
 939  
 
 940  0
                 append( sb, "overWriteReleases (Default: false)", 2 );
 941  0
                 append( sb, "Overwrite release artifacts", 3 );
 942  0
                 append( sb, "", 0 );
 943  
 
 944  0
                 append( sb, "overWriteSnapshots (Default: false)", 2 );
 945  0
                 append( sb, "Overwrite snapshot artifacts", 3 );
 946  0
                 append( sb, "", 0 );
 947  
 
 948  0
                 append( sb, "silent (Default: false)", 2 );
 949  0
                 append( sb, "If the plugin should be silent.", 3 );
 950  0
                 append( sb, "", 0 );
 951  
 
 952  0
                 append( sb, "type (Default: java-source)", 2 );
 953  0
                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
 954  0
                 append( sb, "", 0 );
 955  
             }
 956  
         }
 957  
 
 958  0
         if ( goal == null || goal.length() <= 0 || "sources".equals( goal ) )
 959  
         {
 960  0
             append( sb, "dependency:sources", 0 );
 961  0
             append( sb, "Goal that resolves the project source dependencies from the repository.", 1 );
 962  0
             append( sb, "", 0 );
 963  0
             if ( detail )
 964  
             {
 965  0
                 append( sb, "Available parameters:", 1 );
 966  0
                 append( sb, "", 0 );
 967  
 
 968  0
                 append( sb, "classifier", 2 );
 969  0
                 append( sb, "Specify classifier to look for. Example: sources", 3 );
 970  0
                 append( sb, "", 0 );
 971  
 
 972  0
                 append( sb, "excludeArtifactIds", 2 );
 973  0
                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
 974  0
                 append( sb, "", 0 );
 975  
 
 976  0
                 append( sb, "excludeClassifiers", 2 );
 977  0
                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 978  0
                 append( sb, "", 0 );
 979  
 
 980  0
                 append( sb, "excludeGroupIds", 2 );
 981  0
                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
 982  0
                 append( sb, "", 0 );
 983  
 
 984  0
                 append( sb, "excludeScope", 2 );
 985  0
                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
 986  0
                 append( sb, "", 0 );
 987  
 
 988  0
                 append( sb, "excludeTransitive (Default: false)", 2 );
 989  0
                 append( sb, "If we should exclude transitive dependencies", 3 );
 990  0
                 append( sb, "", 0 );
 991  
 
 992  0
                 append( sb, "excludeTypes", 2 );
 993  0
                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 994  0
                 append( sb, "", 0 );
 995  
 
 996  0
                 append( sb, "includeArtifactIds", 2 );
 997  0
                 append( sb, "Comma separated list of Artifact names to include.", 3 );
 998  0
                 append( sb, "", 0 );
 999  
 
 1000  0
                 append( sb, "includeClassifiers", 2 );
 1001  0
                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
 1002  0
                 append( sb, "", 0 );
 1003  
 
 1004  0
                 append( sb, "includeGroupIds", 2 );
 1005  0
                 append( sb, "Comma separated list of GroupIds to include.", 3 );
 1006  0
                 append( sb, "", 0 );
 1007  
 
 1008  0
                 append( sb, "includeScope", 2 );
 1009  0
                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
 1010  0
                 append( sb, "", 0 );
 1011  
 
 1012  0
                 append( sb, "includeTypes", 2 );
 1013  0
                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
 1014  0
                 append( sb, "", 0 );
 1015  
 
 1016  0
                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
 1017  0
                 append( sb, "Directory to store flag files", 3 );
 1018  0
                 append( sb, "", 0 );
 1019  
 
 1020  0
                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
 1021  0
                 append( sb, "Output absolute filename for resolved artifacts", 3 );
 1022  0
                 append( sb, "", 0 );
 1023  
 
 1024  0
                 append( sb, "outputFile", 2 );
 1025  0
                 append( sb, "If specified, this parameter will cause the dependencies to be written to the path specified, instead of writing to the console.", 3 );
 1026  0
                 append( sb, "", 0 );
 1027  
 
 1028  0
                 append( sb, "overWriteIfNewer (Default: true)", 2 );
 1029  0
                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
 1030  0
                 append( sb, "", 0 );
 1031  
 
 1032  0
                 append( sb, "overWriteReleases (Default: false)", 2 );
 1033  0
                 append( sb, "Overwrite release artifacts", 3 );
 1034  0
                 append( sb, "", 0 );
 1035  
 
 1036  0
                 append( sb, "overWriteSnapshots (Default: false)", 2 );
 1037  0
                 append( sb, "Overwrite snapshot artifacts", 3 );
 1038  0
                 append( sb, "", 0 );
 1039  
 
 1040  0
                 append( sb, "silent (Default: false)", 2 );
 1041  0
                 append( sb, "If the plugin should be silent.", 3 );
 1042  0
                 append( sb, "", 0 );
 1043  
 
 1044  0
                 append( sb, "type (Default: java-source)", 2 );
 1045  0
                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
 1046  0
                 append( sb, "", 0 );
 1047  
             }
 1048  
         }
 1049  
 
 1050  0
         if ( goal == null || goal.length() <= 0 || "tree".equals( goal ) )
 1051  
         {
 1052  0
             append( sb, "dependency:tree", 0 );
 1053  0
             append( sb, "Displays the dependency tree for this project.", 1 );
 1054  0
             append( sb, "", 0 );
 1055  0
             if ( detail )
 1056  
             {
 1057  0
                 append( sb, "Available parameters:", 1 );
 1058  0
                 append( sb, "", 0 );
 1059  
 
 1060  0
                 append( sb, "excludes", 2 );
 1061  0
                 append( sb, "A comma-separated list of artifacts to filter from the serialized dependency tree, or null not to filter any artifacts from the dependency tree. The artifact syntax is defined by StrictPatternExcludesArtifactFilter.", 3 );
 1062  0
                 append( sb, "", 0 );
 1063  
 
 1064  0
                 append( sb, "includes", 2 );
 1065  0
                 append( sb, "A comma-separated list of artifacts to filter the serialized dependency tree by, or null not to filter the dependency tree. The artifact syntax is defined by StrictPatternIncludesArtifactFilter.", 3 );
 1066  0
                 append( sb, "", 0 );
 1067  
 
 1068  0
                 append( sb, "output", 2 );
 1069  0
                 append( sb, "Deprecated. use outputFile instead.", 3 );
 1070  0
                 append( sb, "", 0 );
 1071  0
                 append( sb, "If specified, this parameter will cause the dependency tree to be written to the path specified, instead of writing to the console.", 3 );
 1072  0
                 append( sb, "", 0 );
 1073  
 
 1074  0
                 append( sb, "outputFile", 2 );
 1075  0
                 append( sb, "If specified, this parameter will cause the dependency tree to be written to the path specified, instead of writing to the console.", 3 );
 1076  0
                 append( sb, "", 0 );
 1077  
 
 1078  0
                 append( sb, "scope", 2 );
 1079  0
                 append( sb, "The scope to filter by when resolving the dependency tree, or null to include dependencies from all scopes. Note that this feature does not currently work due to MNG-3236.", 3 );
 1080  0
                 append( sb, "", 0 );
 1081  
 
 1082  0
                 append( sb, "tokens (Default: standard)", 2 );
 1083  0
                 append( sb, "The token set name to use when outputting the dependency tree. Possible values are whitespace, standard or extended, which use whitespace, standard or extended ASCII sets respectively.", 3 );
 1084  0
                 append( sb, "", 0 );
 1085  
 
 1086  0
                 append( sb, "verbose (Default: false)", 2 );
 1087  0
                 append( sb, "Whether to include omitted nodes in the serialized dependency tree.", 3 );
 1088  0
                 append( sb, "", 0 );
 1089  
             }
 1090  
         }
 1091  
 
 1092  0
         if ( goal == null || goal.length() <= 0 || "unpack".equals( goal ) )
 1093  
         {
 1094  0
             append( sb, "dependency:unpack", 0 );
 1095  0
             append( sb, "Goal that retrieves a list of artifacts from the repository and unpacks them in a defined location.", 1 );
 1096  0
             append( sb, "", 0 );
 1097  0
             if ( detail )
 1098  
             {
 1099  0
                 append( sb, "Available parameters:", 1 );
 1100  0
                 append( sb, "", 0 );
 1101  
 
 1102  0
                 append( sb, "artifactItems", 2 );
 1103  0
                 append( sb, "Collection of ArtifactItems to work on. (ArtifactItem contains groupId, artifactId, version, type, classifier, location, destFile, markerFile and overwrite.) See \'Usage\' and \'Javadoc\' for details.", 3 );
 1104  0
                 append( sb, "", 0 );
 1105  
 
 1106  0
                 append( sb, "excludes", 2 );
 1107  0
                 append( sb, "A comma separated list of file patterns to exclude when unpacking the artifact. i.e. **\\/*.xml,**\\/*.properties NOTE: Excludes patterns override the includes. (component code = return isIncluded( name ) AND !isExcluded( name );)", 3 );
 1108  0
                 append( sb, "", 0 );
 1109  
 
 1110  0
                 append( sb, "includes", 2 );
 1111  0
                 append( sb, "A comma separated list of file patterns to include when unpacking the artifact. i.e. **\\/*.xml,**\\/*.properties NOTE: Excludes patterns override the includes. (component code = return isIncluded( name ) AND !isExcluded( name );)", 3 );
 1112  0
                 append( sb, "", 0 );
 1113  
 
 1114  0
                 append( sb, "markersDirectory", 2 );
 1115  0
                 append( sb, "Directory to store flag files after unpack", 3 );
 1116  0
                 append( sb, "", 0 );
 1117  
 
 1118  0
                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
 1119  0
                 append( sb, "Output absolute filename for resolved artifacts", 3 );
 1120  0
                 append( sb, "", 0 );
 1121  
 
 1122  0
                 append( sb, "outputDirectory (Default: ${project.build.directory}/dependency)", 2 );
 1123  0
                 append( sb, "Default location used for mojo unless overridden in ArtifactItem", 3 );
 1124  0
                 append( sb, "", 0 );
 1125  
 
 1126  0
                 append( sb, "overWriteIfNewer (Default: true)", 2 );
 1127  0
                 append( sb, "Overwrite if newer", 3 );
 1128  0
                 append( sb, "", 0 );
 1129  
 
 1130  0
                 append( sb, "overWriteReleases (Default: false)", 2 );
 1131  0
                 append( sb, "Overwrite release artifacts", 3 );
 1132  0
                 append( sb, "", 0 );
 1133  
 
 1134  0
                 append( sb, "overWriteSnapshots (Default: false)", 2 );
 1135  0
                 append( sb, "Overwrite snapshot artifacts", 3 );
 1136  0
                 append( sb, "", 0 );
 1137  
 
 1138  0
                 append( sb, "silent (Default: false)", 2 );
 1139  0
                 append( sb, "If the plugin should be silent.", 3 );
 1140  0
                 append( sb, "", 0 );
 1141  
             }
 1142  
         }
 1143  
 
 1144  0
         if ( goal == null || goal.length() <= 0 || "unpack-dependencies".equals( goal ) )
 1145  
         {
 1146  0
             append( sb, "dependency:unpack-dependencies", 0 );
 1147  0
             append( sb, "Goal that unpacks the project dependencies from the repository to a defined location.", 1 );
 1148  0
             append( sb, "", 0 );
 1149  0
             if ( detail )
 1150  
             {
 1151  0
                 append( sb, "Available parameters:", 1 );
 1152  0
                 append( sb, "", 0 );
 1153  
 
 1154  0
                 append( sb, "classifier", 2 );
 1155  0
                 append( sb, "Specify classifier to look for. Example: sources", 3 );
 1156  0
                 append( sb, "", 0 );
 1157  
 
 1158  0
                 append( sb, "copyPom (Default: false)", 2 );
 1159  0
                 append( sb, "Also copy the pom of each artifact.", 3 );
 1160  0
                 append( sb, "", 0 );
 1161  
 
 1162  0
                 append( sb, "excludeArtifactIds", 2 );
 1163  0
                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
 1164  0
                 append( sb, "", 0 );
 1165  
 
 1166  0
                 append( sb, "excludeClassifiers", 2 );
 1167  0
                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 1168  0
                 append( sb, "", 0 );
 1169  
 
 1170  0
                 append( sb, "excludeGroupIds", 2 );
 1171  0
                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
 1172  0
                 append( sb, "", 0 );
 1173  
 
 1174  0
                 append( sb, "excludeScope", 2 );
 1175  0
                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
 1176  0
                 append( sb, "", 0 );
 1177  
 
 1178  0
                 append( sb, "excludeTransitive (Default: false)", 2 );
 1179  0
                 append( sb, "If we should exclude transitive dependencies", 3 );
 1180  0
                 append( sb, "", 0 );
 1181  
 
 1182  0
                 append( sb, "excludeTypes", 2 );
 1183  0
                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
 1184  0
                 append( sb, "", 0 );
 1185  
 
 1186  0
                 append( sb, "excludes", 2 );
 1187  0
                 append( sb, "A comma separated list of file patterns to exclude when unpacking the artifact. i.e. **\\/*.xml,**\\/*.properties. NOTE: Excludes patterns override the includes. (component code = return isIncluded( name ) AND !isExcluded( name );)", 3 );
 1188  0
                 append( sb, "", 0 );
 1189  
 
 1190  0
                 append( sb, "failOnMissingClassifierArtifact (Default: true)", 2 );
 1191  0
                 append( sb, "This only applies if the classifier parameter is used.", 3 );
 1192  0
                 append( sb, "", 0 );
 1193  
 
 1194  0
                 append( sb, "includeArtifactIds", 2 );
 1195  0
                 append( sb, "Comma separated list of Artifact names to include.", 3 );
 1196  0
                 append( sb, "", 0 );
 1197  
 
 1198  0
                 append( sb, "includeClassifiers", 2 );
 1199  0
                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
 1200  0
                 append( sb, "", 0 );
 1201  
 
 1202  0
                 append( sb, "includeGroupIds", 2 );
 1203  0
                 append( sb, "Comma separated list of GroupIds to include.", 3 );
 1204  0
                 append( sb, "", 0 );
 1205  
 
 1206  0
                 append( sb, "includeScope", 2 );
 1207  0
                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
 1208  0
                 append( sb, "", 0 );
 1209  
 
 1210  0
                 append( sb, "includeTypes", 2 );
 1211  0
                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
 1212  0
                 append( sb, "", 0 );
 1213  
 
 1214  0
                 append( sb, "includes", 2 );
 1215  0
                 append( sb, "A comma separated list of file patterns to include when unpacking the artifact. i.e. **\\/*.xml,**\\/*.properties NOTE: Excludes patterns override the includes. (component code = return isIncluded( name ) AND !isExcluded( name );)", 3 );
 1216  0
                 append( sb, "", 0 );
 1217  
 
 1218  0
                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
 1219  0
                 append( sb, "Directory to store flag files", 3 );
 1220  0
                 append( sb, "", 0 );
 1221  
 
 1222  0
                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
 1223  0
                 append( sb, "Output absolute filename for resolved artifacts", 3 );
 1224  0
                 append( sb, "", 0 );
 1225  
 
 1226  0
                 append( sb, "outputDirectory (Default: ${project.build.directory}/dependency)", 2 );
 1227  0
                 append( sb, "Default location used for mojo unless overridden in ArtifactItem", 3 );
 1228  0
                 append( sb, "", 0 );
 1229  
 
 1230  0
                 append( sb, "overWriteIfNewer (Default: true)", 2 );
 1231  0
                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
 1232  0
                 append( sb, "", 0 );
 1233  
 
 1234  0
                 append( sb, "overWriteReleases (Default: false)", 2 );
 1235  0
                 append( sb, "Overwrite release artifacts", 3 );
 1236  0
                 append( sb, "", 0 );
 1237  
 
 1238  0
                 append( sb, "overWriteSnapshots (Default: false)", 2 );
 1239  0
                 append( sb, "Overwrite snapshot artifacts", 3 );
 1240  0
                 append( sb, "", 0 );
 1241  
 
 1242  0
                 append( sb, "silent (Default: false)", 2 );
 1243  0
                 append( sb, "If the plugin should be silent.", 3 );
 1244  0
                 append( sb, "", 0 );
 1245  
 
 1246  0
                 append( sb, "stripVersion (Default: false)", 2 );
 1247  0
                 append( sb, "Strip artifact version during copy", 3 );
 1248  0
                 append( sb, "", 0 );
 1249  
 
 1250  0
                 append( sb, "type (Default: java-source)", 2 );
 1251  0
                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
 1252  0
                 append( sb, "", 0 );
 1253  
 
 1254  0
                 append( sb, "useRepositoryLayout (Default: false)", 2 );
 1255  0
                 append( sb, "Place each artifact in the same directory layout as a default repository.\nexample: /outputDirectory/junit/junit/3.8.1/junit-3.8.1.jar", 3 );
 1256  0
                 append( sb, "", 0 );
 1257  
 
 1258  0
                 append( sb, "useSubDirectoryPerArtifact (Default: false)", 2 );
 1259  0
                 append( sb, "Place each file in a separate subdirectory. (example /outputDirectory/junit-3.8.1-jar)", 3 );
 1260  0
                 append( sb, "", 0 );
 1261  
 
 1262  0
                 append( sb, "useSubDirectoryPerType (Default: false)", 2 );
 1263  0
                 append( sb, "Place each type of file in a separate subdirectory. (example /outputDirectory/jars /outputDirectory/wars etc)", 3 );
 1264  0
                 append( sb, "", 0 );
 1265  
             }
 1266  
         }
 1267  
 
 1268  0
         if ( getLog().isInfoEnabled() )
 1269  
         {
 1270  0
             getLog().info( sb.toString() );
 1271  
         }
 1272  0
     }
 1273  
 
 1274  
     /**
 1275  
      * <p>Repeat a String <code>n</code> times to form a new string.</p>
 1276  
      *
 1277  
      * @param str String to repeat
 1278  
      * @param repeat number of times to repeat str
 1279  
      * @return String with repeated String
 1280  
      * @throws NegativeArraySizeException if <code>repeat < 0</code>
 1281  
      * @throws NullPointerException if str is <code>null</code>
 1282  
      */
 1283  
     private static String repeat( String str, int repeat )
 1284  
     {
 1285  0
         StringBuffer buffer = new StringBuffer( repeat * str.length() );
 1286  
 
 1287  0
         for ( int i = 0; i < repeat; i++ )
 1288  
         {
 1289  0
             buffer.append( str );
 1290  
         }
 1291  
 
 1292  0
         return buffer.toString();
 1293  
     }
 1294  
 
 1295  
     /** 
 1296  
      * Append a description to the buffer by respecting the indentSize and lineLength parameters.
 1297  
      * <b>Note</b>: The last character is always a new line.
 1298  
      * 
 1299  
      * @param sb The buffer to append the description, not <code>null</code>.
 1300  
      * @param description The description, not <code>null</code>.
 1301  
      * @param indent The base indentation level of each line, must not be negative.
 1302  
      */
 1303  
     private void append( StringBuffer sb, String description, int indent )
 1304  
     {
 1305  0
         for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); )
 1306  
         {
 1307  0
             sb.append( it.next().toString() ).append( '\n' );
 1308  
         }
 1309  0
     }
 1310  
 
 1311  
     /** 
 1312  
      * Splits the specified text into lines of convenient display length.
 1313  
      * 
 1314  
      * @param text The text to split into lines, must not be <code>null</code>.
 1315  
      * @param indent The base indentation level of each line, must not be negative.
 1316  
      * @param indentSize The size of each indentation, must not be negative.
 1317  
      * @param lineLength The length of the line, must not be negative.
 1318  
      * @return The sequence of display lines, never <code>null</code>.
 1319  
      * @throws NegativeArraySizeException if <code>indent < 0</code>
 1320  
      */
 1321  
     private static List toLines( String text, int indent, int indentSize, int lineLength )
 1322  
     {
 1323  0
         List lines = new ArrayList();
 1324  
 
 1325  0
         String ind = repeat( "\t", indent );
 1326  0
         String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" );
 1327  0
         for ( int i = 0; i < plainLines.length; i++ )
 1328  
         {
 1329  0
             toLines( lines, ind + plainLines[i], indentSize, lineLength );
 1330  
         }
 1331  
 
 1332  0
         return lines;
 1333  
     }
 1334  
 
 1335  
     /** 
 1336  
      * Adds the specified line to the output sequence, performing line wrapping if necessary.
 1337  
      * 
 1338  
      * @param lines The sequence of display lines, must not be <code>null</code>.
 1339  
      * @param line The line to add, must not be <code>null</code>.
 1340  
      * @param indentSize The size of each indentation, must not be negative.
 1341  
      * @param lineLength The length of the line, must not be negative.
 1342  
      */
 1343  
     private static void toLines( List lines, String line, int indentSize, int lineLength )
 1344  
     {
 1345  0
         int lineIndent = getIndentLevel( line );
 1346  0
         StringBuffer buf = new StringBuffer( 256 );
 1347  0
         String[] tokens = line.split( " +" );
 1348  0
         for ( int i = 0; i < tokens.length; i++ )
 1349  
         {
 1350  0
             String token = tokens[i];
 1351  0
             if ( i > 0 )
 1352  
             {
 1353  0
                 if ( buf.length() + token.length() >= lineLength )
 1354  
                 {
 1355  0
                     lines.add( buf.toString() );
 1356  0
                     buf.setLength( 0 );
 1357  0
                     buf.append( repeat( " ", lineIndent * indentSize ) );
 1358  
                 }
 1359  
                 else
 1360  
                 {
 1361  0
                     buf.append( ' ' );
 1362  
                 }
 1363  
             }
 1364  0
             for ( int j = 0; j < token.length(); j++ )
 1365  
             {
 1366  0
                 char c = token.charAt( j );
 1367  0
                 if ( c == '\t' )
 1368  
                 {
 1369  0
                     buf.append( repeat( " ", indentSize - buf.length() % indentSize ) );
 1370  
                 }
 1371  0
                 else if ( c == '\u00A0' )
 1372  
                 {
 1373  0
                     buf.append( ' ' );
 1374  
                 }
 1375  
                 else
 1376  
                 {
 1377  0
                     buf.append( c );
 1378  
                 }
 1379  
             }
 1380  
         }
 1381  0
         lines.add( buf.toString() );
 1382  0
     }
 1383  
 
 1384  
     /** 
 1385  
      * Gets the indentation level of the specified line.
 1386  
      * 
 1387  
      * @param line The line whose indentation level should be retrieved, must not be <code>null</code>.
 1388  
      * @return The indentation level of the line.
 1389  
      */
 1390  
     private static int getIndentLevel( String line )
 1391  
     {
 1392  0
         int level = 0;
 1393  0
         for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ )
 1394  
         {
 1395  0
             level++;
 1396  
         }
 1397  0
         for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ )
 1398  
         {
 1399  0
             if ( line.charAt( i ) == '\t' )
 1400  
             {
 1401  0
                 level++;
 1402  0
                 break;
 1403  
             }
 1404  
         }
 1405  0
         return level;
 1406  
     }
 1407  
 }