1 | |
package org.apache.maven.plugins.site; |
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-site-plugin:2.2", 0 ); |
68 | 0 | append( sb, "", 0 ); |
69 | |
|
70 | 0 | append( sb, "Maven Site Plugin", 0 ); |
71 | 0 | append( sb, "The Maven Site Plugin is a plugin that generates a site for the current project.", 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 || "attach-descriptor".equals( goal ) ) |
81 | |
{ |
82 | 0 | append( sb, "site:attach-descriptor", 0 ); |
83 | 0 | append( sb, "Adds the site descriptor (site.xml) to the list of files to be installed/deployed.", 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, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 ); |
91 | 0 | append( sb, "Specifies the input encoding.", 3 ); |
92 | 0 | append( sb, "", 0 ); |
93 | |
|
94 | 0 | append( sb, "locales", 2 ); |
95 | 0 | append( sb, "A comma separated list of locales supported by Maven. The first valid token will be the default Locale for this instance of the Java Virtual Machine.", 3 ); |
96 | 0 | append( sb, "", 0 ); |
97 | |
|
98 | 0 | append( sb, "localRepository (Default: ${localRepository})", 2 ); |
99 | 0 | append( sb, "The local repository.", 3 ); |
100 | 0 | append( sb, "", 0 ); |
101 | |
|
102 | 0 | append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 ); |
103 | 0 | append( sb, "Specifies the output encoding.", 3 ); |
104 | 0 | append( sb, "", 0 ); |
105 | |
|
106 | 0 | append( sb, "siteDirectory (Default: ${basedir}/src/site)", 2 ); |
107 | 0 | append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 ); |
108 | 0 | append( sb, "", 0 ); |
109 | |
} |
110 | |
} |
111 | |
|
112 | 0 | if ( goal == null || goal.length() <= 0 || "deploy".equals( goal ) ) |
113 | |
{ |
114 | 0 | append( sb, "site:deploy", 0 ); |
115 | 0 | append( sb, "Deploys the generated site using scp or file protocol to the site URL specified in the <distributionManagement> section of the POM.\nFor scp protocol, the website files are packaged into zip archive, then the archive is transfered to the remote host, next it is un-archived. This method of deployment should normally be much faster than making a file by file copy. For file protocol, the files are copied directly to the destination directory.\n", 1 ); |
116 | 0 | append( sb, "", 0 ); |
117 | 0 | if ( detail ) |
118 | |
{ |
119 | 0 | append( sb, "Available parameters:", 1 ); |
120 | 0 | append( sb, "", 0 ); |
121 | |
|
122 | 0 | append( sb, "chmod (Default: true)", 2 ); |
123 | 0 | append( sb, "Whether to run the \'chmod\' command on the remote site after the deploy. Defaults to \'true\'.", 3 ); |
124 | 0 | append( sb, "", 0 ); |
125 | |
|
126 | 0 | append( sb, "chmodMode (Default: g+w,a+rX)", 2 ); |
127 | 0 | append( sb, "The mode used by the \'chmod\' command. Only used if chmod = true. Defaults to \'g+w,a+rX\'.", 3 ); |
128 | 0 | append( sb, "", 0 ); |
129 | |
|
130 | 0 | append( sb, "chmodOptions (Default: -Rf)", 2 ); |
131 | 0 | append( sb, "The options used by the \'chmod\' command. Only used if chmod = true. Defaults to \'-Rf\'.", 3 ); |
132 | 0 | append( sb, "", 0 ); |
133 | |
|
134 | 0 | append( sb, "inputDirectory", 2 ); |
135 | 0 | append( sb, "Directory containing the generated project sites and report distributions.", 3 ); |
136 | 0 | append( sb, "", 0 ); |
137 | |
} |
138 | |
} |
139 | |
|
140 | 0 | if ( goal == null || goal.length() <= 0 || "effective-site".equals( goal ) ) |
141 | |
{ |
142 | 0 | append( sb, "site:effective-site", 0 ); |
143 | 0 | append( sb, "Displays the effective site descriptor as an XML for this build, after inheritance and interpolation of site.xml.", 1 ); |
144 | 0 | append( sb, "", 0 ); |
145 | 0 | if ( detail ) |
146 | |
{ |
147 | 0 | append( sb, "Available parameters:", 1 ); |
148 | 0 | append( sb, "", 0 ); |
149 | |
|
150 | 0 | append( sb, "attributes", 2 ); |
151 | 0 | append( sb, "The template properties for rendering the site.", 3 ); |
152 | 0 | append( sb, "", 0 ); |
153 | |
|
154 | 0 | append( sb, "generatedSiteDirectory", 2 ); |
155 | 0 | append( sb, "Directory containing generated documentation.", 3 ); |
156 | 0 | append( sb, "", 0 ); |
157 | |
|
158 | 0 | append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 ); |
159 | 0 | append( sb, "Specifies the input encoding.", 3 ); |
160 | 0 | append( sb, "", 0 ); |
161 | |
|
162 | 0 | append( sb, "locales", 2 ); |
163 | 0 | append( sb, "A comma separated list of locales supported by Maven. The first valid token will be the default Locale for this instance of the Java Virtual Machine.", 3 ); |
164 | 0 | append( sb, "", 0 ); |
165 | |
|
166 | 0 | append( sb, "localRepository (Default: ${localRepository})", 2 ); |
167 | 0 | append( sb, "The local repository.", 3 ); |
168 | 0 | append( sb, "", 0 ); |
169 | |
|
170 | 0 | append( sb, "moduleExcludes", 2 ); |
171 | 0 | append( sb, "Module type exclusion mappings ex: fml -> **/*-m1.fml (excludes fml files ending in \'-m1.fml\' recursively)\n>The configuration looks like this:\n\n\u00a0\u00a0<moduleExcludes>\n\u00a0\u00a0\u00a0\u00a0<moduleType>filename1.ext,**/*sample.ext</moduleType>\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0moduleType\u00a0can\u00a0be\u00a0one\u00a0of\u00a0\'apt\',\u00a0\'fml\'\u00a0or\u00a0\'xdoc\'.\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0The\u00a0value\u00a0is\u00a0a\u00a0comma\u00a0separated\u00a0list\u00a0of\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0filenames\u00a0or\u00a0fileset\u00a0patterns.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0Here\'s\u00a0an\u00a0example:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<xdoc>changes.xml,navigation.xml</xdoc>\n\u00a0\u00a0</moduleExcludes>\n", 3 ); |
172 | 0 | append( sb, "", 0 ); |
173 | |
|
174 | 0 | append( sb, "output", 2 ); |
175 | 0 | append( sb, "Optional parameter to write the output of this help in a given file, instead of writing to the console.\nNote: Could be a relative path.", 3 ); |
176 | 0 | append( sb, "", 0 ); |
177 | |
|
178 | 0 | append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 ); |
179 | 0 | append( sb, "Specifies the output encoding.", 3 ); |
180 | 0 | append( sb, "", 0 ); |
181 | |
|
182 | 0 | append( sb, "repositories", 2 ); |
183 | 0 | append( sb, "Remote repositories used for the project.", 3 ); |
184 | 0 | append( sb, "", 0 ); |
185 | |
|
186 | 0 | append( sb, "siteDirectory (Default: ${basedir}/src/site)", 2 ); |
187 | 0 | append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 ); |
188 | 0 | append( sb, "", 0 ); |
189 | |
|
190 | 0 | append( sb, "template", 2 ); |
191 | 0 | append( sb, "Deprecated. use templateFile or skinning instead", 3 ); |
192 | 0 | append( sb, "", 0 ); |
193 | 0 | append( sb, "Default template page.", 3 ); |
194 | 0 | append( sb, "", 0 ); |
195 | |
|
196 | 0 | append( sb, "templateDirectory (Default: src/site)", 2 ); |
197 | 0 | append( sb, "Deprecated. use templateFile or skinning instead", 3 ); |
198 | 0 | append( sb, "", 0 ); |
199 | 0 | append( sb, "Directory containing the template page.", 3 ); |
200 | 0 | append( sb, "", 0 ); |
201 | |
|
202 | 0 | append( sb, "templateFile", 2 ); |
203 | 0 | append( sb, "The location of a Velocity template file to use. When used, skins and the default templates, CSS and images are disabled. It is highly recommended that you package this as a skin instead.", 3 ); |
204 | 0 | append( sb, "", 0 ); |
205 | |
|
206 | 0 | append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 ); |
207 | 0 | append( sb, "Deprecated. use the standard m2 directory layout", 3 ); |
208 | 0 | append( sb, "", 0 ); |
209 | 0 | append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 ); |
210 | 0 | append( sb, "", 0 ); |
211 | |
} |
212 | |
} |
213 | |
|
214 | 0 | if ( goal == null || goal.length() <= 0 || "help".equals( goal ) ) |
215 | |
{ |
216 | 0 | append( sb, "site:help", 0 ); |
217 | 0 | append( sb, "Display help information on maven-site-plugin.\nCall\n\u00a0\u00a0mvn\u00a0site:help\u00a0-Ddetail=true\u00a0-Dgoal=<goal-name>\nto display parameter details.", 1 ); |
218 | 0 | append( sb, "", 0 ); |
219 | 0 | if ( detail ) |
220 | |
{ |
221 | 0 | append( sb, "Available parameters:", 1 ); |
222 | 0 | append( sb, "", 0 ); |
223 | |
|
224 | 0 | append( sb, "detail (Default: false)", 2 ); |
225 | 0 | append( sb, "If true, display all settable properties for each goal.", 3 ); |
226 | 0 | append( sb, "", 0 ); |
227 | |
|
228 | 0 | append( sb, "goal", 2 ); |
229 | 0 | append( sb, "The name of the goal for which to show help. If unspecified, all goals will be displayed.", 3 ); |
230 | 0 | append( sb, "", 0 ); |
231 | |
|
232 | 0 | append( sb, "indentSize (Default: 2)", 2 ); |
233 | 0 | append( sb, "The number of spaces per indentation level, should be positive.", 3 ); |
234 | 0 | append( sb, "", 0 ); |
235 | |
|
236 | 0 | append( sb, "lineLength (Default: 80)", 2 ); |
237 | 0 | append( sb, "The maximum length of a display line, should be positive.", 3 ); |
238 | 0 | append( sb, "", 0 ); |
239 | |
} |
240 | |
} |
241 | |
|
242 | 0 | if ( goal == null || goal.length() <= 0 || "jar".equals( goal ) ) |
243 | |
{ |
244 | 0 | append( sb, "site:jar", 0 ); |
245 | 0 | append( sb, "Bundles the site output into a JAR so that it can be deployed to a repository.", 1 ); |
246 | 0 | append( sb, "", 0 ); |
247 | 0 | if ( detail ) |
248 | |
{ |
249 | 0 | append( sb, "Available parameters:", 1 ); |
250 | 0 | append( sb, "", 0 ); |
251 | |
|
252 | 0 | append( sb, "attach (Default: true)", 2 ); |
253 | 0 | append( sb, "Specifies whether to attach the generated artifact to the project.", 3 ); |
254 | 0 | append( sb, "", 0 ); |
255 | |
|
256 | 0 | append( sb, "attributes", 2 ); |
257 | 0 | append( sb, "The template properties for rendering the site.", 3 ); |
258 | 0 | append( sb, "", 0 ); |
259 | |
|
260 | 0 | append( sb, "finalName", 2 ); |
261 | 0 | append( sb, "Specifies the filename that will be used for the generated jar file. Please note that \'-site\' will be appended to the file name.", 3 ); |
262 | 0 | append( sb, "", 0 ); |
263 | |
|
264 | 0 | append( sb, "generatedSiteDirectory", 2 ); |
265 | 0 | append( sb, "Directory containing generated documentation.", 3 ); |
266 | 0 | append( sb, "", 0 ); |
267 | |
|
268 | 0 | append( sb, "generateReports (Default: true)", 2 ); |
269 | 0 | append( sb, "Convenience parameter that allows you to disable report generation.", 3 ); |
270 | 0 | append( sb, "", 0 ); |
271 | |
|
272 | 0 | append( sb, "generateSitemap (Default: false)", 2 ); |
273 | 0 | append( sb, "Generate a sitemap. The result will be a \'sitemap.html\' file at the site root.", 3 ); |
274 | 0 | append( sb, "", 0 ); |
275 | |
|
276 | 0 | append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 ); |
277 | 0 | append( sb, "Specifies the input encoding.", 3 ); |
278 | 0 | append( sb, "", 0 ); |
279 | |
|
280 | 0 | append( sb, "jarOutputDirectory", 2 ); |
281 | 0 | append( sb, "Specifies the directory where the generated jar file will be put.", 3 ); |
282 | 0 | append( sb, "", 0 ); |
283 | |
|
284 | 0 | append( sb, "locales", 2 ); |
285 | 0 | append( sb, "A comma separated list of locales supported by Maven. The first valid token will be the default Locale for this instance of the Java Virtual Machine.", 3 ); |
286 | 0 | append( sb, "", 0 ); |
287 | |
|
288 | 0 | append( sb, "localRepository (Default: ${localRepository})", 2 ); |
289 | 0 | append( sb, "The local repository.", 3 ); |
290 | 0 | append( sb, "", 0 ); |
291 | |
|
292 | 0 | append( sb, "moduleExcludes", 2 ); |
293 | 0 | append( sb, "Module type exclusion mappings ex: fml -> **/*-m1.fml (excludes fml files ending in \'-m1.fml\' recursively)\n>The configuration looks like this:\n\n\u00a0\u00a0<moduleExcludes>\n\u00a0\u00a0\u00a0\u00a0<moduleType>filename1.ext,**/*sample.ext</moduleType>\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0moduleType\u00a0can\u00a0be\u00a0one\u00a0of\u00a0\'apt\',\u00a0\'fml\'\u00a0or\u00a0\'xdoc\'.\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0The\u00a0value\u00a0is\u00a0a\u00a0comma\u00a0separated\u00a0list\u00a0of\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0filenames\u00a0or\u00a0fileset\u00a0patterns.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0Here\'s\u00a0an\u00a0example:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<xdoc>changes.xml,navigation.xml</xdoc>\n\u00a0\u00a0</moduleExcludes>\n", 3 ); |
294 | 0 | append( sb, "", 0 ); |
295 | |
|
296 | 0 | append( sb, "outputDirectory (Default: ${project.reporting.outputDirectory})", 2 ); |
297 | 0 | append( sb, "Directory containing the generated project sites and report distributions.", 3 ); |
298 | 0 | append( sb, "", 0 ); |
299 | |
|
300 | 0 | append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 ); |
301 | 0 | append( sb, "Specifies the output encoding.", 3 ); |
302 | 0 | append( sb, "", 0 ); |
303 | |
|
304 | 0 | append( sb, "repositories", 2 ); |
305 | 0 | append( sb, "Remote repositories used for the project.", 3 ); |
306 | 0 | append( sb, "", 0 ); |
307 | |
|
308 | 0 | append( sb, "siteDirectory (Default: ${basedir}/src/site)", 2 ); |
309 | 0 | append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 ); |
310 | 0 | append( sb, "", 0 ); |
311 | |
|
312 | 0 | append( sb, "template", 2 ); |
313 | 0 | append( sb, "Deprecated. use templateFile or skinning instead", 3 ); |
314 | 0 | append( sb, "", 0 ); |
315 | 0 | append( sb, "Default template page.", 3 ); |
316 | 0 | append( sb, "", 0 ); |
317 | |
|
318 | 0 | append( sb, "templateDirectory (Default: src/site)", 2 ); |
319 | 0 | append( sb, "Deprecated. use templateFile or skinning instead", 3 ); |
320 | 0 | append( sb, "", 0 ); |
321 | 0 | append( sb, "Directory containing the template page.", 3 ); |
322 | 0 | append( sb, "", 0 ); |
323 | |
|
324 | 0 | append( sb, "templateFile", 2 ); |
325 | 0 | append( sb, "The location of a Velocity template file to use. When used, skins and the default templates, CSS and images are disabled. It is highly recommended that you package this as a skin instead.", 3 ); |
326 | 0 | append( sb, "", 0 ); |
327 | |
|
328 | 0 | append( sb, "validate (Default: false)", 2 ); |
329 | 0 | append( sb, "Whether to validate xml input documents. If set to true, all input documents in xml format (in particular xdoc and fml) will be validated and any error will lead to a build failure.", 3 ); |
330 | 0 | append( sb, "", 0 ); |
331 | |
|
332 | 0 | append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 ); |
333 | 0 | append( sb, "Deprecated. use the standard m2 directory layout", 3 ); |
334 | 0 | append( sb, "", 0 ); |
335 | 0 | append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 ); |
336 | 0 | append( sb, "", 0 ); |
337 | |
} |
338 | |
} |
339 | |
|
340 | 0 | if ( goal == null || goal.length() <= 0 || "run".equals( goal ) ) |
341 | |
{ |
342 | 0 | append( sb, "site:run", 0 ); |
343 | 0 | append( sb, "Starts the site up, rendering documents as requested for faster editing. It uses Jetty as the web server.", 1 ); |
344 | 0 | append( sb, "", 0 ); |
345 | 0 | if ( detail ) |
346 | |
{ |
347 | 0 | append( sb, "Available parameters:", 1 ); |
348 | 0 | append( sb, "", 0 ); |
349 | |
|
350 | 0 | append( sb, "attributes", 2 ); |
351 | 0 | append( sb, "The template properties for rendering the site.", 3 ); |
352 | 0 | append( sb, "", 0 ); |
353 | |
|
354 | 0 | append( sb, "generatedSiteDirectory", 2 ); |
355 | 0 | append( sb, "Directory containing generated documentation.", 3 ); |
356 | 0 | append( sb, "", 0 ); |
357 | |
|
358 | 0 | append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 ); |
359 | 0 | append( sb, "Specifies the input encoding.", 3 ); |
360 | 0 | append( sb, "", 0 ); |
361 | |
|
362 | 0 | append( sb, "locales", 2 ); |
363 | 0 | append( sb, "A comma separated list of locales supported by Maven. The first valid token will be the default Locale for this instance of the Java Virtual Machine.", 3 ); |
364 | 0 | append( sb, "", 0 ); |
365 | |
|
366 | 0 | append( sb, "localRepository (Default: ${localRepository})", 2 ); |
367 | 0 | append( sb, "The local repository.", 3 ); |
368 | 0 | append( sb, "", 0 ); |
369 | |
|
370 | 0 | append( sb, "moduleExcludes", 2 ); |
371 | 0 | append( sb, "Module type exclusion mappings ex: fml -> **/*-m1.fml (excludes fml files ending in \'-m1.fml\' recursively)\n>The configuration looks like this:\n\n\u00a0\u00a0<moduleExcludes>\n\u00a0\u00a0\u00a0\u00a0<moduleType>filename1.ext,**/*sample.ext</moduleType>\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0moduleType\u00a0can\u00a0be\u00a0one\u00a0of\u00a0\'apt\',\u00a0\'fml\'\u00a0or\u00a0\'xdoc\'.\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0The\u00a0value\u00a0is\u00a0a\u00a0comma\u00a0separated\u00a0list\u00a0of\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0filenames\u00a0or\u00a0fileset\u00a0patterns.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0Here\'s\u00a0an\u00a0example:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<xdoc>changes.xml,navigation.xml</xdoc>\n\u00a0\u00a0</moduleExcludes>\n", 3 ); |
372 | 0 | append( sb, "", 0 ); |
373 | |
|
374 | 0 | append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 ); |
375 | 0 | append( sb, "Specifies the output encoding.", 3 ); |
376 | 0 | append( sb, "", 0 ); |
377 | |
|
378 | 0 | append( sb, "port (Default: 8080)", 2 ); |
379 | 0 | append( sb, "The port to execute the HTTP server on.", 3 ); |
380 | 0 | append( sb, "", 0 ); |
381 | |
|
382 | 0 | append( sb, "repositories", 2 ); |
383 | 0 | append( sb, "Remote repositories used for the project.", 3 ); |
384 | 0 | append( sb, "", 0 ); |
385 | |
|
386 | 0 | append( sb, "siteDirectory (Default: ${basedir}/src/site)", 2 ); |
387 | 0 | append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 ); |
388 | 0 | append( sb, "", 0 ); |
389 | |
|
390 | 0 | append( sb, "template", 2 ); |
391 | 0 | append( sb, "Deprecated. use templateFile or skinning instead", 3 ); |
392 | 0 | append( sb, "", 0 ); |
393 | 0 | append( sb, "Default template page.", 3 ); |
394 | 0 | append( sb, "", 0 ); |
395 | |
|
396 | 0 | append( sb, "templateDirectory (Default: src/site)", 2 ); |
397 | 0 | append( sb, "Deprecated. use templateFile or skinning instead", 3 ); |
398 | 0 | append( sb, "", 0 ); |
399 | 0 | append( sb, "Directory containing the template page.", 3 ); |
400 | 0 | append( sb, "", 0 ); |
401 | |
|
402 | 0 | append( sb, "templateFile", 2 ); |
403 | 0 | append( sb, "The location of a Velocity template file to use. When used, skins and the default templates, CSS and images are disabled. It is highly recommended that you package this as a skin instead.", 3 ); |
404 | 0 | append( sb, "", 0 ); |
405 | |
|
406 | 0 | append( sb, "tempWebappDirectory", 2 ); |
407 | 0 | append( sb, "Where to create the dummy web application.", 3 ); |
408 | 0 | append( sb, "", 0 ); |
409 | |
|
410 | 0 | append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 ); |
411 | 0 | append( sb, "Deprecated. use the standard m2 directory layout", 3 ); |
412 | 0 | append( sb, "", 0 ); |
413 | 0 | append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 ); |
414 | 0 | append( sb, "", 0 ); |
415 | |
} |
416 | |
} |
417 | |
|
418 | 0 | if ( goal == null || goal.length() <= 0 || "site".equals( goal ) ) |
419 | |
{ |
420 | 0 | append( sb, "site:site", 0 ); |
421 | 0 | append( sb, "Generates the site for a single project.\nNote that links between module sites in a multi module build will not work.\n", 1 ); |
422 | 0 | append( sb, "", 0 ); |
423 | 0 | if ( detail ) |
424 | |
{ |
425 | 0 | append( sb, "Available parameters:", 1 ); |
426 | 0 | append( sb, "", 0 ); |
427 | |
|
428 | 0 | append( sb, "attributes", 2 ); |
429 | 0 | append( sb, "The template properties for rendering the site.", 3 ); |
430 | 0 | append( sb, "", 0 ); |
431 | |
|
432 | 0 | append( sb, "generatedSiteDirectory", 2 ); |
433 | 0 | append( sb, "Directory containing generated documentation.", 3 ); |
434 | 0 | append( sb, "", 0 ); |
435 | |
|
436 | 0 | append( sb, "generateReports (Default: true)", 2 ); |
437 | 0 | append( sb, "Convenience parameter that allows you to disable report generation.", 3 ); |
438 | 0 | append( sb, "", 0 ); |
439 | |
|
440 | 0 | append( sb, "generateSitemap (Default: false)", 2 ); |
441 | 0 | append( sb, "Generate a sitemap. The result will be a \'sitemap.html\' file at the site root.", 3 ); |
442 | 0 | append( sb, "", 0 ); |
443 | |
|
444 | 0 | append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 ); |
445 | 0 | append( sb, "Specifies the input encoding.", 3 ); |
446 | 0 | append( sb, "", 0 ); |
447 | |
|
448 | 0 | append( sb, "locales", 2 ); |
449 | 0 | append( sb, "A comma separated list of locales supported by Maven. The first valid token will be the default Locale for this instance of the Java Virtual Machine.", 3 ); |
450 | 0 | append( sb, "", 0 ); |
451 | |
|
452 | 0 | append( sb, "localRepository (Default: ${localRepository})", 2 ); |
453 | 0 | append( sb, "The local repository.", 3 ); |
454 | 0 | append( sb, "", 0 ); |
455 | |
|
456 | 0 | append( sb, "moduleExcludes", 2 ); |
457 | 0 | append( sb, "Module type exclusion mappings ex: fml -> **/*-m1.fml (excludes fml files ending in \'-m1.fml\' recursively)\n>The configuration looks like this:\n\n\u00a0\u00a0<moduleExcludes>\n\u00a0\u00a0\u00a0\u00a0<moduleType>filename1.ext,**/*sample.ext</moduleType>\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0moduleType\u00a0can\u00a0be\u00a0one\u00a0of\u00a0\'apt\',\u00a0\'fml\'\u00a0or\u00a0\'xdoc\'.\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0The\u00a0value\u00a0is\u00a0a\u00a0comma\u00a0separated\u00a0list\u00a0of\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0filenames\u00a0or\u00a0fileset\u00a0patterns.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0Here\'s\u00a0an\u00a0example:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<xdoc>changes.xml,navigation.xml</xdoc>\n\u00a0\u00a0</moduleExcludes>\n", 3 ); |
458 | 0 | append( sb, "", 0 ); |
459 | |
|
460 | 0 | append( sb, "outputDirectory (Default: ${project.reporting.outputDirectory})", 2 ); |
461 | 0 | append( sb, "Directory containing the generated project sites and report distributions.", 3 ); |
462 | 0 | append( sb, "", 0 ); |
463 | |
|
464 | 0 | append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 ); |
465 | 0 | append( sb, "Specifies the output encoding.", 3 ); |
466 | 0 | append( sb, "", 0 ); |
467 | |
|
468 | 0 | append( sb, "repositories", 2 ); |
469 | 0 | append( sb, "Remote repositories used for the project.", 3 ); |
470 | 0 | append( sb, "", 0 ); |
471 | |
|
472 | 0 | append( sb, "siteDirectory (Default: ${basedir}/src/site)", 2 ); |
473 | 0 | append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 ); |
474 | 0 | append( sb, "", 0 ); |
475 | |
|
476 | 0 | append( sb, "template", 2 ); |
477 | 0 | append( sb, "Deprecated. use templateFile or skinning instead", 3 ); |
478 | 0 | append( sb, "", 0 ); |
479 | 0 | append( sb, "Default template page.", 3 ); |
480 | 0 | append( sb, "", 0 ); |
481 | |
|
482 | 0 | append( sb, "templateDirectory (Default: src/site)", 2 ); |
483 | 0 | append( sb, "Deprecated. use templateFile or skinning instead", 3 ); |
484 | 0 | append( sb, "", 0 ); |
485 | 0 | append( sb, "Directory containing the template page.", 3 ); |
486 | 0 | append( sb, "", 0 ); |
487 | |
|
488 | 0 | append( sb, "templateFile", 2 ); |
489 | 0 | append( sb, "The location of a Velocity template file to use. When used, skins and the default templates, CSS and images are disabled. It is highly recommended that you package this as a skin instead.", 3 ); |
490 | 0 | append( sb, "", 0 ); |
491 | |
|
492 | 0 | append( sb, "validate (Default: false)", 2 ); |
493 | 0 | append( sb, "Whether to validate xml input documents. If set to true, all input documents in xml format (in particular xdoc and fml) will be validated and any error will lead to a build failure.", 3 ); |
494 | 0 | append( sb, "", 0 ); |
495 | |
|
496 | 0 | append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 ); |
497 | 0 | append( sb, "Deprecated. use the standard m2 directory layout", 3 ); |
498 | 0 | append( sb, "", 0 ); |
499 | 0 | append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 ); |
500 | 0 | append( sb, "", 0 ); |
501 | |
} |
502 | |
} |
503 | |
|
504 | 0 | if ( goal == null || goal.length() <= 0 || "stage".equals( goal ) ) |
505 | |
{ |
506 | 0 | append( sb, "site:stage", 0 ); |
507 | 0 | append( sb, "Generates a site in a local staging or mock directory based on the site URL specified in the <distributionManagement> section of the POM.\nIt can be used to test that links between module sites in a multi module build works.\n", 1 ); |
508 | 0 | append( sb, "", 0 ); |
509 | 0 | if ( detail ) |
510 | |
{ |
511 | 0 | append( sb, "Available parameters:", 1 ); |
512 | 0 | append( sb, "", 0 ); |
513 | |
|
514 | 0 | append( sb, "attributes", 2 ); |
515 | 0 | append( sb, "The template properties for rendering the site.", 3 ); |
516 | 0 | append( sb, "", 0 ); |
517 | |
|
518 | 0 | append( sb, "generatedSiteDirectory", 2 ); |
519 | 0 | append( sb, "Directory containing generated documentation.", 3 ); |
520 | 0 | append( sb, "", 0 ); |
521 | |
|
522 | 0 | append( sb, "generateReports (Default: true)", 2 ); |
523 | 0 | append( sb, "Convenience parameter that allows you to disable report generation.", 3 ); |
524 | 0 | append( sb, "", 0 ); |
525 | |
|
526 | 0 | append( sb, "generateSitemap (Default: false)", 2 ); |
527 | 0 | append( sb, "Generate a sitemap. The result will be a \'sitemap.html\' file at the site root.", 3 ); |
528 | 0 | append( sb, "", 0 ); |
529 | |
|
530 | 0 | append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 ); |
531 | 0 | append( sb, "Specifies the input encoding.", 3 ); |
532 | 0 | append( sb, "", 0 ); |
533 | |
|
534 | 0 | append( sb, "locales", 2 ); |
535 | 0 | append( sb, "A comma separated list of locales supported by Maven. The first valid token will be the default Locale for this instance of the Java Virtual Machine.", 3 ); |
536 | 0 | append( sb, "", 0 ); |
537 | |
|
538 | 0 | append( sb, "localRepository (Default: ${localRepository})", 2 ); |
539 | 0 | append( sb, "The local repository.", 3 ); |
540 | 0 | append( sb, "", 0 ); |
541 | |
|
542 | 0 | append( sb, "moduleExcludes", 2 ); |
543 | 0 | append( sb, "Module type exclusion mappings ex: fml -> **/*-m1.fml (excludes fml files ending in \'-m1.fml\' recursively)\n>The configuration looks like this:\n\n\u00a0\u00a0<moduleExcludes>\n\u00a0\u00a0\u00a0\u00a0<moduleType>filename1.ext,**/*sample.ext</moduleType>\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0moduleType\u00a0can\u00a0be\u00a0one\u00a0of\u00a0\'apt\',\u00a0\'fml\'\u00a0or\u00a0\'xdoc\'.\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0The\u00a0value\u00a0is\u00a0a\u00a0comma\u00a0separated\u00a0list\u00a0of\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0filenames\u00a0or\u00a0fileset\u00a0patterns.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0Here\'s\u00a0an\u00a0example:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<xdoc>changes.xml,navigation.xml</xdoc>\n\u00a0\u00a0</moduleExcludes>\n", 3 ); |
544 | 0 | append( sb, "", 0 ); |
545 | |
|
546 | 0 | append( sb, "outputDirectory (Default: ${project.reporting.outputDirectory})", 2 ); |
547 | 0 | append( sb, "Directory containing the generated project sites and report distributions.", 3 ); |
548 | 0 | append( sb, "", 0 ); |
549 | |
|
550 | 0 | append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 ); |
551 | 0 | append( sb, "Specifies the output encoding.", 3 ); |
552 | 0 | append( sb, "", 0 ); |
553 | |
|
554 | 0 | append( sb, "repositories", 2 ); |
555 | 0 | append( sb, "Remote repositories used for the project.", 3 ); |
556 | 0 | append( sb, "", 0 ); |
557 | |
|
558 | 0 | append( sb, "siteDirectory (Default: ${basedir}/src/site)", 2 ); |
559 | 0 | append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 ); |
560 | 0 | append( sb, "", 0 ); |
561 | |
|
562 | 0 | append( sb, "stagingDirectory", 2 ); |
563 | 0 | append( sb, "Staging directory location. This needs to be an absolute path, like C:\\stagingArea\\myProject\\ on Windows or /stagingArea/myProject/ on Unix.", 3 ); |
564 | 0 | append( sb, "", 0 ); |
565 | |
|
566 | 0 | append( sb, "template", 2 ); |
567 | 0 | append( sb, "Deprecated. use templateFile or skinning instead", 3 ); |
568 | 0 | append( sb, "", 0 ); |
569 | 0 | append( sb, "Default template page.", 3 ); |
570 | 0 | append( sb, "", 0 ); |
571 | |
|
572 | 0 | append( sb, "templateDirectory (Default: src/site)", 2 ); |
573 | 0 | append( sb, "Deprecated. use templateFile or skinning instead", 3 ); |
574 | 0 | append( sb, "", 0 ); |
575 | 0 | append( sb, "Directory containing the template page.", 3 ); |
576 | 0 | append( sb, "", 0 ); |
577 | |
|
578 | 0 | append( sb, "templateFile", 2 ); |
579 | 0 | append( sb, "The location of a Velocity template file to use. When used, skins and the default templates, CSS and images are disabled. It is highly recommended that you package this as a skin instead.", 3 ); |
580 | 0 | append( sb, "", 0 ); |
581 | |
|
582 | 0 | append( sb, "validate (Default: false)", 2 ); |
583 | 0 | append( sb, "Whether to validate xml input documents. If set to true, all input documents in xml format (in particular xdoc and fml) will be validated and any error will lead to a build failure.", 3 ); |
584 | 0 | append( sb, "", 0 ); |
585 | |
|
586 | 0 | append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 ); |
587 | 0 | append( sb, "Deprecated. use the standard m2 directory layout", 3 ); |
588 | 0 | append( sb, "", 0 ); |
589 | 0 | append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 ); |
590 | 0 | append( sb, "", 0 ); |
591 | |
} |
592 | |
} |
593 | |
|
594 | 0 | if ( goal == null || goal.length() <= 0 || "stage-deploy".equals( goal ) ) |
595 | |
{ |
596 | 0 | append( sb, "site:stage-deploy", 0 ); |
597 | 0 | append( sb, "Deploys the generated site to a staging or mock directory to the site URL specified in the <distributionManagement> section of the POM. It supports scp and file protocols for deployment.", 1 ); |
598 | 0 | append( sb, "", 0 ); |
599 | 0 | if ( detail ) |
600 | |
{ |
601 | 0 | append( sb, "Available parameters:", 1 ); |
602 | 0 | append( sb, "", 0 ); |
603 | |
|
604 | 0 | append( sb, "attributes", 2 ); |
605 | 0 | append( sb, "The template properties for rendering the site.", 3 ); |
606 | 0 | append( sb, "", 0 ); |
607 | |
|
608 | 0 | append( sb, "chmod (Default: true)", 2 ); |
609 | 0 | append( sb, "Whether to run the \'chmod\' command on the remote site after the deploy. Defaults to \'true\'.", 3 ); |
610 | 0 | append( sb, "", 0 ); |
611 | |
|
612 | 0 | append( sb, "chmodMode (Default: g+w,a+rX)", 2 ); |
613 | 0 | append( sb, "The mode used by the \'chmod\' command. Only used if chmod = true. Defaults to \'g+w,a+rX\'.", 3 ); |
614 | 0 | append( sb, "", 0 ); |
615 | |
|
616 | 0 | append( sb, "chmodOptions (Default: -Rf)", 2 ); |
617 | 0 | append( sb, "The options used by the \'chmod\' command. Only used if chmod = true. Defaults to \'-Rf\'.", 3 ); |
618 | 0 | append( sb, "", 0 ); |
619 | |
|
620 | 0 | append( sb, "generatedSiteDirectory", 2 ); |
621 | 0 | append( sb, "Directory containing generated documentation.", 3 ); |
622 | 0 | append( sb, "", 0 ); |
623 | |
|
624 | 0 | append( sb, "generateReports (Default: true)", 2 ); |
625 | 0 | append( sb, "Convenience parameter that allows you to disable report generation.", 3 ); |
626 | 0 | append( sb, "", 0 ); |
627 | |
|
628 | 0 | append( sb, "generateSitemap (Default: false)", 2 ); |
629 | 0 | append( sb, "Generate a sitemap. The result will be a \'sitemap.html\' file at the site root.", 3 ); |
630 | 0 | append( sb, "", 0 ); |
631 | |
|
632 | 0 | append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 ); |
633 | 0 | append( sb, "Specifies the input encoding.", 3 ); |
634 | 0 | append( sb, "", 0 ); |
635 | |
|
636 | 0 | append( sb, "locales", 2 ); |
637 | 0 | append( sb, "A comma separated list of locales supported by Maven. The first valid token will be the default Locale for this instance of the Java Virtual Machine.", 3 ); |
638 | 0 | append( sb, "", 0 ); |
639 | |
|
640 | 0 | append( sb, "localRepository (Default: ${localRepository})", 2 ); |
641 | 0 | append( sb, "The local repository.", 3 ); |
642 | 0 | append( sb, "", 0 ); |
643 | |
|
644 | 0 | append( sb, "moduleExcludes", 2 ); |
645 | 0 | append( sb, "Module type exclusion mappings ex: fml -> **/*-m1.fml (excludes fml files ending in \'-m1.fml\' recursively)\n>The configuration looks like this:\n\n\u00a0\u00a0<moduleExcludes>\n\u00a0\u00a0\u00a0\u00a0<moduleType>filename1.ext,**/*sample.ext</moduleType>\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0moduleType\u00a0can\u00a0be\u00a0one\u00a0of\u00a0\'apt\',\u00a0\'fml\'\u00a0or\u00a0\'xdoc\'.\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0The\u00a0value\u00a0is\u00a0a\u00a0comma\u00a0separated\u00a0list\u00a0of\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0filenames\u00a0or\u00a0fileset\u00a0patterns.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<!--\u00a0Here\'s\u00a0an\u00a0example:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-->\n\u00a0\u00a0\u00a0\u00a0<xdoc>changes.xml,navigation.xml</xdoc>\n\u00a0\u00a0</moduleExcludes>\n", 3 ); |
646 | 0 | append( sb, "", 0 ); |
647 | |
|
648 | 0 | append( sb, "outputDirectory (Default: ${project.reporting.outputDirectory})", 2 ); |
649 | 0 | append( sb, "Directory containing the generated project sites and report distributions.", 3 ); |
650 | 0 | append( sb, "", 0 ); |
651 | |
|
652 | 0 | append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 ); |
653 | 0 | append( sb, "Specifies the output encoding.", 3 ); |
654 | 0 | append( sb, "", 0 ); |
655 | |
|
656 | 0 | append( sb, "repositories", 2 ); |
657 | 0 | append( sb, "Remote repositories used for the project.", 3 ); |
658 | 0 | append( sb, "", 0 ); |
659 | |
|
660 | 0 | append( sb, "siteDirectory (Default: ${basedir}/src/site)", 2 ); |
661 | 0 | append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 ); |
662 | 0 | append( sb, "", 0 ); |
663 | |
|
664 | 0 | append( sb, "stagingDirectory", 2 ); |
665 | 0 | append( sb, "Staging directory location. This needs to be an absolute path, like C:\\stagingArea\\myProject\\ on Windows or /stagingArea/myProject/ on Unix.", 3 ); |
666 | 0 | append( sb, "", 0 ); |
667 | |
|
668 | 0 | append( sb, "stagingRepositoryId (Default: stagingSite)", 2 ); |
669 | 0 | append( sb, "The identifier of the repository where the staging site will be deployed. This id will be used to lookup a corresponding <server> entry from the settings.xml. If a matching <server> entry is found, its configured credentials will be used for authentication.", 3 ); |
670 | 0 | append( sb, "", 0 ); |
671 | |
|
672 | 0 | append( sb, "stagingSiteURL", 2 ); |
673 | 0 | append( sb, "The staged site will be deployed to this URL. If you don\'t specify this, the default-value will be \'${project.distributionManagement.site.url}/staging\', where \'project\' is either the current project or, in a reactor build, the top level project in the reactor.", 3 ); |
674 | 0 | append( sb, "", 0 ); |
675 | |
|
676 | 0 | append( sb, "template", 2 ); |
677 | 0 | append( sb, "Deprecated. use templateFile or skinning instead", 3 ); |
678 | 0 | append( sb, "", 0 ); |
679 | 0 | append( sb, "Default template page.", 3 ); |
680 | 0 | append( sb, "", 0 ); |
681 | |
|
682 | 0 | append( sb, "templateDirectory (Default: src/site)", 2 ); |
683 | 0 | append( sb, "Deprecated. use templateFile or skinning instead", 3 ); |
684 | 0 | append( sb, "", 0 ); |
685 | 0 | append( sb, "Directory containing the template page.", 3 ); |
686 | 0 | append( sb, "", 0 ); |
687 | |
|
688 | 0 | append( sb, "templateFile", 2 ); |
689 | 0 | append( sb, "The location of a Velocity template file to use. When used, skins and the default templates, CSS and images are disabled. It is highly recommended that you package this as a skin instead.", 3 ); |
690 | 0 | append( sb, "", 0 ); |
691 | |
|
692 | 0 | append( sb, "validate (Default: false)", 2 ); |
693 | 0 | append( sb, "Whether to validate xml input documents. If set to true, all input documents in xml format (in particular xdoc and fml) will be validated and any error will lead to a build failure.", 3 ); |
694 | 0 | append( sb, "", 0 ); |
695 | |
|
696 | 0 | append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 ); |
697 | 0 | append( sb, "Deprecated. use the standard m2 directory layout", 3 ); |
698 | 0 | append( sb, "", 0 ); |
699 | 0 | append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 ); |
700 | 0 | append( sb, "", 0 ); |
701 | |
} |
702 | |
} |
703 | |
|
704 | 0 | if ( getLog().isInfoEnabled() ) |
705 | |
{ |
706 | 0 | getLog().info( sb.toString() ); |
707 | |
} |
708 | 0 | } |
709 | |
|
710 | |
|
711 | |
|
712 | |
|
713 | |
|
714 | |
|
715 | |
|
716 | |
|
717 | |
|
718 | |
|
719 | |
private static String repeat( String str, int repeat ) |
720 | |
{ |
721 | 0 | StringBuffer buffer = new StringBuffer( repeat * str.length() ); |
722 | |
|
723 | 0 | for ( int i = 0; i < repeat; i++ ) |
724 | |
{ |
725 | 0 | buffer.append( str ); |
726 | |
} |
727 | |
|
728 | 0 | return buffer.toString(); |
729 | |
} |
730 | |
|
731 | |
|
732 | |
|
733 | |
|
734 | |
|
735 | |
|
736 | |
|
737 | |
|
738 | |
|
739 | |
private void append( StringBuffer sb, String description, int indent ) |
740 | |
{ |
741 | 0 | for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); ) |
742 | |
{ |
743 | 0 | sb.append( it.next().toString() ).append( '\n' ); |
744 | |
} |
745 | 0 | } |
746 | |
|
747 | |
|
748 | |
|
749 | |
|
750 | |
|
751 | |
|
752 | |
|
753 | |
|
754 | |
|
755 | |
|
756 | |
|
757 | |
private static List toLines( String text, int indent, int indentSize, int lineLength ) |
758 | |
{ |
759 | 0 | List lines = new ArrayList(); |
760 | |
|
761 | 0 | String ind = repeat( "\t", indent ); |
762 | 0 | String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" ); |
763 | 0 | for ( int i = 0; i < plainLines.length; i++ ) |
764 | |
{ |
765 | 0 | toLines( lines, ind + plainLines[i], indentSize, lineLength ); |
766 | |
} |
767 | |
|
768 | 0 | return lines; |
769 | |
} |
770 | |
|
771 | |
|
772 | |
|
773 | |
|
774 | |
|
775 | |
|
776 | |
|
777 | |
|
778 | |
|
779 | |
private static void toLines( List lines, String line, int indentSize, int lineLength ) |
780 | |
{ |
781 | 0 | int lineIndent = getIndentLevel( line ); |
782 | 0 | StringBuffer buf = new StringBuffer( 256 ); |
783 | 0 | String[] tokens = line.split( " +" ); |
784 | 0 | for ( int i = 0; i < tokens.length; i++ ) |
785 | |
{ |
786 | 0 | String token = tokens[i]; |
787 | 0 | if ( i > 0 ) |
788 | |
{ |
789 | 0 | if ( buf.length() + token.length() >= lineLength ) |
790 | |
{ |
791 | 0 | lines.add( buf.toString() ); |
792 | 0 | buf.setLength( 0 ); |
793 | 0 | buf.append( repeat( " ", lineIndent * indentSize ) ); |
794 | |
} |
795 | |
else |
796 | |
{ |
797 | 0 | buf.append( ' ' ); |
798 | |
} |
799 | |
} |
800 | 0 | for ( int j = 0; j < token.length(); j++ ) |
801 | |
{ |
802 | 0 | char c = token.charAt( j ); |
803 | 0 | if ( c == '\t' ) |
804 | |
{ |
805 | 0 | buf.append( repeat( " ", indentSize - buf.length() % indentSize ) ); |
806 | |
} |
807 | 0 | else if ( c == '\u00A0' ) |
808 | |
{ |
809 | 0 | buf.append( ' ' ); |
810 | |
} |
811 | |
else |
812 | |
{ |
813 | 0 | buf.append( c ); |
814 | |
} |
815 | |
} |
816 | |
} |
817 | 0 | lines.add( buf.toString() ); |
818 | 0 | } |
819 | |
|
820 | |
|
821 | |
|
822 | |
|
823 | |
|
824 | |
|
825 | |
|
826 | |
private static int getIndentLevel( String line ) |
827 | |
{ |
828 | 0 | int level = 0; |
829 | 0 | for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ ) |
830 | |
{ |
831 | 0 | level++; |
832 | |
} |
833 | 0 | for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ ) |
834 | |
{ |
835 | 0 | if ( line.charAt( i ) == '\t' ) |
836 | |
{ |
837 | 0 | level++; |
838 | 0 | break; |
839 | |
} |
840 | |
} |
841 | 0 | return level; |
842 | |
} |
843 | |
} |