View Javadoc

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 Mon Nov 14 17:19:19 PST 2011
14   * @author org.apache.maven.tools.plugin.generator.PluginHelpGenerator (version 2.7)
15   * @goal help
16   * @requiresProject false
17   * @threadSafe
18   */
19  public class HelpMojo
20      extends AbstractMojo
21  {
22      /**
23       * If <code>true</code>, display all settable properties for each goal.
24       * 
25       * @parameter expression="${detail}" default-value="false"
26       */
27      private boolean detail;
28  
29      /**
30       * The name of the goal for which to show help. If unspecified, all goals will be displayed.
31       * 
32       * @parameter expression="${goal}"
33       */
34      private java.lang.String goal;
35  
36      /**
37       * The maximum length of a display line, should be positive.
38       * 
39       * @parameter expression="${lineLength}" default-value="80"
40       */
41      private int lineLength;
42  
43      /**
44       * The number of spaces per indentation level, should be positive.
45       * 
46       * @parameter expression="${indentSize}" default-value="2"
47       */
48      private int indentSize;
49  
50  
51      /** {@inheritDoc} */
52      public void execute()
53          throws MojoExecutionException
54      {
55          if ( lineLength <= 0 )
56          {
57              getLog().warn( "The parameter 'lineLength' should be positive, using '80' as default." );
58              lineLength = 80;
59          }
60          if ( indentSize <= 0 )
61          {
62              getLog().warn( "The parameter 'indentSize' should be positive, using '2' as default." );
63              indentSize = 2;
64          }
65  
66          StringBuffer sb = new StringBuffer();
67  
68          append( sb, "org.apache.maven.plugins:maven-dependency-plugin:2.4", 0 );
69          append( sb, "", 0 );
70  
71          append( sb, "Maven Dependency Plugin", 0 );
72          append( sb, "Provides utility goals to work with dependencies like copying, unpacking, analyzing, resolving and many more.", 1 );
73          append( sb, "", 0 );
74  
75          if ( goal == null || goal.length() <= 0 )
76          {
77              append( sb, "This plugin has 21 goals:", 0 );
78              append( sb, "", 0 );
79          }
80  
81          if ( goal == null || goal.length() <= 0 || "analyze".equals( goal ) )
82          {
83              append( sb, "dependency:analyze", 0 );
84              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 );
85              append( sb, "", 0 );
86              if ( detail )
87              {
88                  append( sb, "Available parameters:", 1 );
89                  append( sb, "", 0 );
90  
91                  append( sb, "analyzer (Default: default)", 2 );
92                  append( sb, "Project dependency analyzer to use (plexus component role-hint).", 3 );
93                  append( sb, "Expression: ${analyzer}", 3 );
94                  append( sb, "", 0 );
95  
96                  append( sb, "failOnWarning (Default: false)", 2 );
97                  append( sb, "Whether to fail the build if a dependency warning is found.", 3 );
98                  append( sb, "Expression: ${failOnWarning}", 3 );
99                  append( sb, "", 0 );
100 
101                 append( sb, "ignoreNonCompile (Default: false)", 2 );
102                 append( sb, "Ignore Runtime,Provide,Test,System scopes for unused dependency analysis", 3 );
103                 append( sb, "Expression: ${ignoreNonCompile}", 3 );
104                 append( sb, "", 0 );
105 
106                 append( sb, "outputXML (Default: false)", 2 );
107                 append( sb, "Output the xml for the missing dependencies", 3 );
108                 append( sb, "Expression: ${outputXML}", 3 );
109                 append( sb, "", 0 );
110 
111                 append( sb, "scriptableFlag (Default: $$$%%%)", 2 );
112                 append( sb, "Flag to use for scriptable output", 3 );
113                 append( sb, "Expression: ${scriptableFlag}", 3 );
114                 append( sb, "", 0 );
115 
116                 append( sb, "scriptableOutput (Default: false)", 2 );
117                 append( sb, "Output scriptable values", 3 );
118                 append( sb, "Expression: ${scriptableOutput}", 3 );
119                 append( sb, "", 0 );
120 
121                 append( sb, "verbose (Default: false)", 2 );
122                 append( sb, "Output used dependencies", 3 );
123                 append( sb, "Expression: ${verbose}", 3 );
124                 append( sb, "", 0 );
125             }
126         }
127 
128         if ( goal == null || goal.length() <= 0 || "analyze-dep-mgt".equals( goal ) )
129         {
130             append( sb, "dependency:analyze-dep-mgt", 0 );
131             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 useful for just detecting projects that override the dependencyManagement directly. Set ignoreDirect to false to detect these otherwise normal conditions.", 1 );
132             append( sb, "", 0 );
133             if ( detail )
134             {
135                 append( sb, "Available parameters:", 1 );
136                 append( sb, "", 0 );
137 
138                 append( sb, "failBuild (Default: false)", 2 );
139                 append( sb, "Fail the build if a problem is detected.", 3 );
140                 append( sb, "Expression: ${mdep.analyze.failBuild}", 3 );
141                 append( sb, "", 0 );
142 
143                 append( sb, "ignoreDirect (Default: true)", 2 );
144                 append( sb, "Ignore Direct Dependency Overrides of dependencyManagement section.", 3 );
145                 append( sb, "Expression: ${mdep.analyze.ignore.direct}", 3 );
146                 append( sb, "", 0 );
147             }
148         }
149 
150         if ( goal == null || goal.length() <= 0 || "analyze-duplicate".equals( goal ) )
151         {
152             append( sb, "dependency:analyze-duplicate", 0 );
153             append( sb, "Analyzes the <dependencies/> and <dependencyManagement/> tags in the pom.xml and determines the duplicate declared dependencies.", 1 );
154             append( sb, "", 0 );
155             if ( detail )
156             {
157                 append( sb, "Available parameters:", 1 );
158                 append( sb, "", 0 );
159             }
160         }
161 
162         if ( goal == null || goal.length() <= 0 || "analyze-only".equals( goal ) )
163         {
164             append( sb, "dependency:analyze-only", 0 );
165             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 );
166             append( sb, "", 0 );
167             if ( detail )
168             {
169                 append( sb, "Available parameters:", 1 );
170                 append( sb, "", 0 );
171 
172                 append( sb, "analyzer (Default: default)", 2 );
173                 append( sb, "Project dependency analyzer to use (plexus component role-hint).", 3 );
174                 append( sb, "Expression: ${analyzer}", 3 );
175                 append( sb, "", 0 );
176 
177                 append( sb, "failOnWarning (Default: false)", 2 );
178                 append( sb, "Whether to fail the build if a dependency warning is found.", 3 );
179                 append( sb, "Expression: ${failOnWarning}", 3 );
180                 append( sb, "", 0 );
181 
182                 append( sb, "ignoreNonCompile (Default: false)", 2 );
183                 append( sb, "Ignore Runtime,Provide,Test,System scopes for unused dependency analysis", 3 );
184                 append( sb, "Expression: ${ignoreNonCompile}", 3 );
185                 append( sb, "", 0 );
186 
187                 append( sb, "outputXML (Default: false)", 2 );
188                 append( sb, "Output the xml for the missing dependencies", 3 );
189                 append( sb, "Expression: ${outputXML}", 3 );
190                 append( sb, "", 0 );
191 
192                 append( sb, "scriptableFlag (Default: $$$%%%)", 2 );
193                 append( sb, "Flag to use for scriptable output", 3 );
194                 append( sb, "Expression: ${scriptableFlag}", 3 );
195                 append( sb, "", 0 );
196 
197                 append( sb, "scriptableOutput (Default: false)", 2 );
198                 append( sb, "Output scriptable values", 3 );
199                 append( sb, "Expression: ${scriptableOutput}", 3 );
200                 append( sb, "", 0 );
201 
202                 append( sb, "verbose (Default: false)", 2 );
203                 append( sb, "Output used dependencies", 3 );
204                 append( sb, "Expression: ${verbose}", 3 );
205                 append( sb, "", 0 );
206             }
207         }
208 
209         if ( goal == null || goal.length() <= 0 || "analyze-report".equals( goal ) )
210         {
211             append( sb, "dependency:analyze-report", 0 );
212             append( sb, "Analyzes the dependencies of this project and produces a report that summarizes which are: used and declared; used and undeclared; unused and declared.", 1 );
213             append( sb, "", 0 );
214             if ( detail )
215             {
216                 append( sb, "Available parameters:", 1 );
217                 append( sb, "", 0 );
218 
219                 append( sb, "ignoreNonCompile (Default: false)", 2 );
220                 append( sb, "Ignore Runtime,Provide,Test,System scopes for unused dependency analysis", 3 );
221                 append( sb, "Expression: ${ignoreNonCompile}", 3 );
222                 append( sb, "", 0 );
223             }
224         }
225 
226         if ( goal == null || goal.length() <= 0 || "build-classpath".equals( goal ) )
227         {
228             append( sb, "dependency:build-classpath", 0 );
229             append( sb, "This goal will output a classpath string of dependencies from the local repository to a file or log.", 1 );
230             append( sb, "", 0 );
231             if ( detail )
232             {
233                 append( sb, "Available parameters:", 1 );
234                 append( sb, "", 0 );
235 
236                 append( sb, "attach (Default: false)", 2 );
237                 append( sb, "Attach the classpath file to the main artifact so it can be installed and deployed.", 3 );
238                 append( sb, "", 0 );
239 
240                 append( sb, "classifier", 2 );
241                 append( sb, "Specify classifier to look for. Example: sources", 3 );
242                 append( sb, "Expression: ${classifier}", 3 );
243                 append( sb, "", 0 );
244 
245                 append( sb, "cpFile", 2 );
246                 append( sb, "Deprecated. use outputFile instead", 3 );
247                 append( sb, "", 0 );
248                 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 );
249                 append( sb, "Expression: ${mdep.cpFile}", 3 );
250                 append( sb, "", 0 );
251 
252                 append( sb, "excludeArtifactIds", 2 );
253                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
254                 append( sb, "Expression: ${excludeArtifactIds}", 3 );
255                 append( sb, "", 0 );
256 
257                 append( sb, "excludeClassifiers", 2 );
258                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
259                 append( sb, "Expression: ${excludeClassifiers}", 3 );
260                 append( sb, "", 0 );
261 
262                 append( sb, "excludeGroupIds", 2 );
263                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
264                 append( sb, "Expression: ${excludeGroupIds}", 3 );
265                 append( sb, "", 0 );
266 
267                 append( sb, "excludeScope", 2 );
268                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
269                 append( sb, "Expression: ${excludeScope}", 3 );
270                 append( sb, "", 0 );
271 
272                 append( sb, "excludeTransitive (Default: false)", 2 );
273                 append( sb, "If we should exclude transitive dependencies", 3 );
274                 append( sb, "Expression: ${excludeTransitive}", 3 );
275                 append( sb, "", 0 );
276 
277                 append( sb, "excludeTypes", 2 );
278                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
279                 append( sb, "Expression: ${excludeTypes}", 3 );
280                 append( sb, "", 0 );
281 
282                 append( sb, "fileSeparator", 2 );
283                 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 );
284                 append( sb, "Expression: ${mdep.fileSeparator}", 3 );
285                 append( sb, "", 0 );
286 
287                 append( sb, "includeArtifactIds", 2 );
288                 append( sb, "Comma separated list of Artifact names to include.", 3 );
289                 append( sb, "Expression: ${includeArtifactIds}", 3 );
290                 append( sb, "", 0 );
291 
292                 append( sb, "includeClassifiers", 2 );
293                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
294                 append( sb, "Expression: ${includeClassifiers}", 3 );
295                 append( sb, "", 0 );
296 
297                 append( sb, "includeGroupIds", 2 );
298                 append( sb, "Comma separated list of GroupIds to include.", 3 );
299                 append( sb, "Expression: ${includeGroupIds}", 3 );
300                 append( sb, "", 0 );
301 
302                 append( sb, "includeScope", 2 );
303                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
304                 append( sb, "Expression: ${includeScope}", 3 );
305                 append( sb, "", 0 );
306 
307                 append( sb, "includeTypes", 2 );
308                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
309                 append( sb, "Expression: ${includeTypes}", 3 );
310                 append( sb, "", 0 );
311 
312                 append( sb, "localRepoProperty", 2 );
313                 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 );
314                 append( sb, "Expression: ${mdep.localRepoProperty}", 3 );
315                 append( sb, "", 0 );
316 
317                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
318                 append( sb, "Directory to store flag files", 3 );
319                 append( sb, "Expression: ${markersDirectory}", 3 );
320                 append( sb, "", 0 );
321 
322                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
323                 append( sb, "Output absolute filename for resolved artifacts", 3 );
324                 append( sb, "Expression: ${outputAbsoluteArtifactFilename}", 3 );
325                 append( sb, "", 0 );
326 
327                 append( sb, "outputFile", 2 );
328                 append( sb, "The file to write the classpath string. If undefined, it just prints the classpath as [INFO].", 3 );
329                 append( sb, "Expression: ${mdep.outputFile}", 3 );
330                 append( sb, "", 0 );
331 
332                 append( sb, "outputFilterFile (Default: false)", 2 );
333                 append( sb, "Write out the classpath in a format compatible with filtering (classpath=xxxxx)", 3 );
334                 append( sb, "Expression: ${mdep.outputFilterFile}", 3 );
335                 append( sb, "", 0 );
336 
337                 append( sb, "overWriteIfNewer (Default: true)", 2 );
338                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
339                 append( sb, "Expression: ${overWriteIfNewer}", 3 );
340                 append( sb, "", 0 );
341 
342                 append( sb, "overWriteReleases (Default: false)", 2 );
343                 append( sb, "Overwrite release artifacts", 3 );
344                 append( sb, "Expression: ${overWriteReleases}", 3 );
345                 append( sb, "", 0 );
346 
347                 append( sb, "overWriteSnapshots (Default: false)", 2 );
348                 append( sb, "Overwrite snapshot artifacts", 3 );
349                 append( sb, "Expression: ${overWriteSnapshots}", 3 );
350                 append( sb, "", 0 );
351 
352                 append( sb, "pathSeparator", 2 );
353                 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 );
354                 append( sb, "Expression: ${mdep.pathSeparator}", 3 );
355                 append( sb, "", 0 );
356 
357                 append( sb, "prefix", 2 );
358                 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 );
359                 append( sb, "Expression: ${mdep.prefix}", 3 );
360                 append( sb, "", 0 );
361 
362                 append( sb, "prependGroupId (Default: false)", 2 );
363                 append( sb, "Prepend the groupId during copy.", 3 );
364                 append( sb, "Expression: ${mdep.prependGroupId}", 3 );
365                 append( sb, "", 0 );
366 
367                 append( sb, "regenerateFile (Default: false)", 2 );
368                 append( sb, "If \'true\', it skips the up-to-date-check, and always regenerates the classpath file.", 3 );
369                 append( sb, "Expression: ${mdep.regenerateFile}", 3 );
370                 append( sb, "", 0 );
371 
372                 append( sb, "silent (Default: false)", 2 );
373                 append( sb, "If the plugin should be silent.", 3 );
374                 append( sb, "Expression: ${silent}", 3 );
375                 append( sb, "", 0 );
376 
377                 append( sb, "stripVersion (Default: false)", 2 );
378                 append( sb, "Strip artifact version during copy (only works if prefix is set)", 3 );
379                 append( sb, "Expression: ${mdep.stripVersion}", 3 );
380                 append( sb, "", 0 );
381 
382                 append( sb, "type (Default: java-source)", 2 );
383                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
384                 append( sb, "Expression: ${type}", 3 );
385                 append( sb, "", 0 );
386             }
387         }
388 
389         if ( goal == null || goal.length() <= 0 || "copy".equals( goal ) )
390         {
391             append( sb, "dependency:copy", 0 );
392             append( sb, "Goal that copies a list of artifacts from the repository to defined locations.", 1 );
393             append( sb, "", 0 );
394             if ( detail )
395             {
396                 append( sb, "Available parameters:", 1 );
397                 append( sb, "", 0 );
398 
399                 append( sb, "artifactItems", 2 );
400                 append( sb, "Collection of ArtifactItems to work on. (ArtifactItem contains groupId, artifactId, version, type, classifier, location, destFileName, markerFile and overwrite.) See Usage for details.", 3 );
401                 append( sb, "Required: Yes", 3 );
402                 append( sb, "", 0 );
403 
404                 append( sb, "localRepositoryDirectory", 2 );
405                 append( sb, "Path to override default local repository during plugin\'s execution. To remove all downloaded artifacts as part of the build, set this value to a location under your project\'s target directory", 3 );
406                 append( sb, "", 0 );
407 
408                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
409                 append( sb, "Output absolute filename for resolved artifacts", 3 );
410                 append( sb, "Expression: ${outputAbsoluteArtifactFilename}", 3 );
411                 append( sb, "", 0 );
412 
413                 append( sb, "outputDirectory (Default: ${project.build.directory}/dependency)", 2 );
414                 append( sb, "Default location used for mojo unless overridden in ArtifactItem", 3 );
415                 append( sb, "Expression: ${outputDirectory}", 3 );
416                 append( sb, "", 0 );
417 
418                 append( sb, "overWriteIfNewer (Default: true)", 2 );
419                 append( sb, "Overwrite if newer", 3 );
420                 append( sb, "Expression: ${mdep.overIfNewer}", 3 );
421                 append( sb, "", 0 );
422 
423                 append( sb, "overWriteReleases (Default: false)", 2 );
424                 append( sb, "Overwrite release artifacts", 3 );
425                 append( sb, "Expression: ${mdep.overWriteReleases}", 3 );
426                 append( sb, "", 0 );
427 
428                 append( sb, "overWriteSnapshots (Default: false)", 2 );
429                 append( sb, "Overwrite snapshot artifacts", 3 );
430                 append( sb, "Expression: ${mdep.overWriteSnapshots}", 3 );
431                 append( sb, "", 0 );
432 
433                 append( sb, "silent (Default: false)", 2 );
434                 append( sb, "If the plugin should be silent.", 3 );
435                 append( sb, "Expression: ${silent}", 3 );
436                 append( sb, "", 0 );
437 
438                 append( sb, "skip (Default: false)", 2 );
439                 append( sb, "Skip the execution", 3 );
440                 append( sb, "Expression: ${mdep.skip}", 3 );
441                 append( sb, "", 0 );
442 
443                 append( sb, "stripVersion (Default: false)", 2 );
444                 append( sb, "Strip artifact version during copy", 3 );
445                 append( sb, "Expression: ${mdep.stripVersion}", 3 );
446                 append( sb, "", 0 );
447             }
448         }
449 
450         if ( goal == null || goal.length() <= 0 || "copy-dependencies".equals( goal ) )
451         {
452             append( sb, "dependency:copy-dependencies", 0 );
453             append( sb, "Goal that copies the project dependencies from the repository to a defined location.", 1 );
454             append( sb, "", 0 );
455             if ( detail )
456             {
457                 append( sb, "Available parameters:", 1 );
458                 append( sb, "", 0 );
459 
460                 append( sb, "classifier", 2 );
461                 append( sb, "Specify classifier to look for. Example: sources", 3 );
462                 append( sb, "Expression: ${classifier}", 3 );
463                 append( sb, "", 0 );
464 
465                 append( sb, "copyPom (Default: false)", 2 );
466                 append( sb, "Also copy the pom of each artifact.", 3 );
467                 append( sb, "Expression: ${mdep.copyPom}", 3 );
468                 append( sb, "", 0 );
469 
470                 append( sb, "excludeArtifactIds", 2 );
471                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
472                 append( sb, "Expression: ${excludeArtifactIds}", 3 );
473                 append( sb, "", 0 );
474 
475                 append( sb, "excludeClassifiers", 2 );
476                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
477                 append( sb, "Expression: ${excludeClassifiers}", 3 );
478                 append( sb, "", 0 );
479 
480                 append( sb, "excludeGroupIds", 2 );
481                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
482                 append( sb, "Expression: ${excludeGroupIds}", 3 );
483                 append( sb, "", 0 );
484 
485                 append( sb, "excludeScope", 2 );
486                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
487                 append( sb, "Expression: ${excludeScope}", 3 );
488                 append( sb, "", 0 );
489 
490                 append( sb, "excludeTransitive (Default: false)", 2 );
491                 append( sb, "If we should exclude transitive dependencies", 3 );
492                 append( sb, "Expression: ${excludeTransitive}", 3 );
493                 append( sb, "", 0 );
494 
495                 append( sb, "excludeTypes", 2 );
496                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
497                 append( sb, "Expression: ${excludeTypes}", 3 );
498                 append( sb, "", 0 );
499 
500                 append( sb, "failOnMissingClassifierArtifact (Default: true)", 2 );
501                 append( sb, "This only applies if the classifier parameter is used.", 3 );
502                 append( sb, "Expression: ${mdep.failOnMissingClassifierArtifact}", 3 );
503                 append( sb, "", 0 );
504 
505                 append( sb, "includeArtifactIds", 2 );
506                 append( sb, "Comma separated list of Artifact names to include.", 3 );
507                 append( sb, "Expression: ${includeArtifactIds}", 3 );
508                 append( sb, "", 0 );
509 
510                 append( sb, "includeClassifiers", 2 );
511                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
512                 append( sb, "Expression: ${includeClassifiers}", 3 );
513                 append( sb, "", 0 );
514 
515                 append( sb, "includeGroupIds", 2 );
516                 append( sb, "Comma separated list of GroupIds to include.", 3 );
517                 append( sb, "Expression: ${includeGroupIds}", 3 );
518                 append( sb, "", 0 );
519 
520                 append( sb, "includeScope", 2 );
521                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
522                 append( sb, "Expression: ${includeScope}", 3 );
523                 append( sb, "", 0 );
524 
525                 append( sb, "includeTypes", 2 );
526                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
527                 append( sb, "Expression: ${includeTypes}", 3 );
528                 append( sb, "", 0 );
529 
530                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
531                 append( sb, "Directory to store flag files", 3 );
532                 append( sb, "Expression: ${markersDirectory}", 3 );
533                 append( sb, "", 0 );
534 
535                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
536                 append( sb, "Output absolute filename for resolved artifacts", 3 );
537                 append( sb, "Expression: ${outputAbsoluteArtifactFilename}", 3 );
538                 append( sb, "", 0 );
539 
540                 append( sb, "outputDirectory (Default: ${project.build.directory}/dependency)", 2 );
541                 append( sb, "Default location used for mojo unless overridden in ArtifactItem", 3 );
542                 append( sb, "Expression: ${outputDirectory}", 3 );
543                 append( sb, "", 0 );
544 
545                 append( sb, "overWriteIfNewer (Default: true)", 2 );
546                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
547                 append( sb, "Expression: ${overWriteIfNewer}", 3 );
548                 append( sb, "", 0 );
549 
550                 append( sb, "overWriteReleases (Default: false)", 2 );
551                 append( sb, "Overwrite release artifacts", 3 );
552                 append( sb, "Expression: ${overWriteReleases}", 3 );
553                 append( sb, "", 0 );
554 
555                 append( sb, "overWriteSnapshots (Default: false)", 2 );
556                 append( sb, "Overwrite snapshot artifacts", 3 );
557                 append( sb, "Expression: ${overWriteSnapshots}", 3 );
558                 append( sb, "", 0 );
559 
560                 append( sb, "prependGroupId (Default: false)", 2 );
561                 append( sb, "Prepend the groupId during copy.", 3 );
562                 append( sb, "Expression: ${mdep.prependGroupId}", 3 );
563                 append( sb, "", 0 );
564 
565                 append( sb, "silent (Default: false)", 2 );
566                 append( sb, "If the plugin should be silent.", 3 );
567                 append( sb, "Expression: ${silent}", 3 );
568                 append( sb, "", 0 );
569 
570                 append( sb, "stripVersion (Default: false)", 2 );
571                 append( sb, "Strip artifact version during copy", 3 );
572                 append( sb, "Expression: ${mdep.stripVersion}", 3 );
573                 append( sb, "", 0 );
574 
575                 append( sb, "type (Default: java-source)", 2 );
576                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
577                 append( sb, "Expression: ${type}", 3 );
578                 append( sb, "", 0 );
579 
580                 append( sb, "useRepositoryLayout (Default: false)", 2 );
581                 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 );
582                 append( sb, "Expression: ${mdep.useRepositoryLayout}", 3 );
583                 append( sb, "", 0 );
584 
585                 append( sb, "useSubDirectoryPerArtifact (Default: false)", 2 );
586                 append( sb, "Place each file in a separate subdirectory. (example /outputDirectory/junit-3.8.1-jar)", 3 );
587                 append( sb, "Expression: ${mdep.useSubDirectoryPerArtifact}", 3 );
588                 append( sb, "", 0 );
589 
590                 append( sb, "useSubDirectoryPerScope (Default: false)", 2 );
591                 append( sb, "Place each type of file in a separate subdirectory. (example /outputDirectory/runtime /outputDirectory/provided etc)", 3 );
592                 append( sb, "Expression: ${mdep.useSubDirectoryPerScope}", 3 );
593                 append( sb, "", 0 );
594 
595                 append( sb, "useSubDirectoryPerType (Default: false)", 2 );
596                 append( sb, "Place each type of file in a separate subdirectory. (example /outputDirectory/jars /outputDirectory/wars etc)", 3 );
597                 append( sb, "Expression: ${mdep.useSubDirectoryPerType}", 3 );
598                 append( sb, "", 0 );
599             }
600         }
601 
602         if ( goal == null || goal.length() <= 0 || "get".equals( goal ) )
603         {
604             append( sb, "dependency:get", 0 );
605             append( sb, "Downloads a single artifact transitively from the specified remote repositories. Caveat: will always check the central repository defined in the super pom. You could use a mirror entry in your settings.xml", 1 );
606             append( sb, "", 0 );
607             if ( detail )
608             {
609                 append( sb, "Available parameters:", 1 );
610                 append( sb, "", 0 );
611 
612                 append( sb, "artifact", 2 );
613                 append( sb, "A string of the form groupId:artifactId:version[:packaging][:classifier].", 3 );
614                 append( sb, "Expression: ${artifact}", 3 );
615                 append( sb, "", 0 );
616 
617                 append( sb, "artifactId", 2 );
618                 append( sb, "The artifactId of the artifact to download. Ignored if artifact is used.", 3 );
619                 append( sb, "Expression: ${artifactId}", 3 );
620                 append( sb, "", 0 );
621 
622                 append( sb, "classifier", 2 );
623                 append( sb, "The classifier of the artifact to download. Ignored if artifact is used.", 3 );
624                 append( sb, "Expression: ${classifier}", 3 );
625                 append( sb, "", 0 );
626 
627                 append( sb, "destination", 2 );
628                 append( sb, "The destination file to copy the artifact to, if other than the local repository", 3 );
629                 append( sb, "Expression: ${dest}", 3 );
630                 append( sb, "", 0 );
631 
632                 append( sb, "groupId", 2 );
633                 append( sb, "The groupId of the artifact to download. Ignored if artifact is used.", 3 );
634                 append( sb, "Expression: ${groupId}", 3 );
635                 append( sb, "", 0 );
636 
637                 append( sb, "packaging (Default: jar)", 2 );
638                 append( sb, "The packaging of the artifact to download. Ignored if artifact is used.", 3 );
639                 append( sb, "Expression: ${packaging}", 3 );
640                 append( sb, "", 0 );
641 
642                 append( sb, "remoteRepositories", 2 );
643                 append( sb, "Repositories in the format id::[layout]::url or just url, separated by comma. ie. central::default::http://repo1.maven.apache.org/maven2,myrepo::::http://repo.acme.com,http://repo.acme2.com", 3 );
644                 append( sb, "Expression: ${remoteRepositories}", 3 );
645                 append( sb, "", 0 );
646 
647                 append( sb, "repositoryId (Default: temp)", 2 );
648                 append( sb, "Deprecated. Use remoteRepositories", 3 );
649                 append( sb, "", 0 );
650                 append( sb, "The id of the repository from which we\'ll download the artifact", 3 );
651                 append( sb, "Expression: ${repoId}", 3 );
652                 append( sb, "", 0 );
653 
654                 append( sb, "repositoryUrl", 2 );
655                 append( sb, "Deprecated. Use remoteRepositories", 3 );
656                 append( sb, "", 0 );
657                 append( sb, "The url of the repository from which we\'ll download the artifact. DEPRECATED Use remoteRepositories", 3 );
658                 append( sb, "Expression: ${repoUrl}", 3 );
659                 append( sb, "", 0 );
660 
661                 append( sb, "transitive (Default: true)", 2 );
662                 append( sb, "Download transitively, retrieving the specified artifact and all of its dependencies.", 3 );
663                 append( sb, "Expression: ${transitive}", 3 );
664                 append( sb, "", 0 );
665 
666                 append( sb, "version", 2 );
667                 append( sb, "The version of the artifact to download. Ignored if artifact is used.", 3 );
668                 append( sb, "Expression: ${version}", 3 );
669                 append( sb, "", 0 );
670             }
671         }
672 
673         if ( goal == null || goal.length() <= 0 || "go-offline".equals( goal ) )
674         {
675             append( sb, "dependency:go-offline", 0 );
676             append( sb, "Goal that resolves all project dependencies, including plugins and reports and their dependencies.", 1 );
677             append( sb, "", 0 );
678             if ( detail )
679             {
680                 append( sb, "Available parameters:", 1 );
681                 append( sb, "", 0 );
682 
683                 append( sb, "appendOutput (Default: false)", 2 );
684                 append( sb, "Whether to append outputs into the output file or overwrite it.", 3 );
685                 append( sb, "Expression: ${appendOutput}", 3 );
686                 append( sb, "", 0 );
687 
688                 append( sb, "classifier", 2 );
689                 append( sb, "Specify classifier to look for. Example: sources", 3 );
690                 append( sb, "Expression: ${classifier}", 3 );
691                 append( sb, "", 0 );
692 
693                 append( sb, "excludeArtifactIds", 2 );
694                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
695                 append( sb, "Expression: ${excludeArtifactIds}", 3 );
696                 append( sb, "", 0 );
697 
698                 append( sb, "excludeClassifiers", 2 );
699                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
700                 append( sb, "Expression: ${excludeClassifiers}", 3 );
701                 append( sb, "", 0 );
702 
703                 append( sb, "excludeGroupIds", 2 );
704                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
705                 append( sb, "Expression: ${excludeGroupIds}", 3 );
706                 append( sb, "", 0 );
707 
708                 append( sb, "excludeScope", 2 );
709                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
710                 append( sb, "Expression: ${excludeScope}", 3 );
711                 append( sb, "", 0 );
712 
713                 append( sb, "excludeTransitive (Default: false)", 2 );
714                 append( sb, "If we should exclude transitive dependencies", 3 );
715                 append( sb, "Expression: ${excludeTransitive}", 3 );
716                 append( sb, "", 0 );
717 
718                 append( sb, "excludeTypes", 2 );
719                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
720                 append( sb, "Expression: ${excludeTypes}", 3 );
721                 append( sb, "", 0 );
722 
723                 append( sb, "includeArtifactIds", 2 );
724                 append( sb, "Comma separated list of Artifact names to include.", 3 );
725                 append( sb, "Expression: ${includeArtifactIds}", 3 );
726                 append( sb, "", 0 );
727 
728                 append( sb, "includeClassifiers", 2 );
729                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
730                 append( sb, "Expression: ${includeClassifiers}", 3 );
731                 append( sb, "", 0 );
732 
733                 append( sb, "includeGroupIds", 2 );
734                 append( sb, "Comma separated list of GroupIds to include.", 3 );
735                 append( sb, "Expression: ${includeGroupIds}", 3 );
736                 append( sb, "", 0 );
737 
738                 append( sb, "includeScope", 2 );
739                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
740                 append( sb, "Expression: ${includeScope}", 3 );
741                 append( sb, "", 0 );
742 
743                 append( sb, "includeTypes", 2 );
744                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
745                 append( sb, "Expression: ${includeTypes}", 3 );
746                 append( sb, "", 0 );
747 
748                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
749                 append( sb, "Directory to store flag files", 3 );
750                 append( sb, "Expression: ${markersDirectory}", 3 );
751                 append( sb, "", 0 );
752 
753                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
754                 append( sb, "Output absolute filename for resolved artifacts", 3 );
755                 append( sb, "Expression: ${outputAbsoluteArtifactFilename}", 3 );
756                 append( sb, "", 0 );
757 
758                 append( sb, "outputFile", 2 );
759                 append( sb, "If specified, this parameter will cause the dependencies to be written to the path specified, instead of writing to the console.", 3 );
760                 append( sb, "Expression: ${outputFile}", 3 );
761                 append( sb, "", 0 );
762 
763                 append( sb, "overWriteIfNewer (Default: true)", 2 );
764                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
765                 append( sb, "Expression: ${overWriteIfNewer}", 3 );
766                 append( sb, "", 0 );
767 
768                 append( sb, "overWriteReleases (Default: false)", 2 );
769                 append( sb, "Overwrite release artifacts", 3 );
770                 append( sb, "Expression: ${overWriteReleases}", 3 );
771                 append( sb, "", 0 );
772 
773                 append( sb, "overWriteSnapshots (Default: false)", 2 );
774                 append( sb, "Overwrite snapshot artifacts", 3 );
775                 append( sb, "Expression: ${overWriteSnapshots}", 3 );
776                 append( sb, "", 0 );
777 
778                 append( sb, "prependGroupId (Default: false)", 2 );
779                 append( sb, "Prepend the groupId during copy.", 3 );
780                 append( sb, "Expression: ${mdep.prependGroupId}", 3 );
781                 append( sb, "", 0 );
782 
783                 append( sb, "silent (Default: false)", 2 );
784                 append( sb, "If the plugin should be silent.", 3 );
785                 append( sb, "Expression: ${silent}", 3 );
786                 append( sb, "", 0 );
787 
788                 append( sb, "type (Default: java-source)", 2 );
789                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
790                 append( sb, "Expression: ${type}", 3 );
791                 append( sb, "", 0 );
792             }
793         }
794 
795         if ( goal == null || goal.length() <= 0 || "help".equals( goal ) )
796         {
797             append( sb, "dependency:help", 0 );
798             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 );
799             append( sb, "", 0 );
800             if ( detail )
801             {
802                 append( sb, "Available parameters:", 1 );
803                 append( sb, "", 0 );
804 
805                 append( sb, "detail (Default: false)", 2 );
806                 append( sb, "If true, display all settable properties for each goal.", 3 );
807                 append( sb, "Expression: ${detail}", 3 );
808                 append( sb, "", 0 );
809 
810                 append( sb, "goal", 2 );
811                 append( sb, "The name of the goal for which to show help. If unspecified, all goals will be displayed.", 3 );
812                 append( sb, "Expression: ${goal}", 3 );
813                 append( sb, "", 0 );
814 
815                 append( sb, "indentSize (Default: 2)", 2 );
816                 append( sb, "The number of spaces per indentation level, should be positive.", 3 );
817                 append( sb, "Expression: ${indentSize}", 3 );
818                 append( sb, "", 0 );
819 
820                 append( sb, "lineLength (Default: 80)", 2 );
821                 append( sb, "The maximum length of a display line, should be positive.", 3 );
822                 append( sb, "Expression: ${lineLength}", 3 );
823                 append( sb, "", 0 );
824             }
825         }
826 
827         if ( goal == null || goal.length() <= 0 || "list".equals( goal ) )
828         {
829             append( sb, "dependency:list", 0 );
830             append( sb, "Displays the list of dependencies for this project.", 1 );
831             append( sb, "", 0 );
832             if ( detail )
833             {
834                 append( sb, "Available parameters:", 1 );
835                 append( sb, "", 0 );
836 
837                 append( sb, "appendOutput (Default: false)", 2 );
838                 append( sb, "Whether to append outputs into the output file or overwrite it.", 3 );
839                 append( sb, "Expression: ${appendOutput}", 3 );
840                 append( sb, "", 0 );
841 
842                 append( sb, "classifier", 2 );
843                 append( sb, "Specify classifier to look for. Example: sources", 3 );
844                 append( sb, "Expression: ${classifier}", 3 );
845                 append( sb, "", 0 );
846 
847                 append( sb, "excludeArtifactIds", 2 );
848                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
849                 append( sb, "Expression: ${excludeArtifactIds}", 3 );
850                 append( sb, "", 0 );
851 
852                 append( sb, "excludeClassifiers", 2 );
853                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
854                 append( sb, "Expression: ${excludeClassifiers}", 3 );
855                 append( sb, "", 0 );
856 
857                 append( sb, "excludeGroupIds", 2 );
858                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
859                 append( sb, "Expression: ${excludeGroupIds}", 3 );
860                 append( sb, "", 0 );
861 
862                 append( sb, "excludeScope", 2 );
863                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
864                 append( sb, "Expression: ${excludeScope}", 3 );
865                 append( sb, "", 0 );
866 
867                 append( sb, "excludeTransitive (Default: false)", 2 );
868                 append( sb, "If we should exclude transitive dependencies", 3 );
869                 append( sb, "Expression: ${excludeTransitive}", 3 );
870                 append( sb, "", 0 );
871 
872                 append( sb, "excludeTypes", 2 );
873                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
874                 append( sb, "Expression: ${excludeTypes}", 3 );
875                 append( sb, "", 0 );
876 
877                 append( sb, "includeArtifactIds", 2 );
878                 append( sb, "Comma separated list of Artifact names to include.", 3 );
879                 append( sb, "Expression: ${includeArtifactIds}", 3 );
880                 append( sb, "", 0 );
881 
882                 append( sb, "includeClassifiers", 2 );
883                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
884                 append( sb, "Expression: ${includeClassifiers}", 3 );
885                 append( sb, "", 0 );
886 
887                 append( sb, "includeGroupIds", 2 );
888                 append( sb, "Comma separated list of GroupIds to include.", 3 );
889                 append( sb, "Expression: ${includeGroupIds}", 3 );
890                 append( sb, "", 0 );
891 
892                 append( sb, "includeScope", 2 );
893                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
894                 append( sb, "Expression: ${includeScope}", 3 );
895                 append( sb, "", 0 );
896 
897                 append( sb, "includeTypes", 2 );
898                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
899                 append( sb, "Expression: ${includeTypes}", 3 );
900                 append( sb, "", 0 );
901 
902                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
903                 append( sb, "Directory to store flag files", 3 );
904                 append( sb, "Expression: ${markersDirectory}", 3 );
905                 append( sb, "", 0 );
906 
907                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
908                 append( sb, "Output absolute filename for resolved artifacts", 3 );
909                 append( sb, "Expression: ${outputAbsoluteArtifactFilename}", 3 );
910                 append( sb, "", 0 );
911 
912                 append( sb, "outputFile", 2 );
913                 append( sb, "If specified, this parameter will cause the dependencies to be written to the path specified, instead of writing to the console.", 3 );
914                 append( sb, "Expression: ${outputFile}", 3 );
915                 append( sb, "", 0 );
916 
917                 append( sb, "outputScope (Default: true)", 2 );
918                 append( sb, "If we should display the scope when resolving", 3 );
919                 append( sb, "Expression: ${mdep.outputScope}", 3 );
920                 append( sb, "", 0 );
921 
922                 append( sb, "overWriteIfNewer (Default: true)", 2 );
923                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
924                 append( sb, "Expression: ${overWriteIfNewer}", 3 );
925                 append( sb, "", 0 );
926 
927                 append( sb, "overWriteReleases (Default: false)", 2 );
928                 append( sb, "Overwrite release artifacts", 3 );
929                 append( sb, "Expression: ${overWriteReleases}", 3 );
930                 append( sb, "", 0 );
931 
932                 append( sb, "overWriteSnapshots (Default: false)", 2 );
933                 append( sb, "Overwrite snapshot artifacts", 3 );
934                 append( sb, "Expression: ${overWriteSnapshots}", 3 );
935                 append( sb, "", 0 );
936 
937                 append( sb, "prependGroupId (Default: false)", 2 );
938                 append( sb, "Prepend the groupId during copy.", 3 );
939                 append( sb, "Expression: ${mdep.prependGroupId}", 3 );
940                 append( sb, "", 0 );
941 
942                 append( sb, "silent (Default: false)", 2 );
943                 append( sb, "If the plugin should be silent.", 3 );
944                 append( sb, "Expression: ${silent}", 3 );
945                 append( sb, "", 0 );
946 
947                 append( sb, "type (Default: java-source)", 2 );
948                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
949                 append( sb, "Expression: ${type}", 3 );
950                 append( sb, "", 0 );
951             }
952         }
953 
954         if ( goal == null || goal.length() <= 0 || "list-repositories".equals( goal ) )
955         {
956             append( sb, "dependency:list-repositories", 0 );
957             append( sb, "Goal that resolves all project dependencies and then lists the repositories used by the build and by the transitive dependencies", 1 );
958             append( sb, "", 0 );
959             if ( detail )
960             {
961                 append( sb, "Available parameters:", 1 );
962                 append( sb, "", 0 );
963 
964                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
965                 append( sb, "Output absolute filename for resolved artifacts", 3 );
966                 append( sb, "Expression: ${outputAbsoluteArtifactFilename}", 3 );
967                 append( sb, "", 0 );
968 
969                 append( sb, "silent (Default: false)", 2 );
970                 append( sb, "If the plugin should be silent.", 3 );
971                 append( sb, "Expression: ${silent}", 3 );
972                 append( sb, "", 0 );
973             }
974         }
975 
976         if ( goal == null || goal.length() <= 0 || "properties".equals( goal ) )
977         {
978             append( sb, "dependency:properties", 0 );
979             append( sb, "Goal that sets a property pointing to the artifact file for each project dependency. For each dependency (direct and transitive) a project property will be set which follows the form groupId:artifactId:type:[classifier] and contains the path to the resolved artifact.", 1 );
980             append( sb, "", 0 );
981             if ( detail )
982             {
983                 append( sb, "Available parameters:", 1 );
984                 append( sb, "", 0 );
985             }
986         }
987 
988         if ( goal == null || goal.length() <= 0 || "purge-local-repository".equals( goal ) )
989         {
990             append( sb, "dependency:purge-local-repository", 0 );
991             append( sb, "Remove the project dependencies from the local repository, and optionally re-resolve them.", 1 );
992             append( sb, "", 0 );
993             if ( detail )
994             {
995                 append( sb, "Available parameters:", 1 );
996                 append( sb, "", 0 );
997 
998                 append( sb, "actTransitively (Default: true)", 2 );
999                 append( sb, "Whether this mojo should act on all transitive dependencies. Default value is true.", 3 );
1000                 append( sb, "Expression: ${actTransitively}", 3 );
1001                 append( sb, "", 0 );
1002 
1003                 append( sb, "exclude", 2 );
1004                 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 );
1005                 append( sb, "Expression: ${exclude}", 3 );
1006                 append( sb, "", 0 );
1007 
1008                 append( sb, "excludes", 2 );
1009                 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 );
1010                 append( sb, "", 0 );
1011 
1012                 append( sb, "reResolve (Default: true)", 2 );
1013                 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 );
1014                 append( sb, "Expression: ${reResolve}", 3 );
1015                 append( sb, "", 0 );
1016 
1017                 append( sb, "resolutionFuzziness (Default: file)", 2 );
1018                 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 );
1019                 append( sb, "Expression: ${resolutionFuzziness}", 3 );
1020                 append( sb, "", 0 );
1021 
1022                 append( sb, "snapshotsOnly (Default: false)", 2 );
1023                 append( sb, "Whether to purge only snapshot artifacts.", 3 );
1024                 append( sb, "Expression: ${snapshotsOnly}", 3 );
1025                 append( sb, "", 0 );
1026 
1027                 append( sb, "verbose (Default: false)", 2 );
1028                 append( sb, "Whether this plugin should output verbose messages. Default is false.", 3 );
1029                 append( sb, "Expression: ${verbose}", 3 );
1030                 append( sb, "", 0 );
1031             }
1032         }
1033 
1034         if ( goal == null || goal.length() <= 0 || "resolve".equals( goal ) )
1035         {
1036             append( sb, "dependency:resolve", 0 );
1037             append( sb, "Goal that resolves the project dependencies from the repository.", 1 );
1038             append( sb, "", 0 );
1039             if ( detail )
1040             {
1041                 append( sb, "Available parameters:", 1 );
1042                 append( sb, "", 0 );
1043 
1044                 append( sb, "appendOutput (Default: false)", 2 );
1045                 append( sb, "Whether to append outputs into the output file or overwrite it.", 3 );
1046                 append( sb, "Expression: ${appendOutput}", 3 );
1047                 append( sb, "", 0 );
1048 
1049                 append( sb, "classifier", 2 );
1050                 append( sb, "Specify classifier to look for. Example: sources", 3 );
1051                 append( sb, "Expression: ${classifier}", 3 );
1052                 append( sb, "", 0 );
1053 
1054                 append( sb, "excludeArtifactIds", 2 );
1055                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
1056                 append( sb, "Expression: ${excludeArtifactIds}", 3 );
1057                 append( sb, "", 0 );
1058 
1059                 append( sb, "excludeClassifiers", 2 );
1060                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
1061                 append( sb, "Expression: ${excludeClassifiers}", 3 );
1062                 append( sb, "", 0 );
1063 
1064                 append( sb, "excludeGroupIds", 2 );
1065                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
1066                 append( sb, "Expression: ${excludeGroupIds}", 3 );
1067                 append( sb, "", 0 );
1068 
1069                 append( sb, "excludeScope", 2 );
1070                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
1071                 append( sb, "Expression: ${excludeScope}", 3 );
1072                 append( sb, "", 0 );
1073 
1074                 append( sb, "excludeTransitive (Default: false)", 2 );
1075                 append( sb, "If we should exclude transitive dependencies", 3 );
1076                 append( sb, "Expression: ${excludeTransitive}", 3 );
1077                 append( sb, "", 0 );
1078 
1079                 append( sb, "excludeTypes", 2 );
1080                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
1081                 append( sb, "Expression: ${excludeTypes}", 3 );
1082                 append( sb, "", 0 );
1083 
1084                 append( sb, "includeArtifactIds", 2 );
1085                 append( sb, "Comma separated list of Artifact names to include.", 3 );
1086                 append( sb, "Expression: ${includeArtifactIds}", 3 );
1087                 append( sb, "", 0 );
1088 
1089                 append( sb, "includeClassifiers", 2 );
1090                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
1091                 append( sb, "Expression: ${includeClassifiers}", 3 );
1092                 append( sb, "", 0 );
1093 
1094                 append( sb, "includeGroupIds", 2 );
1095                 append( sb, "Comma separated list of GroupIds to include.", 3 );
1096                 append( sb, "Expression: ${includeGroupIds}", 3 );
1097                 append( sb, "", 0 );
1098 
1099                 append( sb, "includeScope", 2 );
1100                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
1101                 append( sb, "Expression: ${includeScope}", 3 );
1102                 append( sb, "", 0 );
1103 
1104                 append( sb, "includeTypes", 2 );
1105                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
1106                 append( sb, "Expression: ${includeTypes}", 3 );
1107                 append( sb, "", 0 );
1108 
1109                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
1110                 append( sb, "Directory to store flag files", 3 );
1111                 append( sb, "Expression: ${markersDirectory}", 3 );
1112                 append( sb, "", 0 );
1113 
1114                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
1115                 append( sb, "Output absolute filename for resolved artifacts", 3 );
1116                 append( sb, "Expression: ${outputAbsoluteArtifactFilename}", 3 );
1117                 append( sb, "", 0 );
1118 
1119                 append( sb, "outputFile", 2 );
1120                 append( sb, "If specified, this parameter will cause the dependencies to be written to the path specified, instead of writing to the console.", 3 );
1121                 append( sb, "Expression: ${outputFile}", 3 );
1122                 append( sb, "", 0 );
1123 
1124                 append( sb, "outputScope (Default: true)", 2 );
1125                 append( sb, "If we should display the scope when resolving", 3 );
1126                 append( sb, "Expression: ${mdep.outputScope}", 3 );
1127                 append( sb, "", 0 );
1128 
1129                 append( sb, "overWriteIfNewer (Default: true)", 2 );
1130                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
1131                 append( sb, "Expression: ${overWriteIfNewer}", 3 );
1132                 append( sb, "", 0 );
1133 
1134                 append( sb, "overWriteReleases (Default: false)", 2 );
1135                 append( sb, "Overwrite release artifacts", 3 );
1136                 append( sb, "Expression: ${overWriteReleases}", 3 );
1137                 append( sb, "", 0 );
1138 
1139                 append( sb, "overWriteSnapshots (Default: false)", 2 );
1140                 append( sb, "Overwrite snapshot artifacts", 3 );
1141                 append( sb, "Expression: ${overWriteSnapshots}", 3 );
1142                 append( sb, "", 0 );
1143 
1144                 append( sb, "prependGroupId (Default: false)", 2 );
1145                 append( sb, "Prepend the groupId during copy.", 3 );
1146                 append( sb, "Expression: ${mdep.prependGroupId}", 3 );
1147                 append( sb, "", 0 );
1148 
1149                 append( sb, "silent (Default: false)", 2 );
1150                 append( sb, "If the plugin should be silent.", 3 );
1151                 append( sb, "Expression: ${silent}", 3 );
1152                 append( sb, "", 0 );
1153 
1154                 append( sb, "type (Default: java-source)", 2 );
1155                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
1156                 append( sb, "Expression: ${type}", 3 );
1157                 append( sb, "", 0 );
1158             }
1159         }
1160 
1161         if ( goal == null || goal.length() <= 0 || "resolve-plugins".equals( goal ) )
1162         {
1163             append( sb, "dependency:resolve-plugins", 0 );
1164             append( sb, "Goal that resolves all project plugins and reports and their dependencies.", 1 );
1165             append( sb, "", 0 );
1166             if ( detail )
1167             {
1168                 append( sb, "Available parameters:", 1 );
1169                 append( sb, "", 0 );
1170 
1171                 append( sb, "appendOutput (Default: false)", 2 );
1172                 append( sb, "Whether to append outputs into the output file or overwrite it.", 3 );
1173                 append( sb, "Expression: ${appendOutput}", 3 );
1174                 append( sb, "", 0 );
1175 
1176                 append( sb, "classifier", 2 );
1177                 append( sb, "Specify classifier to look for. Example: sources", 3 );
1178                 append( sb, "Expression: ${classifier}", 3 );
1179                 append( sb, "", 0 );
1180 
1181                 append( sb, "excludeArtifactIds", 2 );
1182                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
1183                 append( sb, "Expression: ${excludeArtifactIds}", 3 );
1184                 append( sb, "", 0 );
1185 
1186                 append( sb, "excludeClassifiers", 2 );
1187                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
1188                 append( sb, "Expression: ${excludeClassifiers}", 3 );
1189                 append( sb, "", 0 );
1190 
1191                 append( sb, "excludeGroupIds", 2 );
1192                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
1193                 append( sb, "Expression: ${excludeGroupIds}", 3 );
1194                 append( sb, "", 0 );
1195 
1196                 append( sb, "excludeScope", 2 );
1197                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
1198                 append( sb, "Expression: ${excludeScope}", 3 );
1199                 append( sb, "", 0 );
1200 
1201                 append( sb, "excludeTransitive (Default: false)", 2 );
1202                 append( sb, "If we should exclude transitive dependencies", 3 );
1203                 append( sb, "Expression: ${excludeTransitive}", 3 );
1204                 append( sb, "", 0 );
1205 
1206                 append( sb, "excludeTypes", 2 );
1207                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
1208                 append( sb, "Expression: ${excludeTypes}", 3 );
1209                 append( sb, "", 0 );
1210 
1211                 append( sb, "includeArtifactIds", 2 );
1212                 append( sb, "Comma separated list of Artifact names to include.", 3 );
1213                 append( sb, "Expression: ${includeArtifactIds}", 3 );
1214                 append( sb, "", 0 );
1215 
1216                 append( sb, "includeClassifiers", 2 );
1217                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
1218                 append( sb, "Expression: ${includeClassifiers}", 3 );
1219                 append( sb, "", 0 );
1220 
1221                 append( sb, "includeGroupIds", 2 );
1222                 append( sb, "Comma separated list of GroupIds to include.", 3 );
1223                 append( sb, "Expression: ${includeGroupIds}", 3 );
1224                 append( sb, "", 0 );
1225 
1226                 append( sb, "includeScope", 2 );
1227                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
1228                 append( sb, "Expression: ${includeScope}", 3 );
1229                 append( sb, "", 0 );
1230 
1231                 append( sb, "includeTypes", 2 );
1232                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
1233                 append( sb, "Expression: ${includeTypes}", 3 );
1234                 append( sb, "", 0 );
1235 
1236                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
1237                 append( sb, "Directory to store flag files", 3 );
1238                 append( sb, "Expression: ${markersDirectory}", 3 );
1239                 append( sb, "", 0 );
1240 
1241                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
1242                 append( sb, "Output absolute filename for resolved artifacts", 3 );
1243                 append( sb, "Expression: ${outputAbsoluteArtifactFilename}", 3 );
1244                 append( sb, "", 0 );
1245 
1246                 append( sb, "outputFile", 2 );
1247                 append( sb, "If specified, this parameter will cause the dependencies to be written to the path specified, instead of writing to the console.", 3 );
1248                 append( sb, "Expression: ${outputFile}", 3 );
1249                 append( sb, "", 0 );
1250 
1251                 append( sb, "overWriteIfNewer (Default: true)", 2 );
1252                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
1253                 append( sb, "Expression: ${overWriteIfNewer}", 3 );
1254                 append( sb, "", 0 );
1255 
1256                 append( sb, "overWriteReleases (Default: false)", 2 );
1257                 append( sb, "Overwrite release artifacts", 3 );
1258                 append( sb, "Expression: ${overWriteReleases}", 3 );
1259                 append( sb, "", 0 );
1260 
1261                 append( sb, "overWriteSnapshots (Default: false)", 2 );
1262                 append( sb, "Overwrite snapshot artifacts", 3 );
1263                 append( sb, "Expression: ${overWriteSnapshots}", 3 );
1264                 append( sb, "", 0 );
1265 
1266                 append( sb, "prependGroupId (Default: false)", 2 );
1267                 append( sb, "Prepend the groupId during copy.", 3 );
1268                 append( sb, "Expression: ${mdep.prependGroupId}", 3 );
1269                 append( sb, "", 0 );
1270 
1271                 append( sb, "silent (Default: false)", 2 );
1272                 append( sb, "If the plugin should be silent.", 3 );
1273                 append( sb, "Expression: ${silent}", 3 );
1274                 append( sb, "", 0 );
1275 
1276                 append( sb, "type (Default: java-source)", 2 );
1277                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
1278                 append( sb, "Expression: ${type}", 3 );
1279                 append( sb, "", 0 );
1280             }
1281         }
1282 
1283         if ( goal == null || goal.length() <= 0 || "sources".equals( goal ) )
1284         {
1285             append( sb, "dependency:sources", 0 );
1286             append( sb, "Goal that resolves the project source dependencies from the repository.", 1 );
1287             append( sb, "", 0 );
1288             if ( detail )
1289             {
1290                 append( sb, "Available parameters:", 1 );
1291                 append( sb, "", 0 );
1292 
1293                 append( sb, "appendOutput (Default: false)", 2 );
1294                 append( sb, "Whether to append outputs into the output file or overwrite it.", 3 );
1295                 append( sb, "Expression: ${appendOutput}", 3 );
1296                 append( sb, "", 0 );
1297 
1298                 append( sb, "classifier", 2 );
1299                 append( sb, "Specify classifier to look for. Example: sources", 3 );
1300                 append( sb, "Expression: ${classifier}", 3 );
1301                 append( sb, "", 0 );
1302 
1303                 append( sb, "excludeArtifactIds", 2 );
1304                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
1305                 append( sb, "Expression: ${excludeArtifactIds}", 3 );
1306                 append( sb, "", 0 );
1307 
1308                 append( sb, "excludeClassifiers", 2 );
1309                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
1310                 append( sb, "Expression: ${excludeClassifiers}", 3 );
1311                 append( sb, "", 0 );
1312 
1313                 append( sb, "excludeGroupIds", 2 );
1314                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
1315                 append( sb, "Expression: ${excludeGroupIds}", 3 );
1316                 append( sb, "", 0 );
1317 
1318                 append( sb, "excludeScope", 2 );
1319                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
1320                 append( sb, "Expression: ${excludeScope}", 3 );
1321                 append( sb, "", 0 );
1322 
1323                 append( sb, "excludeTransitive (Default: false)", 2 );
1324                 append( sb, "If we should exclude transitive dependencies", 3 );
1325                 append( sb, "Expression: ${excludeTransitive}", 3 );
1326                 append( sb, "", 0 );
1327 
1328                 append( sb, "excludeTypes", 2 );
1329                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
1330                 append( sb, "Expression: ${excludeTypes}", 3 );
1331                 append( sb, "", 0 );
1332 
1333                 append( sb, "includeArtifactIds", 2 );
1334                 append( sb, "Comma separated list of Artifact names to include.", 3 );
1335                 append( sb, "Expression: ${includeArtifactIds}", 3 );
1336                 append( sb, "", 0 );
1337 
1338                 append( sb, "includeClassifiers", 2 );
1339                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
1340                 append( sb, "Expression: ${includeClassifiers}", 3 );
1341                 append( sb, "", 0 );
1342 
1343                 append( sb, "includeGroupIds", 2 );
1344                 append( sb, "Comma separated list of GroupIds to include.", 3 );
1345                 append( sb, "Expression: ${includeGroupIds}", 3 );
1346                 append( sb, "", 0 );
1347 
1348                 append( sb, "includeScope", 2 );
1349                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
1350                 append( sb, "Expression: ${includeScope}", 3 );
1351                 append( sb, "", 0 );
1352 
1353                 append( sb, "includeTypes", 2 );
1354                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
1355                 append( sb, "Expression: ${includeTypes}", 3 );
1356                 append( sb, "", 0 );
1357 
1358                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
1359                 append( sb, "Directory to store flag files", 3 );
1360                 append( sb, "Expression: ${markersDirectory}", 3 );
1361                 append( sb, "", 0 );
1362 
1363                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
1364                 append( sb, "Output absolute filename for resolved artifacts", 3 );
1365                 append( sb, "Expression: ${outputAbsoluteArtifactFilename}", 3 );
1366                 append( sb, "", 0 );
1367 
1368                 append( sb, "outputFile", 2 );
1369                 append( sb, "If specified, this parameter will cause the dependencies to be written to the path specified, instead of writing to the console.", 3 );
1370                 append( sb, "Expression: ${outputFile}", 3 );
1371                 append( sb, "", 0 );
1372 
1373                 append( sb, "overWriteIfNewer (Default: true)", 2 );
1374                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
1375                 append( sb, "Expression: ${overWriteIfNewer}", 3 );
1376                 append( sb, "", 0 );
1377 
1378                 append( sb, "overWriteReleases (Default: false)", 2 );
1379                 append( sb, "Overwrite release artifacts", 3 );
1380                 append( sb, "Expression: ${overWriteReleases}", 3 );
1381                 append( sb, "", 0 );
1382 
1383                 append( sb, "overWriteSnapshots (Default: false)", 2 );
1384                 append( sb, "Overwrite snapshot artifacts", 3 );
1385                 append( sb, "Expression: ${overWriteSnapshots}", 3 );
1386                 append( sb, "", 0 );
1387 
1388                 append( sb, "prependGroupId (Default: false)", 2 );
1389                 append( sb, "Prepend the groupId during copy.", 3 );
1390                 append( sb, "Expression: ${mdep.prependGroupId}", 3 );
1391                 append( sb, "", 0 );
1392 
1393                 append( sb, "silent (Default: false)", 2 );
1394                 append( sb, "If the plugin should be silent.", 3 );
1395                 append( sb, "Expression: ${silent}", 3 );
1396                 append( sb, "", 0 );
1397 
1398                 append( sb, "type (Default: java-source)", 2 );
1399                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
1400                 append( sb, "Expression: ${type}", 3 );
1401                 append( sb, "", 0 );
1402             }
1403         }
1404 
1405         if ( goal == null || goal.length() <= 0 || "tree".equals( goal ) )
1406         {
1407             append( sb, "dependency:tree", 0 );
1408             append( sb, "Displays the dependency tree for this project.", 1 );
1409             append( sb, "", 0 );
1410             if ( detail )
1411             {
1412                 append( sb, "Available parameters:", 1 );
1413                 append( sb, "", 0 );
1414 
1415                 append( sb, "appendOutput (Default: false)", 2 );
1416                 append( sb, "Whether to append outputs into the output file or overwrite it.", 3 );
1417                 append( sb, "Expression: ${appendOutput}", 3 );
1418                 append( sb, "", 0 );
1419 
1420                 append( sb, "excludes", 2 );
1421                 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 );
1422                 append( sb, "Expression: ${excludes}", 3 );
1423                 append( sb, "", 0 );
1424 
1425                 append( sb, "includes", 2 );
1426                 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 );
1427                 append( sb, "Expression: ${includes}", 3 );
1428                 append( sb, "", 0 );
1429 
1430                 append( sb, "output", 2 );
1431                 append( sb, "Deprecated. use outputFile instead.", 3 );
1432                 append( sb, "", 0 );
1433                 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 );
1434                 append( sb, "Expression: ${output}", 3 );
1435                 append( sb, "", 0 );
1436 
1437                 append( sb, "outputFile", 2 );
1438                 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 );
1439                 append( sb, "Expression: ${outputFile}", 3 );
1440                 append( sb, "", 0 );
1441 
1442                 append( sb, "outputType (Default: text)", 2 );
1443                 append( sb, "If specified, this parameter will cause the dependency tree to be written using the specified format. Currently supported format are text, dot, graphml and tgf. These formats can be plotted to image files. An example of how to plot a dot file using pygraphviz can be found here", 3 );
1444                 append( sb, "Expression: ${outputType}", 3 );
1445                 append( sb, "", 0 );
1446 
1447                 append( sb, "scope", 2 );
1448                 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 );
1449                 append( sb, "Expression: ${scope}", 3 );
1450                 append( sb, "", 0 );
1451 
1452                 append( sb, "tokens (Default: standard)", 2 );
1453                 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 );
1454                 append( sb, "Expression: ${tokens}", 3 );
1455                 append( sb, "", 0 );
1456 
1457                 append( sb, "verbose (Default: false)", 2 );
1458                 append( sb, "Whether to include omitted nodes in the serialized dependency tree.", 3 );
1459                 append( sb, "Expression: ${verbose}", 3 );
1460                 append( sb, "", 0 );
1461             }
1462         }
1463 
1464         if ( goal == null || goal.length() <= 0 || "unpack".equals( goal ) )
1465         {
1466             append( sb, "dependency:unpack", 0 );
1467             append( sb, "Goal that retrieves a list of artifacts from the repository and unpacks them in a defined location.", 1 );
1468             append( sb, "", 0 );
1469             if ( detail )
1470             {
1471                 append( sb, "Available parameters:", 1 );
1472                 append( sb, "", 0 );
1473 
1474                 append( sb, "artifactItems", 2 );
1475                 append( sb, "Collection of ArtifactItems to work on. (ArtifactItem contains groupId, artifactId, version, type, classifier, location, destFileName, markerFile and overwrite.) See Usage for details.", 3 );
1476                 append( sb, "Required: Yes", 3 );
1477                 append( sb, "", 0 );
1478 
1479                 append( sb, "excludes", 2 );
1480                 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 );
1481                 append( sb, "Expression: ${mdep.unpack.excludes}", 3 );
1482                 append( sb, "", 0 );
1483 
1484                 append( sb, "includes", 2 );
1485                 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 );
1486                 append( sb, "Expression: ${mdep.unpack.includes}", 3 );
1487                 append( sb, "", 0 );
1488 
1489                 append( sb, "localRepositoryDirectory", 2 );
1490                 append( sb, "Path to override default local repository during plugin\'s execution. To remove all downloaded artifacts as part of the build, set this value to a location under your project\'s target directory", 3 );
1491                 append( sb, "", 0 );
1492 
1493                 append( sb, "markersDirectory", 2 );
1494                 append( sb, "Directory to store flag files after unpack", 3 );
1495                 append( sb, "Expression: ${project.build.directory}/dependency-maven-plugin-markers", 3 );
1496                 append( sb, "", 0 );
1497 
1498                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
1499                 append( sb, "Output absolute filename for resolved artifacts", 3 );
1500                 append( sb, "Expression: ${outputAbsoluteArtifactFilename}", 3 );
1501                 append( sb, "", 0 );
1502 
1503                 append( sb, "outputDirectory (Default: ${project.build.directory}/dependency)", 2 );
1504                 append( sb, "Default location used for mojo unless overridden in ArtifactItem", 3 );
1505                 append( sb, "Expression: ${outputDirectory}", 3 );
1506                 append( sb, "", 0 );
1507 
1508                 append( sb, "overWriteIfNewer (Default: true)", 2 );
1509                 append( sb, "Overwrite if newer", 3 );
1510                 append( sb, "Expression: ${mdep.overIfNewer}", 3 );
1511                 append( sb, "", 0 );
1512 
1513                 append( sb, "overWriteReleases (Default: false)", 2 );
1514                 append( sb, "Overwrite release artifacts", 3 );
1515                 append( sb, "Expression: ${mdep.overWriteReleases}", 3 );
1516                 append( sb, "", 0 );
1517 
1518                 append( sb, "overWriteSnapshots (Default: false)", 2 );
1519                 append( sb, "Overwrite snapshot artifacts", 3 );
1520                 append( sb, "Expression: ${mdep.overWriteSnapshots}", 3 );
1521                 append( sb, "", 0 );
1522 
1523                 append( sb, "silent (Default: false)", 2 );
1524                 append( sb, "If the plugin should be silent.", 3 );
1525                 append( sb, "Expression: ${silent}", 3 );
1526                 append( sb, "", 0 );
1527 
1528                 append( sb, "skip (Default: false)", 2 );
1529                 append( sb, "Skip the execution", 3 );
1530                 append( sb, "Expression: ${mdep.skip}", 3 );
1531                 append( sb, "", 0 );
1532             }
1533         }
1534 
1535         if ( goal == null || goal.length() <= 0 || "unpack-dependencies".equals( goal ) )
1536         {
1537             append( sb, "dependency:unpack-dependencies", 0 );
1538             append( sb, "Goal that unpacks the project dependencies from the repository to a defined location.", 1 );
1539             append( sb, "", 0 );
1540             if ( detail )
1541             {
1542                 append( sb, "Available parameters:", 1 );
1543                 append( sb, "", 0 );
1544 
1545                 append( sb, "classifier", 2 );
1546                 append( sb, "Specify classifier to look for. Example: sources", 3 );
1547                 append( sb, "Expression: ${classifier}", 3 );
1548                 append( sb, "", 0 );
1549 
1550                 append( sb, "copyPom (Default: false)", 2 );
1551                 append( sb, "Also copy the pom of each artifact.", 3 );
1552                 append( sb, "Expression: ${mdep.copyPom}", 3 );
1553                 append( sb, "", 0 );
1554 
1555                 append( sb, "excludeArtifactIds", 2 );
1556                 append( sb, "Comma separated list of Artifact names too exclude.", 3 );
1557                 append( sb, "Expression: ${excludeArtifactIds}", 3 );
1558                 append( sb, "", 0 );
1559 
1560                 append( sb, "excludeClassifiers", 2 );
1561                 append( sb, "Comma Separated list of Classifiers to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
1562                 append( sb, "Expression: ${excludeClassifiers}", 3 );
1563                 append( sb, "", 0 );
1564 
1565                 append( sb, "excludeGroupIds", 2 );
1566                 append( sb, "Comma separated list of GroupId Names to exclude.", 3 );
1567                 append( sb, "Expression: ${excludeGroupIds}", 3 );
1568                 append( sb, "", 0 );
1569 
1570                 append( sb, "excludes", 2 );
1571                 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 );
1572                 append( sb, "Expression: ${mdep.unpack.excludes}", 3 );
1573                 append( sb, "", 0 );
1574 
1575                 append( sb, "excludeScope", 2 );
1576                 append( sb, "Scope to exclude. An Empty string indicates no scopes (default).", 3 );
1577                 append( sb, "Expression: ${excludeScope}", 3 );
1578                 append( sb, "", 0 );
1579 
1580                 append( sb, "excludeTransitive (Default: false)", 2 );
1581                 append( sb, "If we should exclude transitive dependencies", 3 );
1582                 append( sb, "Expression: ${excludeTransitive}", 3 );
1583                 append( sb, "", 0 );
1584 
1585                 append( sb, "excludeTypes", 2 );
1586                 append( sb, "Comma Separated list of Types to exclude. Empty String indicates don\'t exclude anything (default).", 3 );
1587                 append( sb, "Expression: ${excludeTypes}", 3 );
1588                 append( sb, "", 0 );
1589 
1590                 append( sb, "failOnMissingClassifierArtifact (Default: true)", 2 );
1591                 append( sb, "This only applies if the classifier parameter is used.", 3 );
1592                 append( sb, "Expression: ${mdep.failOnMissingClassifierArtifact}", 3 );
1593                 append( sb, "", 0 );
1594 
1595                 append( sb, "includeArtifactIds", 2 );
1596                 append( sb, "Comma separated list of Artifact names to include.", 3 );
1597                 append( sb, "Expression: ${includeArtifactIds}", 3 );
1598                 append( sb, "", 0 );
1599 
1600                 append( sb, "includeClassifiers", 2 );
1601                 append( sb, "Comma Separated list of Classifiers to include. Empty String indicates include everything (default).", 3 );
1602                 append( sb, "Expression: ${includeClassifiers}", 3 );
1603                 append( sb, "", 0 );
1604 
1605                 append( sb, "includeGroupIds", 2 );
1606                 append( sb, "Comma separated list of GroupIds to include.", 3 );
1607                 append( sb, "Expression: ${includeGroupIds}", 3 );
1608                 append( sb, "", 0 );
1609 
1610                 append( sb, "includes", 2 );
1611                 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 );
1612                 append( sb, "Expression: ${mdep.unpack.includes}", 3 );
1613                 append( sb, "", 0 );
1614 
1615                 append( sb, "includeScope", 2 );
1616                 append( sb, "Scope to include. An Empty string indicates all scopes (default).", 3 );
1617                 append( sb, "Expression: ${includeScope}", 3 );
1618                 append( sb, "", 0 );
1619 
1620                 append( sb, "includeTypes", 2 );
1621                 append( sb, "Comma Separated list of Types to include. Empty String indicates include everything (default).", 3 );
1622                 append( sb, "Expression: ${includeTypes}", 3 );
1623                 append( sb, "", 0 );
1624 
1625                 append( sb, "markersDirectory (Default: ${project.build.directory}/dependency-maven-plugin-markers)", 2 );
1626                 append( sb, "Directory to store flag files", 3 );
1627                 append( sb, "Expression: ${markersDirectory}", 3 );
1628                 append( sb, "", 0 );
1629 
1630                 append( sb, "outputAbsoluteArtifactFilename (Default: false)", 2 );
1631                 append( sb, "Output absolute filename for resolved artifacts", 3 );
1632                 append( sb, "Expression: ${outputAbsoluteArtifactFilename}", 3 );
1633                 append( sb, "", 0 );
1634 
1635                 append( sb, "outputDirectory (Default: ${project.build.directory}/dependency)", 2 );
1636                 append( sb, "Default location used for mojo unless overridden in ArtifactItem", 3 );
1637                 append( sb, "Expression: ${outputDirectory}", 3 );
1638                 append( sb, "", 0 );
1639 
1640                 append( sb, "overWriteIfNewer (Default: true)", 2 );
1641                 append( sb, "Overwrite artifacts that don\'t exist or are older than the source.", 3 );
1642                 append( sb, "Expression: ${overWriteIfNewer}", 3 );
1643                 append( sb, "", 0 );
1644 
1645                 append( sb, "overWriteReleases (Default: false)", 2 );
1646                 append( sb, "Overwrite release artifacts", 3 );
1647                 append( sb, "Expression: ${overWriteReleases}", 3 );
1648                 append( sb, "", 0 );
1649 
1650                 append( sb, "overWriteSnapshots (Default: false)", 2 );
1651                 append( sb, "Overwrite snapshot artifacts", 3 );
1652                 append( sb, "Expression: ${overWriteSnapshots}", 3 );
1653                 append( sb, "", 0 );
1654 
1655                 append( sb, "prependGroupId (Default: false)", 2 );
1656                 append( sb, "Prepend the groupId during copy.", 3 );
1657                 append( sb, "Expression: ${mdep.prependGroupId}", 3 );
1658                 append( sb, "", 0 );
1659 
1660                 append( sb, "silent (Default: false)", 2 );
1661                 append( sb, "If the plugin should be silent.", 3 );
1662                 append( sb, "Expression: ${silent}", 3 );
1663                 append( sb, "", 0 );
1664 
1665                 append( sb, "stripVersion (Default: false)", 2 );
1666                 append( sb, "Strip artifact version during copy", 3 );
1667                 append( sb, "Expression: ${mdep.stripVersion}", 3 );
1668                 append( sb, "", 0 );
1669 
1670                 append( sb, "type (Default: java-source)", 2 );
1671                 append( sb, "Specify type to look for when constructing artifact based on classifier. Example: java-source,jar,war", 3 );
1672                 append( sb, "Expression: ${type}", 3 );
1673                 append( sb, "", 0 );
1674 
1675                 append( sb, "useRepositoryLayout (Default: false)", 2 );
1676                 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 );
1677                 append( sb, "Expression: ${mdep.useRepositoryLayout}", 3 );
1678                 append( sb, "", 0 );
1679 
1680                 append( sb, "useSubDirectoryPerArtifact (Default: false)", 2 );
1681                 append( sb, "Place each file in a separate subdirectory. (example /outputDirectory/junit-3.8.1-jar)", 3 );
1682                 append( sb, "Expression: ${mdep.useSubDirectoryPerArtifact}", 3 );
1683                 append( sb, "", 0 );
1684 
1685                 append( sb, "useSubDirectoryPerScope (Default: false)", 2 );
1686                 append( sb, "Place each type of file in a separate subdirectory. (example /outputDirectory/runtime /outputDirectory/provided etc)", 3 );
1687                 append( sb, "Expression: ${mdep.useSubDirectoryPerScope}", 3 );
1688                 append( sb, "", 0 );
1689 
1690                 append( sb, "useSubDirectoryPerType (Default: false)", 2 );
1691                 append( sb, "Place each type of file in a separate subdirectory. (example /outputDirectory/jars /outputDirectory/wars etc)", 3 );
1692                 append( sb, "Expression: ${mdep.useSubDirectoryPerType}", 3 );
1693                 append( sb, "", 0 );
1694             }
1695         }
1696 
1697         if ( getLog().isInfoEnabled() )
1698         {
1699             getLog().info( sb.toString() );
1700         }
1701     }
1702 
1703     /**
1704      * <p>Repeat a String <code>n</code> times to form a new string.</p>
1705      *
1706      * @param str String to repeat
1707      * @param repeat number of times to repeat str
1708      * @return String with repeated String
1709      * @throws NegativeArraySizeException if <code>repeat < 0</code>
1710      * @throws NullPointerException if str is <code>null</code>
1711      */
1712     private static String repeat( String str, int repeat )
1713     {
1714         StringBuffer buffer = new StringBuffer( repeat * str.length() );
1715 
1716         for ( int i = 0; i < repeat; i++ )
1717         {
1718             buffer.append( str );
1719         }
1720 
1721         return buffer.toString();
1722     }
1723 
1724     /** 
1725      * Append a description to the buffer by respecting the indentSize and lineLength parameters.
1726      * <b>Note</b>: The last character is always a new line.
1727      * 
1728      * @param sb The buffer to append the description, not <code>null</code>.
1729      * @param description The description, not <code>null</code>.
1730      * @param indent The base indentation level of each line, must not be negative.
1731      */
1732     private void append( StringBuffer sb, String description, int indent )
1733     {
1734         for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); )
1735         {
1736             sb.append( it.next().toString() ).append( '\n' );
1737         }
1738     }
1739 
1740     /** 
1741      * Splits the specified text into lines of convenient display length.
1742      * 
1743      * @param text The text to split into lines, must not be <code>null</code>.
1744      * @param indent The base indentation level of each line, must not be negative.
1745      * @param indentSize The size of each indentation, must not be negative.
1746      * @param lineLength The length of the line, must not be negative.
1747      * @return The sequence of display lines, never <code>null</code>.
1748      * @throws NegativeArraySizeException if <code>indent < 0</code>
1749      */
1750     private static List toLines( String text, int indent, int indentSize, int lineLength )
1751     {
1752         List lines = new ArrayList();
1753 
1754         String ind = repeat( "\t", indent );
1755         String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" );
1756         for ( int i = 0; i < plainLines.length; i++ )
1757         {
1758             toLines( lines, ind + plainLines[i], indentSize, lineLength );
1759         }
1760 
1761         return lines;
1762     }
1763 
1764     /** 
1765      * Adds the specified line to the output sequence, performing line wrapping if necessary.
1766      * 
1767      * @param lines The sequence of display lines, must not be <code>null</code>.
1768      * @param line The line to add, must not be <code>null</code>.
1769      * @param indentSize The size of each indentation, must not be negative.
1770      * @param lineLength The length of the line, must not be negative.
1771      */
1772     private static void toLines( List lines, String line, int indentSize, int lineLength )
1773     {
1774         int lineIndent = getIndentLevel( line );
1775         StringBuffer buf = new StringBuffer( 256 );
1776         String[] tokens = line.split( " +" );
1777         for ( int i = 0; i < tokens.length; i++ )
1778         {
1779             String token = tokens[i];
1780             if ( i > 0 )
1781             {
1782                 if ( buf.length() + token.length() >= lineLength )
1783                 {
1784                     lines.add( buf.toString() );
1785                     buf.setLength( 0 );
1786                     buf.append( repeat( " ", lineIndent * indentSize ) );
1787                 }
1788                 else
1789                 {
1790                     buf.append( ' ' );
1791                 }
1792             }
1793             for ( int j = 0; j < token.length(); j++ )
1794             {
1795                 char c = token.charAt( j );
1796                 if ( c == '\t' )
1797                 {
1798                     buf.append( repeat( " ", indentSize - buf.length() % indentSize ) );
1799                 }
1800                 else if ( c == '\u00A0' )
1801                 {
1802                     buf.append( ' ' );
1803                 }
1804                 else
1805                 {
1806                     buf.append( c );
1807                 }
1808             }
1809         }
1810         lines.add( buf.toString() );
1811     }
1812 
1813     /** 
1814      * Gets the indentation level of the specified line.
1815      * 
1816      * @param line The line whose indentation level should be retrieved, must not be <code>null</code>.
1817      * @return The indentation level of the line.
1818      */
1819     private static int getIndentLevel( String line )
1820     {
1821         int level = 0;
1822         for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ )
1823         {
1824             level++;
1825         }
1826         for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ )
1827         {
1828             if ( line.charAt( i ) == '\t' )
1829             {
1830                 level++;
1831                 break;
1832             }
1833         }
1834         return level;
1835     }
1836 }