Coverage Report - org.apache.maven.plugins.site.HelpMojo
 
Classes in this File Line Coverage Branch Coverage Complexity
HelpMojo
0%
0/464
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 Mon May 31 23:24:11 CEST 2010
 14  
  * @author org.apache.maven.tools.plugin.generator.PluginHelpGenerator (version 2.6)
 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.1.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, "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 || "help".equals( goal ) )
 141  
         {
 142  0
             append( sb, "site:help", 0 );
 143  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 );
 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, "detail (Default: false)", 2 );
 151  0
                 append( sb, "If true, display all settable properties for each goal.", 3 );
 152  0
                 append( sb, "", 0 );
 153  
 
 154  0
                 append( sb, "goal", 2 );
 155  0
                 append( sb, "The name of the goal for which to show help. If unspecified, all goals will be displayed.", 3 );
 156  0
                 append( sb, "", 0 );
 157  
 
 158  0
                 append( sb, "indentSize (Default: 2)", 2 );
 159  0
                 append( sb, "The number of spaces per indentation level, should be positive.", 3 );
 160  0
                 append( sb, "", 0 );
 161  
 
 162  0
                 append( sb, "lineLength (Default: 80)", 2 );
 163  0
                 append( sb, "The maximum length of a display line, should be positive.", 3 );
 164  0
                 append( sb, "", 0 );
 165  
             }
 166  
         }
 167  
 
 168  0
         if ( goal == null || goal.length() <= 0 || "jar".equals( goal ) )
 169  
         {
 170  0
             append( sb, "site:jar", 0 );
 171  0
             append( sb, "Bundles the site output into a JAR so that it can be deployed to a repository.", 1 );
 172  0
             append( sb, "", 0 );
 173  0
             if ( detail )
 174  
             {
 175  0
                 append( sb, "Available parameters:", 1 );
 176  0
                 append( sb, "", 0 );
 177  
 
 178  0
                 append( sb, "attach (Default: true)", 2 );
 179  0
                 append( sb, "Specifies whether to attach the generated artifact to the project.", 3 );
 180  0
                 append( sb, "", 0 );
 181  
 
 182  0
                 append( sb, "attributes", 2 );
 183  0
                 append( sb, "The template properties for rendering the site.", 3 );
 184  0
                 append( sb, "", 0 );
 185  
 
 186  0
                 append( sb, "finalName", 2 );
 187  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 );
 188  0
                 append( sb, "", 0 );
 189  
 
 190  0
                 append( sb, "generatedSiteDirectory", 2 );
 191  0
                 append( sb, "Directory containing generated documentation.", 3 );
 192  0
                 append( sb, "", 0 );
 193  
 
 194  0
                 append( sb, "generateReports (Default: true)", 2 );
 195  0
                 append( sb, "Convenience parameter that allows you to disable report generation.", 3 );
 196  0
                 append( sb, "", 0 );
 197  
 
 198  0
                 append( sb, "generateSitemap (Default: false)", 2 );
 199  0
                 append( sb, "Generate a sitemap. The result will be a \'sitemap.html\' file at the site root.", 3 );
 200  0
                 append( sb, "", 0 );
 201  
 
 202  0
                 append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 );
 203  0
                 append( sb, "Specifies the input encoding.", 3 );
 204  0
                 append( sb, "", 0 );
 205  
 
 206  0
                 append( sb, "jarOutputDirectory", 2 );
 207  0
                 append( sb, "Specifies the directory where the generated jar file will be put.", 3 );
 208  0
                 append( sb, "", 0 );
 209  
 
 210  0
                 append( sb, "locales", 2 );
 211  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 );
 212  0
                 append( sb, "", 0 );
 213  
 
 214  0
                 append( sb, "localRepository", 2 );
 215  0
                 append( sb, "The local repository.", 3 );
 216  0
                 append( sb, "", 0 );
 217  
 
 218  0
                 append( sb, "moduleExcludes", 2 );
 219  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 );
 220  0
                 append( sb, "", 0 );
 221  
 
 222  0
                 append( sb, "outputDirectory (Default: ${project.reporting.outputDirectory})", 2 );
 223  0
                 append( sb, "Directory containing the generated project sites and report distributions.", 3 );
 224  0
                 append( sb, "", 0 );
 225  
 
 226  0
                 append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 );
 227  0
                 append( sb, "Specifies the output encoding.", 3 );
 228  0
                 append( sb, "", 0 );
 229  
 
 230  0
                 append( sb, "repositories", 2 );
 231  0
                 append( sb, "Remote repositories used for the project.", 3 );
 232  0
                 append( sb, "", 0 );
 233  
 
 234  0
                 append( sb, "siteDirectory", 2 );
 235  0
                 append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 );
 236  0
                 append( sb, "", 0 );
 237  
 
 238  0
                 append( sb, "template", 2 );
 239  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 240  0
                 append( sb, "", 0 );
 241  0
                 append( sb, "Default template page.", 3 );
 242  0
                 append( sb, "", 0 );
 243  
 
 244  0
                 append( sb, "templateDirectory (Default: src/site)", 2 );
 245  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 246  0
                 append( sb, "", 0 );
 247  0
                 append( sb, "Directory containing the template page.", 3 );
 248  0
                 append( sb, "", 0 );
 249  
 
 250  0
                 append( sb, "templateFile", 2 );
 251  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 );
 252  0
                 append( sb, "", 0 );
 253  
 
 254  0
                 append( sb, "validate (Default: false)", 2 );
 255  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 );
 256  0
                 append( sb, "", 0 );
 257  
 
 258  0
                 append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 );
 259  0
                 append( sb, "Deprecated. use the standard m2 directory layout", 3 );
 260  0
                 append( sb, "", 0 );
 261  0
                 append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 );
 262  0
                 append( sb, "", 0 );
 263  
             }
 264  
         }
 265  
 
 266  0
         if ( goal == null || goal.length() <= 0 || "run".equals( goal ) )
 267  
         {
 268  0
             append( sb, "site:run", 0 );
 269  0
             append( sb, "Starts the site up, rendering documents as requested for faster editing. It uses Jetty as the web server.", 1 );
 270  0
             append( sb, "", 0 );
 271  0
             if ( detail )
 272  
             {
 273  0
                 append( sb, "Available parameters:", 1 );
 274  0
                 append( sb, "", 0 );
 275  
 
 276  0
                 append( sb, "attributes", 2 );
 277  0
                 append( sb, "The template properties for rendering the site.", 3 );
 278  0
                 append( sb, "", 0 );
 279  
 
 280  0
                 append( sb, "generatedSiteDirectory", 2 );
 281  0
                 append( sb, "Directory containing generated documentation.", 3 );
 282  0
                 append( sb, "", 0 );
 283  
 
 284  0
                 append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 );
 285  0
                 append( sb, "Specifies the input encoding.", 3 );
 286  0
                 append( sb, "", 0 );
 287  
 
 288  0
                 append( sb, "locales", 2 );
 289  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 );
 290  0
                 append( sb, "", 0 );
 291  
 
 292  0
                 append( sb, "localRepository", 2 );
 293  0
                 append( sb, "The local repository.", 3 );
 294  0
                 append( sb, "", 0 );
 295  
 
 296  0
                 append( sb, "moduleExcludes", 2 );
 297  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 );
 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, "port (Default: 8080)", 2 );
 305  0
                 append( sb, "The port to execute the HTTP server on.", 3 );
 306  0
                 append( sb, "", 0 );
 307  
 
 308  0
                 append( sb, "repositories", 2 );
 309  0
                 append( sb, "Remote repositories used for the project.", 3 );
 310  0
                 append( sb, "", 0 );
 311  
 
 312  0
                 append( sb, "siteDirectory", 2 );
 313  0
                 append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 );
 314  0
                 append( sb, "", 0 );
 315  
 
 316  0
                 append( sb, "template", 2 );
 317  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 318  0
                 append( sb, "", 0 );
 319  0
                 append( sb, "Default template page.", 3 );
 320  0
                 append( sb, "", 0 );
 321  
 
 322  0
                 append( sb, "templateDirectory (Default: src/site)", 2 );
 323  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 324  0
                 append( sb, "", 0 );
 325  0
                 append( sb, "Directory containing the template page.", 3 );
 326  0
                 append( sb, "", 0 );
 327  
 
 328  0
                 append( sb, "templateFile", 2 );
 329  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 );
 330  0
                 append( sb, "", 0 );
 331  
 
 332  0
                 append( sb, "tempWebappDirectory", 2 );
 333  0
                 append( sb, "Where to create the dummy web application.", 3 );
 334  0
                 append( sb, "", 0 );
 335  
 
 336  0
                 append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 );
 337  0
                 append( sb, "Deprecated. use the standard m2 directory layout", 3 );
 338  0
                 append( sb, "", 0 );
 339  0
                 append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 );
 340  0
                 append( sb, "", 0 );
 341  
             }
 342  
         }
 343  
 
 344  0
         if ( goal == null || goal.length() <= 0 || "site".equals( goal ) )
 345  
         {
 346  0
             append( sb, "site:site", 0 );
 347  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 );
 348  0
             append( sb, "", 0 );
 349  0
             if ( detail )
 350  
             {
 351  0
                 append( sb, "Available parameters:", 1 );
 352  0
                 append( sb, "", 0 );
 353  
 
 354  0
                 append( sb, "attributes", 2 );
 355  0
                 append( sb, "The template properties for rendering the site.", 3 );
 356  0
                 append( sb, "", 0 );
 357  
 
 358  0
                 append( sb, "generatedSiteDirectory", 2 );
 359  0
                 append( sb, "Directory containing generated documentation.", 3 );
 360  0
                 append( sb, "", 0 );
 361  
 
 362  0
                 append( sb, "generateReports (Default: true)", 2 );
 363  0
                 append( sb, "Convenience parameter that allows you to disable report generation.", 3 );
 364  0
                 append( sb, "", 0 );
 365  
 
 366  0
                 append( sb, "generateSitemap (Default: false)", 2 );
 367  0
                 append( sb, "Generate a sitemap. The result will be a \'sitemap.html\' file at the site root.", 3 );
 368  0
                 append( sb, "", 0 );
 369  
 
 370  0
                 append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 );
 371  0
                 append( sb, "Specifies the input encoding.", 3 );
 372  0
                 append( sb, "", 0 );
 373  
 
 374  0
                 append( sb, "locales", 2 );
 375  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 );
 376  0
                 append( sb, "", 0 );
 377  
 
 378  0
                 append( sb, "localRepository", 2 );
 379  0
                 append( sb, "The local repository.", 3 );
 380  0
                 append( sb, "", 0 );
 381  
 
 382  0
                 append( sb, "moduleExcludes", 2 );
 383  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 );
 384  0
                 append( sb, "", 0 );
 385  
 
 386  0
                 append( sb, "outputDirectory (Default: ${project.reporting.outputDirectory})", 2 );
 387  0
                 append( sb, "Directory containing the generated project sites and report distributions.", 3 );
 388  0
                 append( sb, "", 0 );
 389  
 
 390  0
                 append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 );
 391  0
                 append( sb, "Specifies the output encoding.", 3 );
 392  0
                 append( sb, "", 0 );
 393  
 
 394  0
                 append( sb, "repositories", 2 );
 395  0
                 append( sb, "Remote repositories used for the project.", 3 );
 396  0
                 append( sb, "", 0 );
 397  
 
 398  0
                 append( sb, "siteDirectory", 2 );
 399  0
                 append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 );
 400  0
                 append( sb, "", 0 );
 401  
 
 402  0
                 append( sb, "template", 2 );
 403  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 404  0
                 append( sb, "", 0 );
 405  0
                 append( sb, "Default template page.", 3 );
 406  0
                 append( sb, "", 0 );
 407  
 
 408  0
                 append( sb, "templateDirectory (Default: src/site)", 2 );
 409  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 410  0
                 append( sb, "", 0 );
 411  0
                 append( sb, "Directory containing the template page.", 3 );
 412  0
                 append( sb, "", 0 );
 413  
 
 414  0
                 append( sb, "templateFile", 2 );
 415  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 );
 416  0
                 append( sb, "", 0 );
 417  
 
 418  0
                 append( sb, "validate (Default: false)", 2 );
 419  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 );
 420  0
                 append( sb, "", 0 );
 421  
 
 422  0
                 append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 );
 423  0
                 append( sb, "Deprecated. use the standard m2 directory layout", 3 );
 424  0
                 append( sb, "", 0 );
 425  0
                 append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 );
 426  0
                 append( sb, "", 0 );
 427  
             }
 428  
         }
 429  
 
 430  0
         if ( goal == null || goal.length() <= 0 || "stage".equals( goal ) )
 431  
         {
 432  0
             append( sb, "site:stage", 0 );
 433  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 );
 434  0
             append( sb, "", 0 );
 435  0
             if ( detail )
 436  
             {
 437  0
                 append( sb, "Available parameters:", 1 );
 438  0
                 append( sb, "", 0 );
 439  
 
 440  0
                 append( sb, "attributes", 2 );
 441  0
                 append( sb, "The template properties for rendering the site.", 3 );
 442  0
                 append( sb, "", 0 );
 443  
 
 444  0
                 append( sb, "generatedSiteDirectory", 2 );
 445  0
                 append( sb, "Directory containing generated documentation.", 3 );
 446  0
                 append( sb, "", 0 );
 447  
 
 448  0
                 append( sb, "generateReports (Default: true)", 2 );
 449  0
                 append( sb, "Convenience parameter that allows you to disable report generation.", 3 );
 450  0
                 append( sb, "", 0 );
 451  
 
 452  0
                 append( sb, "generateSitemap (Default: false)", 2 );
 453  0
                 append( sb, "Generate a sitemap. The result will be a \'sitemap.html\' file at the site root.", 3 );
 454  0
                 append( sb, "", 0 );
 455  
 
 456  0
                 append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 );
 457  0
                 append( sb, "Specifies the input encoding.", 3 );
 458  0
                 append( sb, "", 0 );
 459  
 
 460  0
                 append( sb, "locales", 2 );
 461  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 );
 462  0
                 append( sb, "", 0 );
 463  
 
 464  0
                 append( sb, "localRepository", 2 );
 465  0
                 append( sb, "The local repository.", 3 );
 466  0
                 append( sb, "", 0 );
 467  
 
 468  0
                 append( sb, "moduleExcludes", 2 );
 469  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 );
 470  0
                 append( sb, "", 0 );
 471  
 
 472  0
                 append( sb, "outputDirectory (Default: ${project.reporting.outputDirectory})", 2 );
 473  0
                 append( sb, "Directory containing the generated project sites and report distributions.", 3 );
 474  0
                 append( sb, "", 0 );
 475  
 
 476  0
                 append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 );
 477  0
                 append( sb, "Specifies the output encoding.", 3 );
 478  0
                 append( sb, "", 0 );
 479  
 
 480  0
                 append( sb, "repositories", 2 );
 481  0
                 append( sb, "Remote repositories used for the project.", 3 );
 482  0
                 append( sb, "", 0 );
 483  
 
 484  0
                 append( sb, "siteDirectory", 2 );
 485  0
                 append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 );
 486  0
                 append( sb, "", 0 );
 487  
 
 488  0
                 append( sb, "stagingDirectory", 2 );
 489  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 );
 490  0
                 append( sb, "", 0 );
 491  
 
 492  0
                 append( sb, "template", 2 );
 493  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 494  0
                 append( sb, "", 0 );
 495  0
                 append( sb, "Default template page.", 3 );
 496  0
                 append( sb, "", 0 );
 497  
 
 498  0
                 append( sb, "templateDirectory (Default: src/site)", 2 );
 499  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 500  0
                 append( sb, "", 0 );
 501  0
                 append( sb, "Directory containing the template page.", 3 );
 502  0
                 append( sb, "", 0 );
 503  
 
 504  0
                 append( sb, "templateFile", 2 );
 505  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 );
 506  0
                 append( sb, "", 0 );
 507  
 
 508  0
                 append( sb, "validate (Default: false)", 2 );
 509  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 );
 510  0
                 append( sb, "", 0 );
 511  
 
 512  0
                 append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 );
 513  0
                 append( sb, "Deprecated. use the standard m2 directory layout", 3 );
 514  0
                 append( sb, "", 0 );
 515  0
                 append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 );
 516  0
                 append( sb, "", 0 );
 517  
             }
 518  
         }
 519  
 
 520  0
         if ( goal == null || goal.length() <= 0 || "stage-deploy".equals( goal ) )
 521  
         {
 522  0
             append( sb, "site:stage-deploy", 0 );
 523  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 );
 524  0
             append( sb, "", 0 );
 525  0
             if ( detail )
 526  
             {
 527  0
                 append( sb, "Available parameters:", 1 );
 528  0
                 append( sb, "", 0 );
 529  
 
 530  0
                 append( sb, "attributes", 2 );
 531  0
                 append( sb, "The template properties for rendering the site.", 3 );
 532  0
                 append( sb, "", 0 );
 533  
 
 534  0
                 append( sb, "chmod (Default: true)", 2 );
 535  0
                 append( sb, "Whether to run the \'chmod\' command on the remote site after the deploy. Defaults to \'true\'.", 3 );
 536  0
                 append( sb, "", 0 );
 537  
 
 538  0
                 append( sb, "chmodMode (Default: g+w,a+rX)", 2 );
 539  0
                 append( sb, "The mode used by the \'chmod\' command. Only used if chmod = true. Defaults to \'g+w,a+rX\'.", 3 );
 540  0
                 append( sb, "", 0 );
 541  
 
 542  0
                 append( sb, "chmodOptions (Default: -Rf)", 2 );
 543  0
                 append( sb, "The options used by the \'chmod\' command. Only used if chmod = true. Defaults to \'-Rf\'.", 3 );
 544  0
                 append( sb, "", 0 );
 545  
 
 546  0
                 append( sb, "generatedSiteDirectory", 2 );
 547  0
                 append( sb, "Directory containing generated documentation.", 3 );
 548  0
                 append( sb, "", 0 );
 549  
 
 550  0
                 append( sb, "generateReports (Default: true)", 2 );
 551  0
                 append( sb, "Convenience parameter that allows you to disable report generation.", 3 );
 552  0
                 append( sb, "", 0 );
 553  
 
 554  0
                 append( sb, "generateSitemap (Default: false)", 2 );
 555  0
                 append( sb, "Generate a sitemap. The result will be a \'sitemap.html\' file at the site root.", 3 );
 556  0
                 append( sb, "", 0 );
 557  
 
 558  0
                 append( sb, "inputEncoding (Default: ${project.build.sourceEncoding})", 2 );
 559  0
                 append( sb, "Specifies the input encoding.", 3 );
 560  0
                 append( sb, "", 0 );
 561  
 
 562  0
                 append( sb, "locales", 2 );
 563  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 );
 564  0
                 append( sb, "", 0 );
 565  
 
 566  0
                 append( sb, "localRepository", 2 );
 567  0
                 append( sb, "The local repository.", 3 );
 568  0
                 append( sb, "", 0 );
 569  
 
 570  0
                 append( sb, "moduleExcludes", 2 );
 571  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 );
 572  0
                 append( sb, "", 0 );
 573  
 
 574  0
                 append( sb, "outputDirectory (Default: ${project.reporting.outputDirectory})", 2 );
 575  0
                 append( sb, "Directory containing the generated project sites and report distributions.", 3 );
 576  0
                 append( sb, "", 0 );
 577  
 
 578  0
                 append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 );
 579  0
                 append( sb, "Specifies the output encoding.", 3 );
 580  0
                 append( sb, "", 0 );
 581  
 
 582  0
                 append( sb, "repositories", 2 );
 583  0
                 append( sb, "Remote repositories used for the project.", 3 );
 584  0
                 append( sb, "", 0 );
 585  
 
 586  0
                 append( sb, "siteDirectory", 2 );
 587  0
                 append( sb, "Directory containing the site.xml file and the source for apt, fml and xdoc docs.", 3 );
 588  0
                 append( sb, "", 0 );
 589  
 
 590  0
                 append( sb, "stagingDirectory", 2 );
 591  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 );
 592  0
                 append( sb, "", 0 );
 593  
 
 594  0
                 append( sb, "stagingRepositoryId (Default: stagingSite)", 2 );
 595  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 );
 596  0
                 append( sb, "", 0 );
 597  
 
 598  0
                 append( sb, "stagingSiteURL", 2 );
 599  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 );
 600  0
                 append( sb, "", 0 );
 601  
 
 602  0
                 append( sb, "template", 2 );
 603  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 604  0
                 append( sb, "", 0 );
 605  0
                 append( sb, "Default template page.", 3 );
 606  0
                 append( sb, "", 0 );
 607  
 
 608  0
                 append( sb, "templateDirectory (Default: src/site)", 2 );
 609  0
                 append( sb, "Deprecated. use templateFile or skinning instead", 3 );
 610  0
                 append( sb, "", 0 );
 611  0
                 append( sb, "Directory containing the template page.", 3 );
 612  0
                 append( sb, "", 0 );
 613  
 
 614  0
                 append( sb, "templateFile", 2 );
 615  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 );
 616  0
                 append( sb, "", 0 );
 617  
 
 618  0
                 append( sb, "validate (Default: false)", 2 );
 619  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 );
 620  0
                 append( sb, "", 0 );
 621  
 
 622  0
                 append( sb, "xdocDirectory (Default: ${basedir}/xdocs)", 2 );
 623  0
                 append( sb, "Deprecated. use the standard m2 directory layout", 3 );
 624  0
                 append( sb, "", 0 );
 625  0
                 append( sb, "Alternative directory for xdoc source, useful for m1 to m2 migration", 3 );
 626  0
                 append( sb, "", 0 );
 627  
             }
 628  
         }
 629  
 
 630  0
         if ( getLog().isInfoEnabled() )
 631  
         {
 632  0
             getLog().info( sb.toString() );
 633  
         }
 634  0
     }
 635  
 
 636  
     /**
 637  
      * <p>Repeat a String <code>n</code> times to form a new string.</p>
 638  
      *
 639  
      * @param str String to repeat
 640  
      * @param repeat number of times to repeat str
 641  
      * @return String with repeated String
 642  
      * @throws NegativeArraySizeException if <code>repeat < 0</code>
 643  
      * @throws NullPointerException if str is <code>null</code>
 644  
      */
 645  
     private static String repeat( String str, int repeat )
 646  
     {
 647  0
         StringBuffer buffer = new StringBuffer( repeat * str.length() );
 648  
 
 649  0
         for ( int i = 0; i < repeat; i++ )
 650  
         {
 651  0
             buffer.append( str );
 652  
         }
 653  
 
 654  0
         return buffer.toString();
 655  
     }
 656  
 
 657  
     /** 
 658  
      * Append a description to the buffer by respecting the indentSize and lineLength parameters.
 659  
      * <b>Note</b>: The last character is always a new line.
 660  
      * 
 661  
      * @param sb The buffer to append the description, not <code>null</code>.
 662  
      * @param description The description, not <code>null</code>.
 663  
      * @param indent The base indentation level of each line, must not be negative.
 664  
      */
 665  
     private void append( StringBuffer sb, String description, int indent )
 666  
     {
 667  0
         for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); )
 668  
         {
 669  0
             sb.append( it.next().toString() ).append( '\n' );
 670  
         }
 671  0
     }
 672  
 
 673  
     /** 
 674  
      * Splits the specified text into lines of convenient display length.
 675  
      * 
 676  
      * @param text The text to split into lines, must not be <code>null</code>.
 677  
      * @param indent The base indentation level of each line, must not be negative.
 678  
      * @param indentSize The size of each indentation, must not be negative.
 679  
      * @param lineLength The length of the line, must not be negative.
 680  
      * @return The sequence of display lines, never <code>null</code>.
 681  
      * @throws NegativeArraySizeException if <code>indent < 0</code>
 682  
      */
 683  
     private static List toLines( String text, int indent, int indentSize, int lineLength )
 684  
     {
 685  0
         List lines = new ArrayList();
 686  
 
 687  0
         String ind = repeat( "\t", indent );
 688  0
         String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" );
 689  0
         for ( int i = 0; i < plainLines.length; i++ )
 690  
         {
 691  0
             toLines( lines, ind + plainLines[i], indentSize, lineLength );
 692  
         }
 693  
 
 694  0
         return lines;
 695  
     }
 696  
 
 697  
     /** 
 698  
      * Adds the specified line to the output sequence, performing line wrapping if necessary.
 699  
      * 
 700  
      * @param lines The sequence of display lines, must not be <code>null</code>.
 701  
      * @param line The line to add, must not be <code>null</code>.
 702  
      * @param indentSize The size of each indentation, must not be negative.
 703  
      * @param lineLength The length of the line, must not be negative.
 704  
      */
 705  
     private static void toLines( List lines, String line, int indentSize, int lineLength )
 706  
     {
 707  0
         int lineIndent = getIndentLevel( line );
 708  0
         StringBuffer buf = new StringBuffer( 256 );
 709  0
         String[] tokens = line.split( " +" );
 710  0
         for ( int i = 0; i < tokens.length; i++ )
 711  
         {
 712  0
             String token = tokens[i];
 713  0
             if ( i > 0 )
 714  
             {
 715  0
                 if ( buf.length() + token.length() >= lineLength )
 716  
                 {
 717  0
                     lines.add( buf.toString() );
 718  0
                     buf.setLength( 0 );
 719  0
                     buf.append( repeat( " ", lineIndent * indentSize ) );
 720  
                 }
 721  
                 else
 722  
                 {
 723  0
                     buf.append( ' ' );
 724  
                 }
 725  
             }
 726  0
             for ( int j = 0; j < token.length(); j++ )
 727  
             {
 728  0
                 char c = token.charAt( j );
 729  0
                 if ( c == '\t' )
 730  
                 {
 731  0
                     buf.append( repeat( " ", indentSize - buf.length() % indentSize ) );
 732  
                 }
 733  0
                 else if ( c == '\u00A0' )
 734  
                 {
 735  0
                     buf.append( ' ' );
 736  
                 }
 737  
                 else
 738  
                 {
 739  0
                     buf.append( c );
 740  
                 }
 741  
             }
 742  
         }
 743  0
         lines.add( buf.toString() );
 744  0
     }
 745  
 
 746  
     /** 
 747  
      * Gets the indentation level of the specified line.
 748  
      * 
 749  
      * @param line The line whose indentation level should be retrieved, must not be <code>null</code>.
 750  
      * @return The indentation level of the line.
 751  
      */
 752  
     private static int getIndentLevel( String line )
 753  
     {
 754  0
         int level = 0;
 755  0
         for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ )
 756  
         {
 757  0
             level++;
 758  
         }
 759  0
         for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ )
 760  
         {
 761  0
             if ( line.charAt( i ) == '\t' )
 762  
             {
 763  0
                 level++;
 764  0
                 break;
 765  
             }
 766  
         }
 767  0
         return level;
 768  
     }
 769  
 }