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