Coverage Report - org.apache.maven.plugins.site.HelpMojo
 
Classes in this File Line Coverage Branch Coverage Complexity
HelpMojo
0%
0/412
0%
0/102
6,333
 
 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  
  * Display help information on maven-site-plugin.<br/> Call <pre>  mvn site:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</pre> to display parameter details.
 12  
  *
 13  
  * @version generated on Fri Jul 10 14:04:33 CEST 2009
 14  
  * @author org.apache.maven.tools.plugin.generator.PluginHelpGenerator (version 2.5)
 15  
  * @goal help
 16  
  * @requiresProject false
 17  
  */
 18  0
 public class HelpMojo
 19  
     extends AbstractMojo
 20  
 {
 21  
     /**
 22  
      * If <code>true</code>, display all settable properties for each goal.
 23  
      * 
 24  
      * @parameter expression="${detail}" default-value="false"
 25  
      */
 26  
     private boolean detail;
 27  
 
 28  
     /**
 29  
      * The name of the goal for which to show help. If unspecified, all goals will be displayed.
 30  
      * 
 31  
      * @parameter expression="${goal}"
 32  
      */
 33  
     private java.lang.String goal;
 34  
 
 35  
     /**
 36  
      * The maximum length of a display line, should be positive.
 37  
      * 
 38  
      * @parameter expression="${lineLength}" default-value="80"
 39  
      */
 40  
     private int lineLength;
 41  
 
 42  
     /**
 43  
      * The number of spaces per indentation level, should be positive.
 44  
      * 
 45  
      * @parameter expression="${indentSize}" default-value="2"
 46  
      */
 47  
     private int indentSize;
 48  
 
 49  
 
 50  
     /** {@inheritDoc} */
 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.0.1", 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 8 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", 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", 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, "inputDirectory", 2 );
 123  0
                 append( sb, "Directory containing the generated project sites and report distributions.", 3 );
 124  0
                 append( sb, "", 0 );
 125  
             }
 126  
         }
 127  
 
 128  0
         if ( goal == null || goal.length() <= 0 || "help".equals( goal ) )
 129  
         {
 130  0
             append( sb, "site:help", 0 );
 131  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 );
 132  0
             append( sb, "", 0 );
 133  0
             if ( detail )
 134  
             {
 135  0
                 append( sb, "Available parameters:", 1 );
 136  0
                 append( sb, "", 0 );
 137  
 
 138  0
                 append( sb, "detail (Default: false)", 2 );
 139  0
                 append( sb, "If true, display all settable properties for each goal.", 3 );
 140  0
                 append( sb, "", 0 );
 141  
 
 142  0
                 append( sb, "goal", 2 );
 143  0
                 append( sb, "The name of the goal for which to show help. If unspecified, all goals will be displayed.", 3 );
 144  0
                 append( sb, "", 0 );
 145  
 
 146  0
                 append( sb, "indentSize (Default: 2)", 2 );
 147  0
                 append( sb, "The number of spaces per indentation level, should be positive.", 3 );
 148  0
                 append( sb, "", 0 );
 149  
 
 150  0
                 append( sb, "lineLength (Default: 80)", 2 );
 151  0
                 append( sb, "The maximum length of a display line, should be positive.", 3 );
 152  0
                 append( sb, "", 0 );
 153  
             }
 154  
         }
 155  
 
 156  0
         if ( goal == null || goal.length() <= 0 || "jar".equals( goal ) )
 157  
         {
 158  0
             append( sb, "site:jar", 0 );
 159  0
             append( sb, "Bundles the site output into a JAR so that it can be deployed to a repository.", 1 );
 160  0
             append( sb, "", 0 );
 161  0
             if ( detail )
 162  
             {
 163  0
                 append( sb, "Available parameters:", 1 );
 164  0
                 append( sb, "", 0 );
 165  
 
 166  0
                 append( sb, "attach (Default: true)", 2 );
 167  0
                 append( sb, "Specifies whether to attach the generated artifact to the project.", 3 );
 168  0
                 append( sb, "", 0 );
 169  
 
 170  0
                 append( sb, "attributes", 2 );
 171  0
                 append( sb, "The template properties for rendering the site.", 3 );
 172  0
                 append( sb, "", 0 );
 173  
 
 174  0
                 append( sb, "finalName", 2 );
 175  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 );
 176  0
                 append( sb, "", 0 );
 177  
 
 178  0
                 append( sb, "generatedSiteDirectory", 2 );
 179  0
                 append( sb, "Directory containing generated documentation.", 3 );
 180  0
                 append( sb, "", 0 );
 181  
 
 182  0
                 append( sb, "generateReports (Default: true)", 2 );
 183  0
                 append( sb, "Convenience parameter that allows you to disable report generation.", 3 );
 184  0
                 append( sb, "", 0 );
 185  
 
 186  0
                 append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 );
 187  0
                 append( sb, "Specifies the input encoding.", 3 );
 188  0
                 append( sb, "", 0 );
 189  
 
 190  0
                 append( sb, "jarOutputDirectory", 2 );
 191  0
                 append( sb, "Specifies the directory where the generated jar file will be put.", 3 );
 192  0
                 append( sb, "", 0 );
 193  
 
 194  0
                 append( sb, "locales", 2 );
 195  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 );
 196  0
                 append( sb, "", 0 );
 197  
 
 198  0
                 append( sb, "localRepository", 2 );
 199  0
                 append( sb, "The local repository.", 3 );
 200  0
                 append( sb, "", 0 );
 201  
 
 202  0
                 append( sb, "moduleExcludes", 2 );
 203  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<moduleExcludes>\n<moduleType>filename1.ext,**/*sample.ext</moduleType>\n<!--\u00a0moduleType\u00a0can\u00a0be\u00a0one\u00a0of\u00a0\'apt\',\u00a0\'fml\'\u00a0or\u00a0\'xdoc\'.\u00a0-->\n<!--\u00a0The\u00a0value\u00a0is\u00a0a\u00a0comma\u00a0separated\u00a0list\u00a0of\u00a0-->\n<!--\u00a0filenames\u00a0or\u00a0fileset\u00a0patterns.\u00a0-->\n<!--\u00a0Here\'s\u00a0an\u00a0example:\u00a0-->\n<xdoc>changes.xml,navigation.xml</xdoc>\n</moduleExcludes>\n", 3 );
 204  0
                 append( sb, "", 0 );
 205  
 
 206  0
                 append( sb, "outputDirectory (Default: ${project.reporting.outputDirectory})", 2 );
 207  0
                 append( sb, "Directory containing the generated project sites and report distributions.", 3 );
 208  0
                 append( sb, "", 0 );
 209  
 
 210  0
                 append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 );
 211  0
                 append( sb, "Specifies the output encoding.", 3 );
 212  0
                 append( sb, "", 0 );
 213  
 
 214  0
                 append( sb, "repositories", 2 );
 215  0
                 append( sb, "Remote repositories used for the project.", 3 );
 216  0
                 append( sb, "", 0 );
 217  
 
 218  0
                 append( sb, "siteDirectory", 2 );
 219  0
                 append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 );
 220  0
                 append( sb, "", 0 );
 221  
 
 222  0
                 append( sb, "template", 2 );
 223  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 224  0
                 append( sb, "", 0 );
 225  0
                 append( sb, "Default template page.", 3 );
 226  0
                 append( sb, "", 0 );
 227  
 
 228  0
                 append( sb, "templateDirectory (Default: src/site)", 2 );
 229  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 230  0
                 append( sb, "", 0 );
 231  0
                 append( sb, "Directory containing the template page.", 3 );
 232  0
                 append( sb, "", 0 );
 233  
 
 234  0
                 append( sb, "templateFile", 2 );
 235  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 );
 236  0
                 append( sb, "", 0 );
 237  
 
 238  0
                 append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 );
 239  0
                 append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 );
 240  0
                 append( sb, "", 0 );
 241  
             }
 242  
         }
 243  
 
 244  0
         if ( goal == null || goal.length() <= 0 || "run".equals( goal ) )
 245  
         {
 246  0
             append( sb, "site:run", 0 );
 247  0
             append( sb, "Starts the site up, rendering documents as requested for faster editing. It uses Jetty as the web server.", 1 );
 248  0
             append( sb, "", 0 );
 249  0
             if ( detail )
 250  
             {
 251  0
                 append( sb, "Available parameters:", 1 );
 252  0
                 append( sb, "", 0 );
 253  
 
 254  0
                 append( sb, "attributes", 2 );
 255  0
                 append( sb, "The template properties for rendering the site.", 3 );
 256  0
                 append( sb, "", 0 );
 257  
 
 258  0
                 append( sb, "generatedSiteDirectory", 2 );
 259  0
                 append( sb, "Directory containing generated documentation.", 3 );
 260  0
                 append( sb, "", 0 );
 261  
 
 262  0
                 append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 );
 263  0
                 append( sb, "Specifies the input encoding.", 3 );
 264  0
                 append( sb, "", 0 );
 265  
 
 266  0
                 append( sb, "locales", 2 );
 267  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 );
 268  0
                 append( sb, "", 0 );
 269  
 
 270  0
                 append( sb, "localRepository", 2 );
 271  0
                 append( sb, "The local repository.", 3 );
 272  0
                 append( sb, "", 0 );
 273  
 
 274  0
                 append( sb, "moduleExcludes", 2 );
 275  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<moduleExcludes>\n<moduleType>filename1.ext,**/*sample.ext</moduleType>\n<!--\u00a0moduleType\u00a0can\u00a0be\u00a0one\u00a0of\u00a0\'apt\',\u00a0\'fml\'\u00a0or\u00a0\'xdoc\'.\u00a0-->\n<!--\u00a0The\u00a0value\u00a0is\u00a0a\u00a0comma\u00a0separated\u00a0list\u00a0of\u00a0-->\n<!--\u00a0filenames\u00a0or\u00a0fileset\u00a0patterns.\u00a0-->\n<!--\u00a0Here\'s\u00a0an\u00a0example:\u00a0-->\n<xdoc>changes.xml,navigation.xml</xdoc>\n</moduleExcludes>\n", 3 );
 276  0
                 append( sb, "", 0 );
 277  
 
 278  0
                 append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 );
 279  0
                 append( sb, "Specifies the output encoding.", 3 );
 280  0
                 append( sb, "", 0 );
 281  
 
 282  0
                 append( sb, "port (Default: 8080)", 2 );
 283  0
                 append( sb, "The port to execute the HTTP server on.", 3 );
 284  0
                 append( sb, "", 0 );
 285  
 
 286  0
                 append( sb, "repositories", 2 );
 287  0
                 append( sb, "Remote repositories used for the project.", 3 );
 288  0
                 append( sb, "", 0 );
 289  
 
 290  0
                 append( sb, "siteDirectory", 2 );
 291  0
                 append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 );
 292  0
                 append( sb, "", 0 );
 293  
 
 294  0
                 append( sb, "template", 2 );
 295  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 296  0
                 append( sb, "", 0 );
 297  0
                 append( sb, "Default template page.", 3 );
 298  0
                 append( sb, "", 0 );
 299  
 
 300  0
                 append( sb, "templateDirectory (Default: src/site)", 2 );
 301  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 302  0
                 append( sb, "", 0 );
 303  0
                 append( sb, "Directory containing the template page.", 3 );
 304  0
                 append( sb, "", 0 );
 305  
 
 306  0
                 append( sb, "templateFile", 2 );
 307  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 );
 308  0
                 append( sb, "", 0 );
 309  
 
 310  0
                 append( sb, "tempWebappDirectory", 2 );
 311  0
                 append( sb, "Where to create the dummy web application.", 3 );
 312  0
                 append( sb, "", 0 );
 313  
 
 314  0
                 append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 );
 315  0
                 append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 );
 316  0
                 append( sb, "", 0 );
 317  
             }
 318  
         }
 319  
 
 320  0
         if ( goal == null || goal.length() <= 0 || "site".equals( goal ) )
 321  
         {
 322  0
             append( sb, "site:site", 0 );
 323  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 );
 324  0
             append( sb, "", 0 );
 325  0
             if ( detail )
 326  
             {
 327  0
                 append( sb, "Available parameters:", 1 );
 328  0
                 append( sb, "", 0 );
 329  
 
 330  0
                 append( sb, "attributes", 2 );
 331  0
                 append( sb, "The template properties for rendering the site.", 3 );
 332  0
                 append( sb, "", 0 );
 333  
 
 334  0
                 append( sb, "generatedSiteDirectory", 2 );
 335  0
                 append( sb, "Directory containing generated documentation.", 3 );
 336  0
                 append( sb, "", 0 );
 337  
 
 338  0
                 append( sb, "generateReports (Default: true)", 2 );
 339  0
                 append( sb, "Convenience parameter that allows you to disable report generation.", 3 );
 340  0
                 append( sb, "", 0 );
 341  
 
 342  0
                 append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 );
 343  0
                 append( sb, "Specifies the input encoding.", 3 );
 344  0
                 append( sb, "", 0 );
 345  
 
 346  0
                 append( sb, "locales", 2 );
 347  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 );
 348  0
                 append( sb, "", 0 );
 349  
 
 350  0
                 append( sb, "localRepository", 2 );
 351  0
                 append( sb, "The local repository.", 3 );
 352  0
                 append( sb, "", 0 );
 353  
 
 354  0
                 append( sb, "moduleExcludes", 2 );
 355  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<moduleExcludes>\n<moduleType>filename1.ext,**/*sample.ext</moduleType>\n<!--\u00a0moduleType\u00a0can\u00a0be\u00a0one\u00a0of\u00a0\'apt\',\u00a0\'fml\'\u00a0or\u00a0\'xdoc\'.\u00a0-->\n<!--\u00a0The\u00a0value\u00a0is\u00a0a\u00a0comma\u00a0separated\u00a0list\u00a0of\u00a0-->\n<!--\u00a0filenames\u00a0or\u00a0fileset\u00a0patterns.\u00a0-->\n<!--\u00a0Here\'s\u00a0an\u00a0example:\u00a0-->\n<xdoc>changes.xml,navigation.xml</xdoc>\n</moduleExcludes>\n", 3 );
 356  0
                 append( sb, "", 0 );
 357  
 
 358  0
                 append( sb, "outputDirectory (Default: ${project.reporting.outputDirectory})", 2 );
 359  0
                 append( sb, "Directory containing the generated project sites and report distributions.", 3 );
 360  0
                 append( sb, "", 0 );
 361  
 
 362  0
                 append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 );
 363  0
                 append( sb, "Specifies the output encoding.", 3 );
 364  0
                 append( sb, "", 0 );
 365  
 
 366  0
                 append( sb, "repositories", 2 );
 367  0
                 append( sb, "Remote repositories used for the project.", 3 );
 368  0
                 append( sb, "", 0 );
 369  
 
 370  0
                 append( sb, "siteDirectory", 2 );
 371  0
                 append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 );
 372  0
                 append( sb, "", 0 );
 373  
 
 374  0
                 append( sb, "template", 2 );
 375  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 376  0
                 append( sb, "", 0 );
 377  0
                 append( sb, "Default template page.", 3 );
 378  0
                 append( sb, "", 0 );
 379  
 
 380  0
                 append( sb, "templateDirectory (Default: src/site)", 2 );
 381  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 382  0
                 append( sb, "", 0 );
 383  0
                 append( sb, "Directory containing the template page.", 3 );
 384  0
                 append( sb, "", 0 );
 385  
 
 386  0
                 append( sb, "templateFile", 2 );
 387  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 );
 388  0
                 append( sb, "", 0 );
 389  
 
 390  0
                 append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 );
 391  0
                 append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 );
 392  0
                 append( sb, "", 0 );
 393  
             }
 394  
         }
 395  
 
 396  0
         if ( goal == null || goal.length() <= 0 || "stage".equals( goal ) )
 397  
         {
 398  0
             append( sb, "site:stage", 0 );
 399  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 );
 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, "attributes", 2 );
 407  0
                 append( sb, "The template properties for rendering the site.", 3 );
 408  0
                 append( sb, "", 0 );
 409  
 
 410  0
                 append( sb, "generatedSiteDirectory", 2 );
 411  0
                 append( sb, "Directory containing generated documentation.", 3 );
 412  0
                 append( sb, "", 0 );
 413  
 
 414  0
                 append( sb, "generateReports (Default: true)", 2 );
 415  0
                 append( sb, "Convenience parameter that allows you to disable report generation.", 3 );
 416  0
                 append( sb, "", 0 );
 417  
 
 418  0
                 append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 );
 419  0
                 append( sb, "Specifies the input encoding.", 3 );
 420  0
                 append( sb, "", 0 );
 421  
 
 422  0
                 append( sb, "locales", 2 );
 423  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 );
 424  0
                 append( sb, "", 0 );
 425  
 
 426  0
                 append( sb, "localRepository", 2 );
 427  0
                 append( sb, "The local repository.", 3 );
 428  0
                 append( sb, "", 0 );
 429  
 
 430  0
                 append( sb, "moduleExcludes", 2 );
 431  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<moduleExcludes>\n<moduleType>filename1.ext,**/*sample.ext</moduleType>\n<!--\u00a0moduleType\u00a0can\u00a0be\u00a0one\u00a0of\u00a0\'apt\',\u00a0\'fml\'\u00a0or\u00a0\'xdoc\'.\u00a0-->\n<!--\u00a0The\u00a0value\u00a0is\u00a0a\u00a0comma\u00a0separated\u00a0list\u00a0of\u00a0-->\n<!--\u00a0filenames\u00a0or\u00a0fileset\u00a0patterns.\u00a0-->\n<!--\u00a0Here\'s\u00a0an\u00a0example:\u00a0-->\n<xdoc>changes.xml,navigation.xml</xdoc>\n</moduleExcludes>\n", 3 );
 432  0
                 append( sb, "", 0 );
 433  
 
 434  0
                 append( sb, "outputDirectory (Default: ${project.reporting.outputDirectory})", 2 );
 435  0
                 append( sb, "Directory containing the generated project sites and report distributions.", 3 );
 436  0
                 append( sb, "", 0 );
 437  
 
 438  0
                 append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 );
 439  0
                 append( sb, "Specifies the output encoding.", 3 );
 440  0
                 append( sb, "", 0 );
 441  
 
 442  0
                 append( sb, "repositories", 2 );
 443  0
                 append( sb, "Remote repositories used for the project.", 3 );
 444  0
                 append( sb, "", 0 );
 445  
 
 446  0
                 append( sb, "siteDirectory", 2 );
 447  0
                 append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 );
 448  0
                 append( sb, "", 0 );
 449  
 
 450  0
                 append( sb, "stagingDirectory", 2 );
 451  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 );
 452  0
                 append( sb, "", 0 );
 453  
 
 454  0
                 append( sb, "template", 2 );
 455  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 456  0
                 append( sb, "", 0 );
 457  0
                 append( sb, "Default template page.", 3 );
 458  0
                 append( sb, "", 0 );
 459  
 
 460  0
                 append( sb, "templateDirectory (Default: src/site)", 2 );
 461  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 462  0
                 append( sb, "", 0 );
 463  0
                 append( sb, "Directory containing the template page.", 3 );
 464  0
                 append( sb, "", 0 );
 465  
 
 466  0
                 append( sb, "templateFile", 2 );
 467  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 );
 468  0
                 append( sb, "", 0 );
 469  
 
 470  0
                 append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 );
 471  0
                 append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 );
 472  0
                 append( sb, "", 0 );
 473  
             }
 474  
         }
 475  
 
 476  0
         if ( goal == null || goal.length() <= 0 || "stage-deploy".equals( goal ) )
 477  
         {
 478  0
             append( sb, "site:stage-deploy", 0 );
 479  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 );
 480  0
             append( sb, "", 0 );
 481  0
             if ( detail )
 482  
             {
 483  0
                 append( sb, "Available parameters:", 1 );
 484  0
                 append( sb, "", 0 );
 485  
 
 486  0
                 append( sb, "attributes", 2 );
 487  0
                 append( sb, "The template properties for rendering the site.", 3 );
 488  0
                 append( sb, "", 0 );
 489  
 
 490  0
                 append( sb, "generatedSiteDirectory", 2 );
 491  0
                 append( sb, "Directory containing generated documentation.", 3 );
 492  0
                 append( sb, "", 0 );
 493  
 
 494  0
                 append( sb, "generateReports (Default: true)", 2 );
 495  0
                 append( sb, "Convenience parameter that allows you to disable report generation.", 3 );
 496  0
                 append( sb, "", 0 );
 497  
 
 498  0
                 append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 );
 499  0
                 append( sb, "Specifies the input encoding.", 3 );
 500  0
                 append( sb, "", 0 );
 501  
 
 502  0
                 append( sb, "locales", 2 );
 503  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 );
 504  0
                 append( sb, "", 0 );
 505  
 
 506  0
                 append( sb, "localRepository", 2 );
 507  0
                 append( sb, "The local repository.", 3 );
 508  0
                 append( sb, "", 0 );
 509  
 
 510  0
                 append( sb, "moduleExcludes", 2 );
 511  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<moduleExcludes>\n<moduleType>filename1.ext,**/*sample.ext</moduleType>\n<!--\u00a0moduleType\u00a0can\u00a0be\u00a0one\u00a0of\u00a0\'apt\',\u00a0\'fml\'\u00a0or\u00a0\'xdoc\'.\u00a0-->\n<!--\u00a0The\u00a0value\u00a0is\u00a0a\u00a0comma\u00a0separated\u00a0list\u00a0of\u00a0-->\n<!--\u00a0filenames\u00a0or\u00a0fileset\u00a0patterns.\u00a0-->\n<!--\u00a0Here\'s\u00a0an\u00a0example:\u00a0-->\n<xdoc>changes.xml,navigation.xml</xdoc>\n</moduleExcludes>\n", 3 );
 512  0
                 append( sb, "", 0 );
 513  
 
 514  0
                 append( sb, "outputDirectory (Default: ${project.reporting.outputDirectory})", 2 );
 515  0
                 append( sb, "Directory containing the generated project sites and report distributions.", 3 );
 516  0
                 append( sb, "", 0 );
 517  
 
 518  0
                 append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 );
 519  0
                 append( sb, "Specifies the output encoding.", 3 );
 520  0
                 append( sb, "", 0 );
 521  
 
 522  0
                 append( sb, "repositories", 2 );
 523  0
                 append( sb, "Remote repositories used for the project.", 3 );
 524  0
                 append( sb, "", 0 );
 525  
 
 526  0
                 append( sb, "siteDirectory", 2 );
 527  0
                 append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 );
 528  0
                 append( sb, "", 0 );
 529  
 
 530  0
                 append( sb, "stagingDirectory", 2 );
 531  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 );
 532  0
                 append( sb, "", 0 );
 533  
 
 534  0
                 append( sb, "stagingRepositoryId (Default: stagingSite)", 2 );
 535  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 );
 536  0
                 append( sb, "", 0 );
 537  
 
 538  0
                 append( sb, "stagingSiteURL", 2 );
 539  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 );
 540  0
                 append( sb, "", 0 );
 541  
 
 542  0
                 append( sb, "template", 2 );
 543  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 544  0
                 append( sb, "", 0 );
 545  0
                 append( sb, "Default template page.", 3 );
 546  0
                 append( sb, "", 0 );
 547  
 
 548  0
                 append( sb, "templateDirectory (Default: src/site)", 2 );
 549  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 550  0
                 append( sb, "", 0 );
 551  0
                 append( sb, "Directory containing the template page.", 3 );
 552  0
                 append( sb, "", 0 );
 553  
 
 554  0
                 append( sb, "templateFile", 2 );
 555  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 );
 556  0
                 append( sb, "", 0 );
 557  
 
 558  0
                 append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 );
 559  0
                 append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 );
 560  0
                 append( sb, "", 0 );
 561  
             }
 562  
         }
 563  
 
 564  0
         if ( getLog().isInfoEnabled() )
 565  
         {
 566  0
             getLog().info( sb.toString() );
 567  
         }
 568  0
     }
 569  
 
 570  
     /**
 571  
      * <p>Repeat a String <code>n</code> times to form a new string.</p>
 572  
      *
 573  
      * @param str String to repeat
 574  
      * @param repeat number of times to repeat str
 575  
      * @return String with repeated String
 576  
      * @throws NegativeArraySizeException if <code>repeat < 0</code>
 577  
      * @throws NullPointerException if str is <code>null</code>
 578  
      */
 579  
     private static String repeat( String str, int repeat )
 580  
     {
 581  0
         StringBuffer buffer = new StringBuffer( repeat * str.length() );
 582  
 
 583  0
         for ( int i = 0; i < repeat; i++ )
 584  
         {
 585  0
             buffer.append( str );
 586  
         }
 587  
 
 588  0
         return buffer.toString();
 589  
     }
 590  
 
 591  
     /** 
 592  
      * Append a description to the buffer by respecting the indentSize and lineLength parameters.
 593  
      * <b>Note</b>: The last character is always a new line.
 594  
      * 
 595  
      * @param sb The buffer to append the description, not <code>null</code>.
 596  
      * @param description The description, not <code>null</code>.
 597  
      * @param indent The base indentation level of each line, must not be negative.
 598  
      */
 599  
     private void append( StringBuffer sb, String description, int indent )
 600  
     {
 601  0
         for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); )
 602  
         {
 603  0
             sb.append( it.next().toString() ).append( '\n' );
 604  
         }
 605  0
     }
 606  
 
 607  
     /** 
 608  
      * Splits the specified text into lines of convenient display length.
 609  
      * 
 610  
      * @param text The text to split into lines, must not be <code>null</code>.
 611  
      * @param indent The base indentation level of each line, must not be negative.
 612  
      * @param indentSize The size of each indentation, must not be negative.
 613  
      * @param lineLength The length of the line, must not be negative.
 614  
      * @return The sequence of display lines, never <code>null</code>.
 615  
      * @throws NegativeArraySizeException if <code>indent < 0</code>
 616  
      */
 617  
     private static List toLines( String text, int indent, int indentSize, int lineLength )
 618  
     {
 619  0
         List lines = new ArrayList();
 620  
 
 621  0
         String ind = repeat( "\t", indent );
 622  0
         String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" );
 623  0
         for ( int i = 0; i < plainLines.length; i++ )
 624  
         {
 625  0
             toLines( lines, ind + plainLines[i], indentSize, lineLength );
 626  
         }
 627  
 
 628  0
         return lines;
 629  
     }
 630  
 
 631  
     /** 
 632  
      * Adds the specified line to the output sequence, performing line wrapping if necessary.
 633  
      * 
 634  
      * @param lines The sequence of display lines, must not be <code>null</code>.
 635  
      * @param line The line to add, must not be <code>null</code>.
 636  
      * @param indentSize The size of each indentation, must not be negative.
 637  
      * @param lineLength The length of the line, must not be negative.
 638  
      */
 639  
     private static void toLines( List lines, String line, int indentSize, int lineLength )
 640  
     {
 641  0
         int lineIndent = getIndentLevel( line );
 642  0
         StringBuffer buf = new StringBuffer( 256 );
 643  0
         String[] tokens = line.split( " +" );
 644  0
         for ( int i = 0; i < tokens.length; i++ )
 645  
         {
 646  0
             String token = tokens[i];
 647  0
             if ( i > 0 )
 648  
             {
 649  0
                 if ( buf.length() + token.length() >= lineLength )
 650  
                 {
 651  0
                     lines.add( buf.toString() );
 652  0
                     buf.setLength( 0 );
 653  0
                     buf.append( repeat( " ", lineIndent * indentSize ) );
 654  
                 }
 655  
                 else
 656  
                 {
 657  0
                     buf.append( ' ' );
 658  
                 }
 659  
             }
 660  0
             for ( int j = 0; j < token.length(); j++ )
 661  
             {
 662  0
                 char c = token.charAt( j );
 663  0
                 if ( c == '\t' )
 664  
                 {
 665  0
                     buf.append( repeat( " ", indentSize - buf.length() % indentSize ) );
 666  
                 }
 667  0
                 else if ( c == '\u00A0' )
 668  
                 {
 669  0
                     buf.append( ' ' );
 670  
                 }
 671  
                 else
 672  
                 {
 673  0
                     buf.append( c );
 674  
                 }
 675  
             }
 676  
         }
 677  0
         lines.add( buf.toString() );
 678  0
     }
 679  
 
 680  
     /** 
 681  
      * Gets the indentation level of the specified line.
 682  
      * 
 683  
      * @param line The line whose indentation level should be retrieved, must not be <code>null</code>.
 684  
      * @return The indentation level of the line.
 685  
      */
 686  
     private static int getIndentLevel( String line )
 687  
     {
 688  0
         int level = 0;
 689  0
         for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ )
 690  
         {
 691  0
             level++;
 692  
         }
 693  0
         for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ )
 694  
         {
 695  0
             if ( line.charAt( i ) == '\t' )
 696  
             {
 697  0
                 level++;
 698  0
                 break;
 699  
             }
 700  
         }
 701  0
         return level;
 702  
     }
 703  
 }