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.0", 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. For more info see this example.", 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, "developmentVersion", 2 ); |
111 | 0 | append( sb, "Default version to use for new local working copy.", 3 ); |
112 | 0 | append( sb, "", 0 ); |
113 | |
|
114 | 0 | append( sb, "dryRun (Default: false)", 2 ); |
115 | 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 ); |
116 | 0 | append( sb, "", 0 ); |
117 | |
|
118 | 0 | append( sb, "javaHome (Default: ${java.home})", 2 ); |
119 | 0 | append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 ); |
120 | 0 | append( sb, "", 0 ); |
121 | |
|
122 | 0 | append( sb, "localCheckout (Default: false)", 2 ); |
123 | 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 ); |
124 | 0 | append( sb, "", 0 ); |
125 | |
|
126 | 0 | append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 ); |
127 | 0 | append( sb, "The command-line local repository directory in use for this build (if specified).", 3 ); |
128 | 0 | append( sb, "", 0 ); |
129 | |
|
130 | 0 | append( sb, "mavenExecutorId (Default: invoker)", 2 ); |
131 | 0 | append( sb, "Role hint of the MavenExecutor implementation to use.", 3 ); |
132 | 0 | append( sb, "", 0 ); |
133 | |
|
134 | 0 | append( sb, "mavenHome (Default: ${maven.home})", 2 ); |
135 | 0 | append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 ); |
136 | 0 | append( sb, "", 0 ); |
137 | |
|
138 | 0 | append( sb, "password", 2 ); |
139 | 0 | append( sb, "The SCM password to use.", 3 ); |
140 | 0 | append( sb, "", 0 ); |
141 | |
|
142 | 0 | append( sb, "pomFileName", 2 ); |
143 | 0 | append( sb, "The file name of the POM to execute any goals against.", 3 ); |
144 | 0 | append( sb, "", 0 ); |
145 | |
|
146 | 0 | append( sb, "providerImplementations", 2 ); |
147 | 0 | append( sb, "List of provider implementations.", 3 ); |
148 | 0 | append( sb, "", 0 ); |
149 | |
|
150 | 0 | append( sb, "releaseVersion", 2 ); |
151 | 0 | append( sb, "Default version to use when preparing a release or a branch.", 3 ); |
152 | 0 | append( sb, "", 0 ); |
153 | |
|
154 | 0 | append( sb, "remoteTagging (Default: true)", 2 ); |
155 | 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 ); |
156 | 0 | append( sb, "", 0 ); |
157 | |
|
158 | 0 | append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 ); |
159 | 0 | append( sb, "The message prefix to use for all SCM changes.", 3 ); |
160 | 0 | append( sb, "", 0 ); |
161 | |
|
162 | 0 | append( sb, "tag", 2 ); |
163 | 0 | append( sb, "The SCM tag to use.", 3 ); |
164 | 0 | append( sb, "", 0 ); |
165 | |
|
166 | 0 | append( sb, "tagBase", 2 ); |
167 | 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 ); |
168 | 0 | append( sb, "", 0 ); |
169 | |
|
170 | 0 | append( sb, "updateBranchVersions (Default: false)", 2 ); |
171 | 0 | append( sb, "Whether to update versions in the branch.", 3 ); |
172 | 0 | append( sb, "", 0 ); |
173 | |
|
174 | 0 | append( sb, "updateDependencies (Default: true)", 2 ); |
175 | 0 | append( sb, "Whether to update dependencies version to the next development version.", 3 ); |
176 | 0 | append( sb, "", 0 ); |
177 | |
|
178 | 0 | append( sb, "updateVersionsToSnapshot (Default: true)", 2 ); |
179 | 0 | append( sb, "Whether to update versions to SNAPSHOT in the branch.", 3 ); |
180 | 0 | append( sb, "", 0 ); |
181 | |
|
182 | 0 | append( sb, "updateWorkingCopyVersions (Default: true)", 2 ); |
183 | 0 | append( sb, "Whether to update versions in the working copy.", 3 ); |
184 | 0 | append( sb, "", 0 ); |
185 | |
|
186 | 0 | append( sb, "useEditMode (Default: false)", 2 ); |
187 | 0 | append( sb, "Whether to use \'edit\' mode on the SCM, to lock the file for editing during SCM operations.", 3 ); |
188 | 0 | append( sb, "", 0 ); |
189 | |
|
190 | 0 | append( sb, "username", 2 ); |
191 | 0 | append( sb, "The SCM username to use.", 3 ); |
192 | 0 | append( sb, "", 0 ); |
193 | |
} |
194 | |
} |
195 | |
|
196 | 0 | if ( goal == null || goal.length() <= 0 || "clean".equals( goal ) ) |
197 | |
{ |
198 | 0 | append( sb, "release:clean", 0 ); |
199 | 0 | append( sb, "Clean up after a release preparation. For more info see this example.", 1 ); |
200 | 0 | append( sb, "", 0 ); |
201 | 0 | if ( detail ) |
202 | |
{ |
203 | 0 | append( sb, "Available parameters:", 1 ); |
204 | 0 | append( sb, "", 0 ); |
205 | |
|
206 | 0 | append( sb, "arguments", 2 ); |
207 | 0 | append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 ); |
208 | 0 | append( sb, "", 0 ); |
209 | |
|
210 | 0 | append( sb, "javaHome (Default: ${java.home})", 2 ); |
211 | 0 | append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 ); |
212 | 0 | append( sb, "", 0 ); |
213 | |
|
214 | 0 | append( sb, "localCheckout (Default: false)", 2 ); |
215 | 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 ); |
216 | 0 | append( sb, "", 0 ); |
217 | |
|
218 | 0 | append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 ); |
219 | 0 | append( sb, "The command-line local repository directory in use for this build (if specified).", 3 ); |
220 | 0 | append( sb, "", 0 ); |
221 | |
|
222 | 0 | append( sb, "mavenExecutorId (Default: invoker)", 2 ); |
223 | 0 | append( sb, "Role hint of the MavenExecutor implementation to use.", 3 ); |
224 | 0 | append( sb, "", 0 ); |
225 | |
|
226 | 0 | append( sb, "mavenHome (Default: ${maven.home})", 2 ); |
227 | 0 | append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 ); |
228 | 0 | append( sb, "", 0 ); |
229 | |
|
230 | 0 | append( sb, "password", 2 ); |
231 | 0 | append( sb, "The SCM password to use.", 3 ); |
232 | 0 | append( sb, "", 0 ); |
233 | |
|
234 | 0 | append( sb, "pomFileName", 2 ); |
235 | 0 | append( sb, "The file name of the POM to execute any goals against.", 3 ); |
236 | 0 | append( sb, "", 0 ); |
237 | |
|
238 | 0 | append( sb, "providerImplementations", 2 ); |
239 | 0 | append( sb, "List of provider implementations.", 3 ); |
240 | 0 | append( sb, "", 0 ); |
241 | |
|
242 | 0 | append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 ); |
243 | 0 | append( sb, "The message prefix to use for all SCM changes.", 3 ); |
244 | 0 | append( sb, "", 0 ); |
245 | |
|
246 | 0 | append( sb, "tag", 2 ); |
247 | 0 | append( sb, "The SCM tag to use.", 3 ); |
248 | 0 | append( sb, "", 0 ); |
249 | |
|
250 | 0 | append( sb, "tagBase", 2 ); |
251 | 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 ); |
252 | 0 | append( sb, "", 0 ); |
253 | |
|
254 | 0 | append( sb, "username", 2 ); |
255 | 0 | append( sb, "The SCM username to use.", 3 ); |
256 | 0 | append( sb, "", 0 ); |
257 | |
} |
258 | |
} |
259 | |
|
260 | 0 | if ( goal == null || goal.length() <= 0 || "help".equals( goal ) ) |
261 | |
{ |
262 | 0 | append( sb, "release:help", 0 ); |
263 | 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 ); |
264 | 0 | append( sb, "", 0 ); |
265 | 0 | if ( detail ) |
266 | |
{ |
267 | 0 | append( sb, "Available parameters:", 1 ); |
268 | 0 | append( sb, "", 0 ); |
269 | |
|
270 | 0 | append( sb, "detail (Default: false)", 2 ); |
271 | 0 | append( sb, "If true, display all settable properties for each goal.", 3 ); |
272 | 0 | append( sb, "", 0 ); |
273 | |
|
274 | 0 | append( sb, "goal", 2 ); |
275 | 0 | append( sb, "The name of the goal for which to show help. If unspecified, all goals will be displayed.", 3 ); |
276 | 0 | append( sb, "", 0 ); |
277 | |
|
278 | 0 | append( sb, "indentSize (Default: 2)", 2 ); |
279 | 0 | append( sb, "The number of spaces per indentation level, should be positive.", 3 ); |
280 | 0 | append( sb, "", 0 ); |
281 | |
|
282 | 0 | append( sb, "lineLength (Default: 80)", 2 ); |
283 | 0 | append( sb, "The maximum length of a display line, should be positive.", 3 ); |
284 | 0 | append( sb, "", 0 ); |
285 | |
} |
286 | |
} |
287 | |
|
288 | 0 | if ( goal == null || goal.length() <= 0 || "perform".equals( goal ) ) |
289 | |
{ |
290 | 0 | append( sb, "release:perform", 0 ); |
291 | 0 | append( sb, "Perform a release from SCM. For more info see this example.", 1 ); |
292 | 0 | append( sb, "", 0 ); |
293 | 0 | if ( detail ) |
294 | |
{ |
295 | 0 | append( sb, "Available parameters:", 1 ); |
296 | 0 | append( sb, "", 0 ); |
297 | |
|
298 | 0 | append( sb, "arguments", 2 ); |
299 | 0 | append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 ); |
300 | 0 | append( sb, "", 0 ); |
301 | |
|
302 | 0 | append( sb, "connectionUrl", 2 ); |
303 | 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 ); |
304 | 0 | append( sb, "", 0 ); |
305 | |
|
306 | 0 | append( sb, "goals", 2 ); |
307 | 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 ); |
308 | 0 | append( sb, "", 0 ); |
309 | |
|
310 | 0 | append( sb, "javaHome (Default: ${java.home})", 2 ); |
311 | 0 | append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 ); |
312 | 0 | append( sb, "", 0 ); |
313 | |
|
314 | 0 | append( sb, "localCheckout (Default: false)", 2 ); |
315 | 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 ); |
316 | 0 | append( sb, "", 0 ); |
317 | |
|
318 | 0 | append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 ); |
319 | 0 | append( sb, "The command-line local repository directory in use for this build (if specified).", 3 ); |
320 | 0 | append( sb, "", 0 ); |
321 | |
|
322 | 0 | append( sb, "mavenExecutorId (Default: invoker)", 2 ); |
323 | 0 | append( sb, "Role hint of the MavenExecutor implementation to use.", 3 ); |
324 | 0 | append( sb, "", 0 ); |
325 | |
|
326 | 0 | append( sb, "mavenHome (Default: ${maven.home})", 2 ); |
327 | 0 | append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 ); |
328 | 0 | append( sb, "", 0 ); |
329 | |
|
330 | 0 | append( sb, "password", 2 ); |
331 | 0 | append( sb, "The SCM password to use.", 3 ); |
332 | 0 | append( sb, "", 0 ); |
333 | |
|
334 | 0 | append( sb, "pomFileName", 2 ); |
335 | 0 | append( sb, "The file name of the POM to execute any goals against.", 3 ); |
336 | 0 | append( sb, "", 0 ); |
337 | |
|
338 | 0 | append( sb, "providerImplementations", 2 ); |
339 | 0 | append( sb, "List of provider implementations.", 3 ); |
340 | 0 | append( sb, "", 0 ); |
341 | |
|
342 | 0 | append( sb, "releaseProfiles", 2 ); |
343 | 0 | append( sb, "Comma separated profiles to enable on deployment, in addition to active profiles for project execution.", 3 ); |
344 | 0 | append( sb, "", 0 ); |
345 | |
|
346 | 0 | append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 ); |
347 | 0 | append( sb, "The message prefix to use for all SCM changes.", 3 ); |
348 | 0 | append( sb, "", 0 ); |
349 | |
|
350 | 0 | append( sb, "tag", 2 ); |
351 | 0 | append( sb, "The SCM tag to use.", 3 ); |
352 | 0 | append( sb, "", 0 ); |
353 | |
|
354 | 0 | append( sb, "tagBase", 2 ); |
355 | 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 ); |
356 | 0 | append( sb, "", 0 ); |
357 | |
|
358 | 0 | append( sb, "useReleaseProfile (Default: true)", 2 ); |
359 | 0 | append( sb, "Whether to use the release profile that adds sources and javadocs to the released artifact, if appropriate.", 3 ); |
360 | 0 | append( sb, "", 0 ); |
361 | |
|
362 | 0 | append( sb, "username", 2 ); |
363 | 0 | append( sb, "The SCM username to use.", 3 ); |
364 | 0 | append( sb, "", 0 ); |
365 | |
|
366 | 0 | append( sb, "workingDirectory (Default: ${project.build.directory}/checkout)", 2 ); |
367 | 0 | append( sb, "The checkout directory.", 3 ); |
368 | 0 | append( sb, "", 0 ); |
369 | |
} |
370 | |
} |
371 | |
|
372 | 0 | if ( goal == null || goal.length() <= 0 || "prepare".equals( goal ) ) |
373 | |
{ |
374 | 0 | append( sb, "release:prepare", 0 ); |
375 | 0 | append( sb, "Prepare for a release in SCM. For more info see this example.", 1 ); |
376 | 0 | append( sb, "", 0 ); |
377 | 0 | if ( detail ) |
378 | |
{ |
379 | 0 | append( sb, "Available parameters:", 1 ); |
380 | 0 | append( sb, "", 0 ); |
381 | |
|
382 | 0 | append( sb, "addSchema (Default: true)", 2 ); |
383 | 0 | append( sb, "Whether to add a schema to the POM if it was previously missing on release.", 3 ); |
384 | 0 | append( sb, "", 0 ); |
385 | |
|
386 | 0 | append( sb, "allowTimestampedSnapshots (Default: false)", 2 ); |
387 | 0 | append( sb, "Whether to allow timestamped SNAPSHOT dependencies. Default is to fail when finding any SNAPSHOT.", 3 ); |
388 | 0 | append( sb, "", 0 ); |
389 | |
|
390 | 0 | append( sb, "arguments", 2 ); |
391 | 0 | append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 ); |
392 | 0 | append( sb, "", 0 ); |
393 | |
|
394 | 0 | append( sb, "autoVersionSubmodules (Default: false)", 2 ); |
395 | 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 ); |
396 | 0 | append( sb, "", 0 ); |
397 | |
|
398 | 0 | append( sb, "commitByProject (Default: false)", 2 ); |
399 | 0 | append( sb, "Commits to do are atomic or by project.", 3 ); |
400 | 0 | append( sb, "", 0 ); |
401 | |
|
402 | 0 | append( sb, "developmentVersion", 2 ); |
403 | 0 | append( sb, "Default version to use for new local working copy.", 3 ); |
404 | 0 | append( sb, "", 0 ); |
405 | |
|
406 | 0 | append( sb, "dryRun (Default: false)", 2 ); |
407 | 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 ); |
408 | 0 | append( sb, "", 0 ); |
409 | |
|
410 | 0 | append( sb, "generateReleasePoms (Default: false)", 2 ); |
411 | 0 | append( sb, "Deprecated. Please use release:prepare-with-pom instead.", 3 ); |
412 | 0 | append( sb, "", 0 ); |
413 | 0 | append( sb, "(no description available)", 3 ); |
414 | 0 | append( sb, "", 0 ); |
415 | |
|
416 | 0 | append( sb, "javaHome (Default: ${java.home})", 2 ); |
417 | 0 | append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 ); |
418 | 0 | append( sb, "", 0 ); |
419 | |
|
420 | 0 | append( sb, "localCheckout (Default: false)", 2 ); |
421 | 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 ); |
422 | 0 | append( sb, "", 0 ); |
423 | |
|
424 | 0 | append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 ); |
425 | 0 | append( sb, "The command-line local repository directory in use for this build (if specified).", 3 ); |
426 | 0 | append( sb, "", 0 ); |
427 | |
|
428 | 0 | append( sb, "mavenExecutorId (Default: invoker)", 2 ); |
429 | 0 | append( sb, "Role hint of the MavenExecutor implementation to use.", 3 ); |
430 | 0 | append( sb, "", 0 ); |
431 | |
|
432 | 0 | append( sb, "mavenHome (Default: ${maven.home})", 2 ); |
433 | 0 | append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 ); |
434 | 0 | append( sb, "", 0 ); |
435 | |
|
436 | 0 | append( sb, "password", 2 ); |
437 | 0 | append( sb, "The SCM password to use.", 3 ); |
438 | 0 | append( sb, "", 0 ); |
439 | |
|
440 | 0 | append( sb, "pomFileName", 2 ); |
441 | 0 | append( sb, "The file name of the POM to execute any goals against.", 3 ); |
442 | 0 | append( sb, "", 0 ); |
443 | |
|
444 | 0 | append( sb, "preparationGoals (Default: clean verify)", 2 ); |
445 | 0 | append( sb, "Goals to run as part of the preparation step, after transformation but before committing. Space delimited.", 3 ); |
446 | 0 | append( sb, "", 0 ); |
447 | |
|
448 | 0 | append( sb, "providerImplementations", 2 ); |
449 | 0 | append( sb, "List of provider implementations.", 3 ); |
450 | 0 | append( sb, "", 0 ); |
451 | |
|
452 | 0 | append( sb, "releaseVersion", 2 ); |
453 | 0 | append( sb, "Default version to use when preparing a release or a branch.", 3 ); |
454 | 0 | append( sb, "", 0 ); |
455 | |
|
456 | 0 | append( sb, "remoteTagging (Default: true)", 2 ); |
457 | 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 ); |
458 | 0 | append( sb, "", 0 ); |
459 | |
|
460 | 0 | append( sb, "resume (Default: true)", 2 ); |
461 | 0 | append( sb, "Resume a previous release attempt from the point where it was stopped.", 3 ); |
462 | 0 | append( sb, "", 0 ); |
463 | |
|
464 | 0 | append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 ); |
465 | 0 | append( sb, "The message prefix to use for all SCM changes.", 3 ); |
466 | 0 | append( sb, "", 0 ); |
467 | |
|
468 | 0 | append( sb, "tag", 2 ); |
469 | 0 | append( sb, "The SCM tag to use.", 3 ); |
470 | 0 | append( sb, "", 0 ); |
471 | |
|
472 | 0 | append( sb, "tagBase", 2 ); |
473 | 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 ); |
474 | 0 | append( sb, "", 0 ); |
475 | |
|
476 | 0 | append( sb, "updateDependencies (Default: true)", 2 ); |
477 | 0 | append( sb, "Whether to update dependencies version to the next development version.", 3 ); |
478 | 0 | append( sb, "", 0 ); |
479 | |
|
480 | 0 | append( sb, "useEditMode (Default: false)", 2 ); |
481 | 0 | append( sb, "Whether to use \'edit\' mode on the SCM, to lock the file for editing during SCM operations.", 3 ); |
482 | 0 | append( sb, "", 0 ); |
483 | |
|
484 | 0 | append( sb, "username", 2 ); |
485 | 0 | append( sb, "The SCM username to use.", 3 ); |
486 | 0 | append( sb, "", 0 ); |
487 | |
} |
488 | |
} |
489 | |
|
490 | 0 | if ( goal == null || goal.length() <= 0 || "prepare-with-pom".equals( goal ) ) |
491 | |
{ |
492 | 0 | append( sb, "release:prepare-with-pom", 0 ); |
493 | 0 | append( sb, "Prepare for a release in SCM, fully resolving dependencies for the purpose of producing a \'release POM\'. For more info see this example.", 1 ); |
494 | 0 | append( sb, "", 0 ); |
495 | 0 | if ( detail ) |
496 | |
{ |
497 | 0 | append( sb, "Available parameters:", 1 ); |
498 | 0 | append( sb, "", 0 ); |
499 | |
|
500 | 0 | append( sb, "addSchema (Default: true)", 2 ); |
501 | 0 | append( sb, "Whether to add a schema to the POM if it was previously missing on release.", 3 ); |
502 | 0 | append( sb, "", 0 ); |
503 | |
|
504 | 0 | append( sb, "allowTimestampedSnapshots (Default: false)", 2 ); |
505 | 0 | append( sb, "Whether to allow timestamped SNAPSHOT dependencies. Default is to fail when finding any SNAPSHOT.", 3 ); |
506 | 0 | append( sb, "", 0 ); |
507 | |
|
508 | 0 | append( sb, "arguments", 2 ); |
509 | 0 | append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 ); |
510 | 0 | append( sb, "", 0 ); |
511 | |
|
512 | 0 | append( sb, "autoVersionSubmodules (Default: false)", 2 ); |
513 | 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 ); |
514 | 0 | append( sb, "", 0 ); |
515 | |
|
516 | 0 | append( sb, "commitByProject (Default: false)", 2 ); |
517 | 0 | append( sb, "Commits to do are atomic or by project.", 3 ); |
518 | 0 | append( sb, "", 0 ); |
519 | |
|
520 | 0 | append( sb, "developmentVersion", 2 ); |
521 | 0 | append( sb, "Default version to use for new local working copy.", 3 ); |
522 | 0 | append( sb, "", 0 ); |
523 | |
|
524 | 0 | append( sb, "dryRun (Default: false)", 2 ); |
525 | 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 ); |
526 | 0 | append( sb, "", 0 ); |
527 | |
|
528 | 0 | append( sb, "generateReleasePoms (Default: true)", 2 ); |
529 | 0 | append( sb, "Whether to generate release-pom.xml files that contain resolved information about the project.", 3 ); |
530 | 0 | append( sb, "", 0 ); |
531 | |
|
532 | 0 | append( sb, "javaHome (Default: ${java.home})", 2 ); |
533 | 0 | append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 ); |
534 | 0 | append( sb, "", 0 ); |
535 | |
|
536 | 0 | append( sb, "localCheckout (Default: false)", 2 ); |
537 | 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 ); |
538 | 0 | append( sb, "", 0 ); |
539 | |
|
540 | 0 | append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 ); |
541 | 0 | append( sb, "The command-line local repository directory in use for this build (if specified).", 3 ); |
542 | 0 | append( sb, "", 0 ); |
543 | |
|
544 | 0 | append( sb, "mavenExecutorId (Default: invoker)", 2 ); |
545 | 0 | append( sb, "Role hint of the MavenExecutor implementation to use.", 3 ); |
546 | 0 | append( sb, "", 0 ); |
547 | |
|
548 | 0 | append( sb, "mavenHome (Default: ${maven.home})", 2 ); |
549 | 0 | append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 ); |
550 | 0 | append( sb, "", 0 ); |
551 | |
|
552 | 0 | append( sb, "password", 2 ); |
553 | 0 | append( sb, "The SCM password to use.", 3 ); |
554 | 0 | append( sb, "", 0 ); |
555 | |
|
556 | 0 | append( sb, "pomFileName", 2 ); |
557 | 0 | append( sb, "The file name of the POM to execute any goals against.", 3 ); |
558 | 0 | append( sb, "", 0 ); |
559 | |
|
560 | 0 | append( sb, "preparationGoals (Default: clean verify)", 2 ); |
561 | 0 | append( sb, "Goals to run as part of the preparation step, after transformation but before committing. Space delimited.", 3 ); |
562 | 0 | append( sb, "", 0 ); |
563 | |
|
564 | 0 | append( sb, "providerImplementations", 2 ); |
565 | 0 | append( sb, "List of provider implementations.", 3 ); |
566 | 0 | append( sb, "", 0 ); |
567 | |
|
568 | 0 | append( sb, "releaseVersion", 2 ); |
569 | 0 | append( sb, "Default version to use when preparing a release or a branch.", 3 ); |
570 | 0 | append( sb, "", 0 ); |
571 | |
|
572 | 0 | append( sb, "remoteTagging (Default: true)", 2 ); |
573 | 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 ); |
574 | 0 | append( sb, "", 0 ); |
575 | |
|
576 | 0 | append( sb, "resume (Default: true)", 2 ); |
577 | 0 | append( sb, "Resume a previous release attempt from the point where it was stopped.", 3 ); |
578 | 0 | append( sb, "", 0 ); |
579 | |
|
580 | 0 | append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 ); |
581 | 0 | append( sb, "The message prefix to use for all SCM changes.", 3 ); |
582 | 0 | append( sb, "", 0 ); |
583 | |
|
584 | 0 | append( sb, "tag", 2 ); |
585 | 0 | append( sb, "The SCM tag to use.", 3 ); |
586 | 0 | append( sb, "", 0 ); |
587 | |
|
588 | 0 | append( sb, "tagBase", 2 ); |
589 | 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 ); |
590 | 0 | append( sb, "", 0 ); |
591 | |
|
592 | 0 | append( sb, "updateDependencies (Default: true)", 2 ); |
593 | 0 | append( sb, "Whether to update dependencies version to the next development version.", 3 ); |
594 | 0 | append( sb, "", 0 ); |
595 | |
|
596 | 0 | append( sb, "useEditMode (Default: false)", 2 ); |
597 | 0 | append( sb, "Whether to use \'edit\' mode on the SCM, to lock the file for editing during SCM operations.", 3 ); |
598 | 0 | append( sb, "", 0 ); |
599 | |
|
600 | 0 | append( sb, "username", 2 ); |
601 | 0 | append( sb, "The SCM username to use.", 3 ); |
602 | 0 | append( sb, "", 0 ); |
603 | |
} |
604 | |
} |
605 | |
|
606 | 0 | if ( goal == null || goal.length() <= 0 || "rollback".equals( goal ) ) |
607 | |
{ |
608 | 0 | append( sb, "release:rollback", 0 ); |
609 | 0 | append( sb, "Rollback changes made by a previous release. For more info see this example.", 1 ); |
610 | 0 | append( sb, "", 0 ); |
611 | 0 | if ( detail ) |
612 | |
{ |
613 | 0 | append( sb, "Available parameters:", 1 ); |
614 | 0 | append( sb, "", 0 ); |
615 | |
|
616 | 0 | append( sb, "arguments", 2 ); |
617 | 0 | append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 ); |
618 | 0 | append( sb, "", 0 ); |
619 | |
|
620 | 0 | append( sb, "javaHome (Default: ${java.home})", 2 ); |
621 | 0 | append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 ); |
622 | 0 | append( sb, "", 0 ); |
623 | |
|
624 | 0 | append( sb, "localCheckout (Default: false)", 2 ); |
625 | 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 ); |
626 | 0 | append( sb, "", 0 ); |
627 | |
|
628 | 0 | append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 ); |
629 | 0 | append( sb, "The command-line local repository directory in use for this build (if specified).", 3 ); |
630 | 0 | append( sb, "", 0 ); |
631 | |
|
632 | 0 | append( sb, "mavenExecutorId (Default: invoker)", 2 ); |
633 | 0 | append( sb, "Role hint of the MavenExecutor implementation to use.", 3 ); |
634 | 0 | append( sb, "", 0 ); |
635 | |
|
636 | 0 | append( sb, "mavenHome (Default: ${maven.home})", 2 ); |
637 | 0 | append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 ); |
638 | 0 | append( sb, "", 0 ); |
639 | |
|
640 | 0 | append( sb, "password", 2 ); |
641 | 0 | append( sb, "The SCM password to use.", 3 ); |
642 | 0 | append( sb, "", 0 ); |
643 | |
|
644 | 0 | append( sb, "pomFileName", 2 ); |
645 | 0 | append( sb, "The file name of the POM to execute any goals against.", 3 ); |
646 | 0 | append( sb, "", 0 ); |
647 | |
|
648 | 0 | append( sb, "providerImplementations", 2 ); |
649 | 0 | append( sb, "List of provider implementations.", 3 ); |
650 | 0 | append( sb, "", 0 ); |
651 | |
|
652 | 0 | append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 ); |
653 | 0 | append( sb, "The message prefix to use for all SCM changes.", 3 ); |
654 | 0 | append( sb, "", 0 ); |
655 | |
|
656 | 0 | append( sb, "tag", 2 ); |
657 | 0 | append( sb, "The SCM tag to use.", 3 ); |
658 | 0 | append( sb, "", 0 ); |
659 | |
|
660 | 0 | append( sb, "tagBase", 2 ); |
661 | 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 ); |
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 || "stage".equals( goal ) ) |
671 | |
{ |
672 | 0 | append( sb, "release:stage", 0 ); |
673 | 0 | append( sb, "Perform a release from SCM to a staging repository.", 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, "connectionUrl", 2 ); |
685 | 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 ); |
686 | 0 | append( sb, "", 0 ); |
687 | |
|
688 | 0 | append( sb, "goals", 2 ); |
689 | 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 ); |
690 | 0 | append( sb, "", 0 ); |
691 | |
|
692 | 0 | append( sb, "javaHome (Default: ${java.home})", 2 ); |
693 | 0 | append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 ); |
694 | 0 | append( sb, "", 0 ); |
695 | |
|
696 | 0 | append( sb, "localCheckout (Default: false)", 2 ); |
697 | 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 ); |
698 | 0 | append( sb, "", 0 ); |
699 | |
|
700 | 0 | append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 ); |
701 | 0 | append( sb, "The command-line local repository directory in use for this build (if specified).", 3 ); |
702 | 0 | append( sb, "", 0 ); |
703 | |
|
704 | 0 | append( sb, "mavenExecutorId (Default: invoker)", 2 ); |
705 | 0 | append( sb, "Role hint of the MavenExecutor implementation to use.", 3 ); |
706 | 0 | append( sb, "", 0 ); |
707 | |
|
708 | 0 | append( sb, "mavenHome (Default: ${maven.home})", 2 ); |
709 | 0 | append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 ); |
710 | 0 | append( sb, "", 0 ); |
711 | |
|
712 | 0 | append( sb, "password", 2 ); |
713 | 0 | append( sb, "The SCM password to use.", 3 ); |
714 | 0 | append( sb, "", 0 ); |
715 | |
|
716 | 0 | append( sb, "pomFileName", 2 ); |
717 | 0 | append( sb, "The file name of the POM to execute any goals against.", 3 ); |
718 | 0 | append( sb, "", 0 ); |
719 | |
|
720 | 0 | append( sb, "providerImplementations", 2 ); |
721 | 0 | append( sb, "List of provider implementations.", 3 ); |
722 | 0 | append( sb, "", 0 ); |
723 | |
|
724 | 0 | append( sb, "releaseProfiles", 2 ); |
725 | 0 | append( sb, "Comma separated profiles to enable on deployment, in addition to active profiles for project execution.", 3 ); |
726 | 0 | append( sb, "", 0 ); |
727 | |
|
728 | 0 | append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 ); |
729 | 0 | append( sb, "The message prefix to use for all SCM changes.", 3 ); |
730 | 0 | append( sb, "", 0 ); |
731 | |
|
732 | 0 | append( sb, "stagingRepository", 2 ); |
733 | 0 | append( sb, "URL of the staging repository to use.", 3 ); |
734 | 0 | append( sb, "", 0 ); |
735 | |
|
736 | 0 | append( sb, "tag", 2 ); |
737 | 0 | append( sb, "The SCM tag to use.", 3 ); |
738 | 0 | append( sb, "", 0 ); |
739 | |
|
740 | 0 | append( sb, "tagBase", 2 ); |
741 | 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 ); |
742 | 0 | append( sb, "", 0 ); |
743 | |
|
744 | 0 | append( sb, "useReleaseProfile (Default: true)", 2 ); |
745 | 0 | append( sb, "Whether to use the release profile that adds sources and javadocs to the released artifact, if appropriate.", 3 ); |
746 | 0 | append( sb, "", 0 ); |
747 | |
|
748 | 0 | append( sb, "username", 2 ); |
749 | 0 | append( sb, "The SCM username to use.", 3 ); |
750 | 0 | append( sb, "", 0 ); |
751 | |
|
752 | 0 | append( sb, "workingDirectory (Default: ${project.build.directory}/checkout)", 2 ); |
753 | 0 | append( sb, "The checkout directory.", 3 ); |
754 | 0 | append( sb, "", 0 ); |
755 | |
} |
756 | |
} |
757 | |
|
758 | 0 | if ( goal == null || goal.length() <= 0 || "update-versions".equals( goal ) ) |
759 | |
{ |
760 | 0 | append( sb, "release:update-versions", 0 ); |
761 | 0 | append( sb, "Update the POM versions for a project. For more info see this example.", 1 ); |
762 | 0 | append( sb, "", 0 ); |
763 | 0 | if ( detail ) |
764 | |
{ |
765 | 0 | append( sb, "Available parameters:", 1 ); |
766 | 0 | append( sb, "", 0 ); |
767 | |
|
768 | 0 | append( sb, "addSchema (Default: true)", 2 ); |
769 | 0 | append( sb, "Whether to add a schema to the POM if it was previously missing on release.", 3 ); |
770 | 0 | append( sb, "", 0 ); |
771 | |
|
772 | 0 | append( sb, "arguments", 2 ); |
773 | 0 | append( sb, "Additional arguments to pass to the Maven executions, separated by spaces.", 3 ); |
774 | 0 | append( sb, "", 0 ); |
775 | |
|
776 | 0 | append( sb, "autoVersionSubmodules (Default: false)", 2 ); |
777 | 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 ); |
778 | 0 | append( sb, "", 0 ); |
779 | |
|
780 | 0 | append( sb, "developmentVersion", 2 ); |
781 | 0 | append( sb, "Default version to use for new local working copy.", 3 ); |
782 | 0 | append( sb, "", 0 ); |
783 | |
|
784 | 0 | append( sb, "javaHome (Default: ${java.home})", 2 ); |
785 | 0 | append( sb, "The JAVA_HOME parameter to use for forked Maven invocations.", 3 ); |
786 | 0 | append( sb, "", 0 ); |
787 | |
|
788 | 0 | append( sb, "localCheckout (Default: false)", 2 ); |
789 | 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 ); |
790 | 0 | append( sb, "", 0 ); |
791 | |
|
792 | 0 | append( sb, "localRepoDirectory (Default: ${maven.repo.local})", 2 ); |
793 | 0 | append( sb, "The command-line local repository directory in use for this build (if specified).", 3 ); |
794 | 0 | append( sb, "", 0 ); |
795 | |
|
796 | 0 | append( sb, "mavenExecutorId (Default: invoker)", 2 ); |
797 | 0 | append( sb, "Role hint of the MavenExecutor implementation to use.", 3 ); |
798 | 0 | append( sb, "", 0 ); |
799 | |
|
800 | 0 | append( sb, "mavenHome (Default: ${maven.home})", 2 ); |
801 | 0 | append( sb, "The M2_HOME parameter to use for forked Maven invocations.", 3 ); |
802 | 0 | append( sb, "", 0 ); |
803 | |
|
804 | 0 | append( sb, "password", 2 ); |
805 | 0 | append( sb, "The SCM password to use.", 3 ); |
806 | 0 | append( sb, "", 0 ); |
807 | |
|
808 | 0 | append( sb, "pomFileName", 2 ); |
809 | 0 | append( sb, "The file name of the POM to execute any goals against.", 3 ); |
810 | 0 | append( sb, "", 0 ); |
811 | |
|
812 | 0 | append( sb, "providerImplementations", 2 ); |
813 | 0 | append( sb, "List of provider implementations.", 3 ); |
814 | 0 | append( sb, "", 0 ); |
815 | |
|
816 | 0 | append( sb, "scmCommentPrefix (Default: [maven-release-plugin] )", 2 ); |
817 | 0 | append( sb, "The message prefix to use for all SCM changes.", 3 ); |
818 | 0 | append( sb, "", 0 ); |
819 | |
|
820 | 0 | append( sb, "tag", 2 ); |
821 | 0 | append( sb, "The SCM tag to use.", 3 ); |
822 | 0 | append( sb, "", 0 ); |
823 | |
|
824 | 0 | append( sb, "tagBase", 2 ); |
825 | 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 ); |
826 | 0 | append( sb, "", 0 ); |
827 | |
|
828 | 0 | append( sb, "username", 2 ); |
829 | 0 | append( sb, "The SCM username to use.", 3 ); |
830 | 0 | append( sb, "", 0 ); |
831 | |
} |
832 | |
} |
833 | |
|
834 | 0 | if ( getLog().isInfoEnabled() ) |
835 | |
{ |
836 | 0 | getLog().info( sb.toString() ); |
837 | |
} |
838 | 0 | } |
839 | |
|
840 | |
|
841 | |
|
842 | |
|
843 | |
|
844 | |
|
845 | |
|
846 | |
|
847 | |
|
848 | |
|
849 | |
private static String repeat( String str, int repeat ) |
850 | |
{ |
851 | 0 | StringBuffer buffer = new StringBuffer( repeat * str.length() ); |
852 | |
|
853 | 0 | for ( int i = 0; i < repeat; i++ ) |
854 | |
{ |
855 | 0 | buffer.append( str ); |
856 | |
} |
857 | |
|
858 | 0 | return buffer.toString(); |
859 | |
} |
860 | |
|
861 | |
|
862 | |
|
863 | |
|
864 | |
|
865 | |
|
866 | |
|
867 | |
|
868 | |
|
869 | |
private void append( StringBuffer sb, String description, int indent ) |
870 | |
{ |
871 | 0 | for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); ) |
872 | |
{ |
873 | 0 | sb.append( it.next().toString() ).append( '\n' ); |
874 | |
} |
875 | 0 | } |
876 | |
|
877 | |
|
878 | |
|
879 | |
|
880 | |
|
881 | |
|
882 | |
|
883 | |
|
884 | |
|
885 | |
|
886 | |
|
887 | |
private static List toLines( String text, int indent, int indentSize, int lineLength ) |
888 | |
{ |
889 | 0 | List lines = new ArrayList(); |
890 | |
|
891 | 0 | String ind = repeat( "\t", indent ); |
892 | 0 | String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" ); |
893 | 0 | for ( int i = 0; i < plainLines.length; i++ ) |
894 | |
{ |
895 | 0 | toLines( lines, ind + plainLines[i], indentSize, lineLength ); |
896 | |
} |
897 | |
|
898 | 0 | return lines; |
899 | |
} |
900 | |
|
901 | |
|
902 | |
|
903 | |
|
904 | |
|
905 | |
|
906 | |
|
907 | |
|
908 | |
|
909 | |
private static void toLines( List lines, String line, int indentSize, int lineLength ) |
910 | |
{ |
911 | 0 | int lineIndent = getIndentLevel( line ); |
912 | 0 | StringBuffer buf = new StringBuffer( 256 ); |
913 | 0 | String[] tokens = line.split( " +" ); |
914 | 0 | for ( int i = 0; i < tokens.length; i++ ) |
915 | |
{ |
916 | 0 | String token = tokens[i]; |
917 | 0 | if ( i > 0 ) |
918 | |
{ |
919 | 0 | if ( buf.length() + token.length() >= lineLength ) |
920 | |
{ |
921 | 0 | lines.add( buf.toString() ); |
922 | 0 | buf.setLength( 0 ); |
923 | 0 | buf.append( repeat( " ", lineIndent * indentSize ) ); |
924 | |
} |
925 | |
else |
926 | |
{ |
927 | 0 | buf.append( ' ' ); |
928 | |
} |
929 | |
} |
930 | 0 | for ( int j = 0; j < token.length(); j++ ) |
931 | |
{ |
932 | 0 | char c = token.charAt( j ); |
933 | 0 | if ( c == '\t' ) |
934 | |
{ |
935 | 0 | buf.append( repeat( " ", indentSize - buf.length() % indentSize ) ); |
936 | |
} |
937 | 0 | else if ( c == '\u00A0' ) |
938 | |
{ |
939 | 0 | buf.append( ' ' ); |
940 | |
} |
941 | |
else |
942 | |
{ |
943 | 0 | buf.append( c ); |
944 | |
} |
945 | |
} |
946 | |
} |
947 | 0 | lines.add( buf.toString() ); |
948 | 0 | } |
949 | |
|
950 | |
|
951 | |
|
952 | |
|
953 | |
|
954 | |
|
955 | |
|
956 | |
private static int getIndentLevel( String line ) |
957 | |
{ |
958 | 0 | int level = 0; |
959 | 0 | for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ ) |
960 | |
{ |
961 | 0 | level++; |
962 | |
} |
963 | 0 | for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ ) |
964 | |
{ |
965 | 0 | if ( line.charAt( i ) == '\t' ) |
966 | |
{ |
967 | 0 | level++; |
968 | 0 | break; |
969 | |
} |
970 | |
} |
971 | 0 | return level; |
972 | |
} |
973 | |
} |