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