Coverage Report - org.apache.maven.report.projectinfo.HelpMojo
 
Classes in this File Line Coverage Branch Coverage Complexity
HelpMojo
0 %
0/416
0 %
0/166
9
 
 1  
 package org.apache.maven.report.projectinfo;
 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-project-info-reports-plugin.<br/> Call <pre>  mvn project-info-reports:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</pre> to display parameter details.
 12  
  *
 13  
  * @version generated on Mon May 16 00:25:47 CEST 2011
 14  
  * @author org.apache.maven.tools.plugin.generator.PluginHelpGenerator (version 2.7)
 15  
  * @goal help
 16  
  * @requiresProject false
 17  
  * @threadSafe
 18  
  */
 19  0
 public class HelpMojo
 20  
     extends AbstractMojo
 21  
 {
 22  
     /**
 23  
      * If <code>true</code>, display all settable properties for each goal.
 24  
      * 
 25  
      * @parameter expression="${detail}" default-value="false"
 26  
      */
 27  
     private boolean detail;
 28  
 
 29  
     /**
 30  
      * The name of the goal for which to show help. If unspecified, all goals will be displayed.
 31  
      * 
 32  
      * @parameter expression="${goal}"
 33  
      */
 34  
     private java.lang.String goal;
 35  
 
 36  
     /**
 37  
      * The maximum length of a display line, should be positive.
 38  
      * 
 39  
      * @parameter expression="${lineLength}" default-value="80"
 40  
      */
 41  
     private int lineLength;
 42  
 
 43  
     /**
 44  
      * The number of spaces per indentation level, should be positive.
 45  
      * 
 46  
      * @parameter expression="${indentSize}" default-value="2"
 47  
      */
 48  
     private int indentSize;
 49  
 
 50  
 
 51  
     /** {@inheritDoc} */
 52  
     public void execute()
 53  
         throws MojoExecutionException
 54  
     {
 55  0
         if ( lineLength <= 0 )
 56  
         {
 57  0
             getLog().warn( "The parameter 'lineLength' should be positive, using '80' as default." );
 58  0
             lineLength = 80;
 59  
         }
 60  0
         if ( indentSize <= 0 )
 61  
         {
 62  0
             getLog().warn( "The parameter 'indentSize' should be positive, using '2' as default." );
 63  0
             indentSize = 2;
 64  
         }
 65  
 
 66  0
         StringBuffer sb = new StringBuffer();
 67  
 
 68  0
         append( sb, "org.apache.maven.plugins:maven-project-info-reports-plugin:2.4", 0 );
 69  0
         append( sb, "", 0 );
 70  
 
 71  0
         append( sb, "Maven Project Info Reports Plugin", 0 );
 72  0
         append( sb, "The Maven Project Info Reports Plugin is a plugin that generates standard reports for the specified project.", 1 );
 73  0
         append( sb, "", 0 );
 74  
 
 75  0
         if ( goal == null || goal.length() <= 0 )
 76  
         {
 77  0
             append( sb, "This plugin has 16 goals:", 0 );
 78  0
             append( sb, "", 0 );
 79  
         }
 80  
 
 81  0
         if ( goal == null || goal.length() <= 0 || "cim".equals( goal ) )
 82  
         {
 83  0
             append( sb, "project-info-reports:cim", 0 );
 84  0
             append( sb, "Generates the Project Continuous Integration System report.", 1 );
 85  0
             append( sb, "", 0 );
 86  0
             if ( detail )
 87  
             {
 88  0
                 append( sb, "Available parameters:", 1 );
 89  0
                 append( sb, "", 0 );
 90  
 
 91  0
                 append( sb, "customBundle", 2 );
 92  0
                 append( sb, "Path for a custom bundle instead of using the default one.\nUsing this field, you could change the texts in the generated reports.", 3 );
 93  0
                 append( sb, "Expression: ${project.basedir}/src/site/custom/project-info-report.properties", 3 );
 94  0
                 append( sb, "", 0 );
 95  
 
 96  0
                 append( sb, "outputDirectory", 2 );
 97  0
                 append( sb, "The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.", 3 );
 98  0
                 append( sb, "Required: Yes", 3 );
 99  0
                 append( sb, "Expression: ${project.reporting.outputDirectory}", 3 );
 100  0
                 append( sb, "", 0 );
 101  
 
 102  0
                 append( sb, "remoteRepositories", 2 );
 103  0
                 append( sb, "Remote repositories used for the project.", 3 );
 104  0
                 append( sb, "Expression: ${project.remoteArtifactRepositories}", 3 );
 105  0
                 append( sb, "", 0 );
 106  
             }
 107  
         }
 108  
 
 109  0
         if ( goal == null || goal.length() <= 0 || "dependencies".equals( goal ) )
 110  
         {
 111  0
             append( sb, "project-info-reports:dependencies", 0 );
 112  0
             append( sb, "Generates the Project Dependencies report.", 1 );
 113  0
             append( sb, "", 0 );
 114  0
             if ( detail )
 115  
             {
 116  0
                 append( sb, "Available parameters:", 1 );
 117  0
                 append( sb, "", 0 );
 118  
 
 119  0
                 append( sb, "customBundle", 2 );
 120  0
                 append( sb, "Path for a custom bundle instead of using the default one.\nUsing this field, you could change the texts in the generated reports.", 3 );
 121  0
                 append( sb, "Expression: ${project.basedir}/src/site/custom/project-info-report.properties", 3 );
 122  0
                 append( sb, "", 0 );
 123  
 
 124  0
                 append( sb, "dependencyDetailsEnabled (Default: true)", 2 );
 125  0
                 append( sb, "Display file details for each dependency, such as: file size, number of classes, number of packages etc.", 3 );
 126  0
                 append( sb, "Expression: ${dependency.details.enabled}", 3 );
 127  0
                 append( sb, "", 0 );
 128  
 
 129  0
                 append( sb, "dependencyLocationsEnabled (Default: true)", 2 );
 130  0
                 append( sb, "Display the repository locations of the dependencies. If Maven is configured to be offline, this parameter will be ignored.", 3 );
 131  0
                 append( sb, "Expression: ${dependency.locations.enabled}", 3 );
 132  0
                 append( sb, "", 0 );
 133  
 
 134  0
                 append( sb, "outputDirectory", 2 );
 135  0
                 append( sb, "The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.", 3 );
 136  0
                 append( sb, "Required: Yes", 3 );
 137  0
                 append( sb, "Expression: ${project.reporting.outputDirectory}", 3 );
 138  0
                 append( sb, "", 0 );
 139  
 
 140  0
                 append( sb, "remoteRepositories", 2 );
 141  0
                 append( sb, "Remote repositories used for the project.", 3 );
 142  0
                 append( sb, "Expression: ${project.remoteArtifactRepositories}", 3 );
 143  0
                 append( sb, "", 0 );
 144  
             }
 145  
         }
 146  
 
 147  0
         if ( goal == null || goal.length() <= 0 || "dependency-convergence".equals( goal ) )
 148  
         {
 149  0
             append( sb, "project-info-reports:dependency-convergence", 0 );
 150  0
             append( sb, "Generates the Dependency Convergence report for reactor builds.", 1 );
 151  0
             append( sb, "", 0 );
 152  0
             if ( detail )
 153  
             {
 154  0
                 append( sb, "Available parameters:", 1 );
 155  0
                 append( sb, "", 0 );
 156  
 
 157  0
                 append( sb, "customBundle", 2 );
 158  0
                 append( sb, "Path for a custom bundle instead of using the default one.\nUsing this field, you could change the texts in the generated reports.", 3 );
 159  0
                 append( sb, "Expression: ${project.basedir}/src/site/custom/project-info-report.properties", 3 );
 160  0
                 append( sb, "", 0 );
 161  
 
 162  0
                 append( sb, "outputDirectory", 2 );
 163  0
                 append( sb, "The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.", 3 );
 164  0
                 append( sb, "Required: Yes", 3 );
 165  0
                 append( sb, "Expression: ${project.reporting.outputDirectory}", 3 );
 166  0
                 append( sb, "", 0 );
 167  
 
 168  0
                 append( sb, "remoteRepositories", 2 );
 169  0
                 append( sb, "Remote repositories used for the project.", 3 );
 170  0
                 append( sb, "Expression: ${project.remoteArtifactRepositories}", 3 );
 171  0
                 append( sb, "", 0 );
 172  
             }
 173  
         }
 174  
 
 175  0
         if ( goal == null || goal.length() <= 0 || "dependency-management".equals( goal ) )
 176  
         {
 177  0
             append( sb, "project-info-reports:dependency-management", 0 );
 178  0
             append( sb, "Generates the Project Dependency Management report.", 1 );
 179  0
             append( sb, "", 0 );
 180  0
             if ( detail )
 181  
             {
 182  0
                 append( sb, "Available parameters:", 1 );
 183  0
                 append( sb, "", 0 );
 184  
 
 185  0
                 append( sb, "customBundle", 2 );
 186  0
                 append( sb, "Path for a custom bundle instead of using the default one.\nUsing this field, you could change the texts in the generated reports.", 3 );
 187  0
                 append( sb, "Expression: ${project.basedir}/src/site/custom/project-info-report.properties", 3 );
 188  0
                 append( sb, "", 0 );
 189  
 
 190  0
                 append( sb, "outputDirectory", 2 );
 191  0
                 append( sb, "The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.", 3 );
 192  0
                 append( sb, "Required: Yes", 3 );
 193  0
                 append( sb, "Expression: ${project.reporting.outputDirectory}", 3 );
 194  0
                 append( sb, "", 0 );
 195  
 
 196  0
                 append( sb, "remoteRepositories", 2 );
 197  0
                 append( sb, "Remote repositories used for the project.", 3 );
 198  0
                 append( sb, "Expression: ${project.remoteArtifactRepositories}", 3 );
 199  0
                 append( sb, "", 0 );
 200  
             }
 201  
         }
 202  
 
 203  0
         if ( goal == null || goal.length() <= 0 || "distribution-management".equals( goal ) )
 204  
         {
 205  0
             append( sb, "project-info-reports:distribution-management", 0 );
 206  0
             append( sb, "Generates the Project Distribution Management report.", 1 );
 207  0
             append( sb, "", 0 );
 208  0
             if ( detail )
 209  
             {
 210  0
                 append( sb, "Available parameters:", 1 );
 211  0
                 append( sb, "", 0 );
 212  
 
 213  0
                 append( sb, "customBundle", 2 );
 214  0
                 append( sb, "Path for a custom bundle instead of using the default one.\nUsing this field, you could change the texts in the generated reports.", 3 );
 215  0
                 append( sb, "Expression: ${project.basedir}/src/site/custom/project-info-report.properties", 3 );
 216  0
                 append( sb, "", 0 );
 217  
 
 218  0
                 append( sb, "outputDirectory", 2 );
 219  0
                 append( sb, "The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.", 3 );
 220  0
                 append( sb, "Required: Yes", 3 );
 221  0
                 append( sb, "Expression: ${project.reporting.outputDirectory}", 3 );
 222  0
                 append( sb, "", 0 );
 223  
 
 224  0
                 append( sb, "remoteRepositories", 2 );
 225  0
                 append( sb, "Remote repositories used for the project.", 3 );
 226  0
                 append( sb, "Expression: ${project.remoteArtifactRepositories}", 3 );
 227  0
                 append( sb, "", 0 );
 228  
             }
 229  
         }
 230  
 
 231  0
         if ( goal == null || goal.length() <= 0 || "help".equals( goal ) )
 232  
         {
 233  0
             append( sb, "project-info-reports:help", 0 );
 234  0
             append( sb, "Display help information on maven-project-info-reports-plugin.\nCall\n\u00a0\u00a0mvn\u00a0project-info-reports:help\u00a0-Ddetail=true\u00a0-Dgoal=<goal-name>\nto display parameter details.", 1 );
 235  0
             append( sb, "", 0 );
 236  0
             if ( detail )
 237  
             {
 238  0
                 append( sb, "Available parameters:", 1 );
 239  0
                 append( sb, "", 0 );
 240  
 
 241  0
                 append( sb, "detail (Default: false)", 2 );
 242  0
                 append( sb, "If true, display all settable properties for each goal.", 3 );
 243  0
                 append( sb, "Expression: ${detail}", 3 );
 244  0
                 append( sb, "", 0 );
 245  
 
 246  0
                 append( sb, "goal", 2 );
 247  0
                 append( sb, "The name of the goal for which to show help. If unspecified, all goals will be displayed.", 3 );
 248  0
                 append( sb, "Expression: ${goal}", 3 );
 249  0
                 append( sb, "", 0 );
 250  
 
 251  0
                 append( sb, "indentSize (Default: 2)", 2 );
 252  0
                 append( sb, "The number of spaces per indentation level, should be positive.", 3 );
 253  0
                 append( sb, "Expression: ${indentSize}", 3 );
 254  0
                 append( sb, "", 0 );
 255  
 
 256  0
                 append( sb, "lineLength (Default: 80)", 2 );
 257  0
                 append( sb, "The maximum length of a display line, should be positive.", 3 );
 258  0
                 append( sb, "Expression: ${lineLength}", 3 );
 259  0
                 append( sb, "", 0 );
 260  
             }
 261  
         }
 262  
 
 263  0
         if ( goal == null || goal.length() <= 0 || "index".equals( goal ) )
 264  
         {
 265  0
             append( sb, "project-info-reports:index", 0 );
 266  0
             append( sb, "Generates the project index page.", 1 );
 267  0
             append( sb, "", 0 );
 268  0
             if ( detail )
 269  
             {
 270  0
                 append( sb, "Available parameters:", 1 );
 271  0
                 append( sb, "", 0 );
 272  
 
 273  0
                 append( sb, "customBundle", 2 );
 274  0
                 append( sb, "Path for a custom bundle instead of using the default one.\nUsing this field, you could change the texts in the generated reports.", 3 );
 275  0
                 append( sb, "Expression: ${project.basedir}/src/site/custom/project-info-report.properties", 3 );
 276  0
                 append( sb, "", 0 );
 277  
 
 278  0
                 append( sb, "outputDirectory", 2 );
 279  0
                 append( sb, "The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.", 3 );
 280  0
                 append( sb, "Required: Yes", 3 );
 281  0
                 append( sb, "Expression: ${project.reporting.outputDirectory}", 3 );
 282  0
                 append( sb, "", 0 );
 283  
 
 284  0
                 append( sb, "remoteRepositories", 2 );
 285  0
                 append( sb, "Remote repositories used for the project.", 3 );
 286  0
                 append( sb, "Expression: ${project.remoteArtifactRepositories}", 3 );
 287  0
                 append( sb, "", 0 );
 288  
             }
 289  
         }
 290  
 
 291  0
         if ( goal == null || goal.length() <= 0 || "issue-tracking".equals( goal ) )
 292  
         {
 293  0
             append( sb, "project-info-reports:issue-tracking", 0 );
 294  0
             append( sb, "Generates the Project Issue Tracking report.", 1 );
 295  0
             append( sb, "", 0 );
 296  0
             if ( detail )
 297  
             {
 298  0
                 append( sb, "Available parameters:", 1 );
 299  0
                 append( sb, "", 0 );
 300  
 
 301  0
                 append( sb, "customBundle", 2 );
 302  0
                 append( sb, "Path for a custom bundle instead of using the default one.\nUsing this field, you could change the texts in the generated reports.", 3 );
 303  0
                 append( sb, "Expression: ${project.basedir}/src/site/custom/project-info-report.properties", 3 );
 304  0
                 append( sb, "", 0 );
 305  
 
 306  0
                 append( sb, "outputDirectory", 2 );
 307  0
                 append( sb, "The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.", 3 );
 308  0
                 append( sb, "Required: Yes", 3 );
 309  0
                 append( sb, "Expression: ${project.reporting.outputDirectory}", 3 );
 310  0
                 append( sb, "", 0 );
 311  
 
 312  0
                 append( sb, "remoteRepositories", 2 );
 313  0
                 append( sb, "Remote repositories used for the project.", 3 );
 314  0
                 append( sb, "Expression: ${project.remoteArtifactRepositories}", 3 );
 315  0
                 append( sb, "", 0 );
 316  
             }
 317  
         }
 318  
 
 319  0
         if ( goal == null || goal.length() <= 0 || "license".equals( goal ) )
 320  
         {
 321  0
             append( sb, "project-info-reports:license", 0 );
 322  0
             append( sb, "Generates the Project License report.", 1 );
 323  0
             append( sb, "", 0 );
 324  0
             if ( detail )
 325  
             {
 326  0
                 append( sb, "Available parameters:", 1 );
 327  0
                 append( sb, "", 0 );
 328  
 
 329  0
                 append( sb, "customBundle", 2 );
 330  0
                 append( sb, "Path for a custom bundle instead of using the default one.\nUsing this field, you could change the texts in the generated reports.", 3 );
 331  0
                 append( sb, "Expression: ${project.basedir}/src/site/custom/project-info-report.properties", 3 );
 332  0
                 append( sb, "", 0 );
 333  
 
 334  0
                 append( sb, "linkOnly (Default: false)", 2 );
 335  0
                 append( sb, "Whether the only render links to the license documents instead of inlining them.\nIf the system is in offline mode, the linkOnly parameter will be always true.", 3 );
 336  0
                 append( sb, "", 0 );
 337  
 
 338  0
                 append( sb, "offline", 2 );
 339  0
                 append( sb, "Whether the system is currently offline.", 3 );
 340  0
                 append( sb, "Expression: ${settings.offline}", 3 );
 341  0
                 append( sb, "", 0 );
 342  
 
 343  0
                 append( sb, "outputDirectory", 2 );
 344  0
                 append( sb, "The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.", 3 );
 345  0
                 append( sb, "Required: Yes", 3 );
 346  0
                 append( sb, "Expression: ${project.reporting.outputDirectory}", 3 );
 347  0
                 append( sb, "", 0 );
 348  
 
 349  0
                 append( sb, "remoteRepositories", 2 );
 350  0
                 append( sb, "Remote repositories used for the project.", 3 );
 351  0
                 append( sb, "Expression: ${project.remoteArtifactRepositories}", 3 );
 352  0
                 append( sb, "", 0 );
 353  
             }
 354  
         }
 355  
 
 356  0
         if ( goal == null || goal.length() <= 0 || "mailing-list".equals( goal ) )
 357  
         {
 358  0
             append( sb, "project-info-reports:mailing-list", 0 );
 359  0
             append( sb, "Generates the Mailing List report.", 1 );
 360  0
             append( sb, "", 0 );
 361  0
             if ( detail )
 362  
             {
 363  0
                 append( sb, "Available parameters:", 1 );
 364  0
                 append( sb, "", 0 );
 365  
 
 366  0
                 append( sb, "customBundle", 2 );
 367  0
                 append( sb, "Path for a custom bundle instead of using the default one.\nUsing this field, you could change the texts in the generated reports.", 3 );
 368  0
                 append( sb, "Expression: ${project.basedir}/src/site/custom/project-info-report.properties", 3 );
 369  0
                 append( sb, "", 0 );
 370  
 
 371  0
                 append( sb, "introduction", 2 );
 372  0
                 append( sb, "Deprecated. since 2.3, you should use a custom bundle.", 3 );
 373  0
                 append( sb, "", 0 );
 374  0
                 append( sb, "This can override the header text of the mailing list(s) report", 3 );
 375  0
                 append( sb, "", 0 );
 376  
 
 377  0
                 append( sb, "outputDirectory", 2 );
 378  0
                 append( sb, "The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.", 3 );
 379  0
                 append( sb, "Required: Yes", 3 );
 380  0
                 append( sb, "Expression: ${project.reporting.outputDirectory}", 3 );
 381  0
                 append( sb, "", 0 );
 382  
 
 383  0
                 append( sb, "remoteRepositories", 2 );
 384  0
                 append( sb, "Remote repositories used for the project.", 3 );
 385  0
                 append( sb, "Expression: ${project.remoteArtifactRepositories}", 3 );
 386  0
                 append( sb, "", 0 );
 387  
             }
 388  
         }
 389  
 
 390  0
         if ( goal == null || goal.length() <= 0 || "modules".equals( goal ) )
 391  
         {
 392  0
             append( sb, "project-info-reports:modules", 0 );
 393  0
             append( sb, "Generates the Project Modules report.", 1 );
 394  0
             append( sb, "", 0 );
 395  0
             if ( detail )
 396  
             {
 397  0
                 append( sb, "Available parameters:", 1 );
 398  0
                 append( sb, "", 0 );
 399  
 
 400  0
                 append( sb, "customBundle", 2 );
 401  0
                 append( sb, "Path for a custom bundle instead of using the default one.\nUsing this field, you could change the texts in the generated reports.", 3 );
 402  0
                 append( sb, "Expression: ${project.basedir}/src/site/custom/project-info-report.properties", 3 );
 403  0
                 append( sb, "", 0 );
 404  
 
 405  0
                 append( sb, "outputDirectory", 2 );
 406  0
                 append( sb, "The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.", 3 );
 407  0
                 append( sb, "Required: Yes", 3 );
 408  0
                 append( sb, "Expression: ${project.reporting.outputDirectory}", 3 );
 409  0
                 append( sb, "", 0 );
 410  
 
 411  0
                 append( sb, "remoteRepositories", 2 );
 412  0
                 append( sb, "Remote repositories used for the project.", 3 );
 413  0
                 append( sb, "Expression: ${project.remoteArtifactRepositories}", 3 );
 414  0
                 append( sb, "", 0 );
 415  
             }
 416  
         }
 417  
 
 418  0
         if ( goal == null || goal.length() <= 0 || "plugin-management".equals( goal ) )
 419  
         {
 420  0
             append( sb, "project-info-reports:plugin-management", 0 );
 421  0
             append( sb, "Generates the Project Plugin Management report.", 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, "customBundle", 2 );
 429  0
                 append( sb, "Path for a custom bundle instead of using the default one.\nUsing this field, you could change the texts in the generated reports.", 3 );
 430  0
                 append( sb, "Expression: ${project.basedir}/src/site/custom/project-info-report.properties", 3 );
 431  0
                 append( sb, "", 0 );
 432  
 
 433  0
                 append( sb, "outputDirectory", 2 );
 434  0
                 append( sb, "The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.", 3 );
 435  0
                 append( sb, "Required: Yes", 3 );
 436  0
                 append( sb, "Expression: ${project.reporting.outputDirectory}", 3 );
 437  0
                 append( sb, "", 0 );
 438  
 
 439  0
                 append( sb, "remoteRepositories", 2 );
 440  0
                 append( sb, "Remote repositories used for the project.", 3 );
 441  0
                 append( sb, "Expression: ${project.remoteArtifactRepositories}", 3 );
 442  0
                 append( sb, "", 0 );
 443  
             }
 444  
         }
 445  
 
 446  0
         if ( goal == null || goal.length() <= 0 || "plugins".equals( goal ) )
 447  
         {
 448  0
             append( sb, "project-info-reports:plugins", 0 );
 449  0
             append( sb, "Generates the Project Plugins report.", 1 );
 450  0
             append( sb, "", 0 );
 451  0
             if ( detail )
 452  
             {
 453  0
                 append( sb, "Available parameters:", 1 );
 454  0
                 append( sb, "", 0 );
 455  
 
 456  0
                 append( sb, "customBundle", 2 );
 457  0
                 append( sb, "Path for a custom bundle instead of using the default one.\nUsing this field, you could change the texts in the generated reports.", 3 );
 458  0
                 append( sb, "Expression: ${project.basedir}/src/site/custom/project-info-report.properties", 3 );
 459  0
                 append( sb, "", 0 );
 460  
 
 461  0
                 append( sb, "outputDirectory", 2 );
 462  0
                 append( sb, "The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.", 3 );
 463  0
                 append( sb, "Required: Yes", 3 );
 464  0
                 append( sb, "Expression: ${project.reporting.outputDirectory}", 3 );
 465  0
                 append( sb, "", 0 );
 466  
 
 467  0
                 append( sb, "remoteRepositories", 2 );
 468  0
                 append( sb, "Remote repositories used for the project.", 3 );
 469  0
                 append( sb, "Expression: ${project.remoteArtifactRepositories}", 3 );
 470  0
                 append( sb, "", 0 );
 471  
             }
 472  
         }
 473  
 
 474  0
         if ( goal == null || goal.length() <= 0 || "project-team".equals( goal ) )
 475  
         {
 476  0
             append( sb, "project-info-reports:project-team", 0 );
 477  0
             append( sb, "Generates the Project Team report.", 1 );
 478  0
             append( sb, "", 0 );
 479  0
             if ( detail )
 480  
             {
 481  0
                 append( sb, "Available parameters:", 1 );
 482  0
                 append( sb, "", 0 );
 483  
 
 484  0
                 append( sb, "customBundle", 2 );
 485  0
                 append( sb, "Path for a custom bundle instead of using the default one.\nUsing this field, you could change the texts in the generated reports.", 3 );
 486  0
                 append( sb, "Expression: ${project.basedir}/src/site/custom/project-info-report.properties", 3 );
 487  0
                 append( sb, "", 0 );
 488  
 
 489  0
                 append( sb, "outputDirectory", 2 );
 490  0
                 append( sb, "The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.", 3 );
 491  0
                 append( sb, "Required: Yes", 3 );
 492  0
                 append( sb, "Expression: ${project.reporting.outputDirectory}", 3 );
 493  0
                 append( sb, "", 0 );
 494  
 
 495  0
                 append( sb, "remoteRepositories", 2 );
 496  0
                 append( sb, "Remote repositories used for the project.", 3 );
 497  0
                 append( sb, "Expression: ${project.remoteArtifactRepositories}", 3 );
 498  0
                 append( sb, "", 0 );
 499  
             }
 500  
         }
 501  
 
 502  0
         if ( goal == null || goal.length() <= 0 || "scm".equals( goal ) )
 503  
         {
 504  0
             append( sb, "project-info-reports:scm", 0 );
 505  0
             append( sb, "Generates the Project Source Code Management (SCM) report.", 1 );
 506  0
             append( sb, "", 0 );
 507  0
             if ( detail )
 508  
             {
 509  0
                 append( sb, "Available parameters:", 1 );
 510  0
                 append( sb, "", 0 );
 511  
 
 512  0
                 append( sb, "anonymousConnection (Default: ${project.scm.connection})", 2 );
 513  0
                 append( sb, "The SCM anonymous connection url respecting the SCM URL Format.", 3 );
 514  0
                 append( sb, "", 0 );
 515  
 
 516  0
                 append( sb, "checkoutDirectoryName (Default: ${project.artifactId})", 2 );
 517  0
                 append( sb, "The directory name to checkout right after the SCM URL.", 3 );
 518  0
                 append( sb, "Required: Yes", 3 );
 519  0
                 append( sb, "", 0 );
 520  
 
 521  0
                 append( sb, "customBundle", 2 );
 522  0
                 append( sb, "Path for a custom bundle instead of using the default one.\nUsing this field, you could change the texts in the generated reports.", 3 );
 523  0
                 append( sb, "Expression: ${project.basedir}/src/site/custom/project-info-report.properties", 3 );
 524  0
                 append( sb, "", 0 );
 525  
 
 526  0
                 append( sb, "developerConnection (Default: ${project.scm.developerConnection})", 2 );
 527  0
                 append( sb, "The SCM developer connection url respecting the SCM URL Format.", 3 );
 528  0
                 append( sb, "", 0 );
 529  
 
 530  0
                 append( sb, "outputDirectory", 2 );
 531  0
                 append( sb, "The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.", 3 );
 532  0
                 append( sb, "Required: Yes", 3 );
 533  0
                 append( sb, "Expression: ${project.reporting.outputDirectory}", 3 );
 534  0
                 append( sb, "", 0 );
 535  
 
 536  0
                 append( sb, "remoteRepositories", 2 );
 537  0
                 append( sb, "Remote repositories used for the project.", 3 );
 538  0
                 append( sb, "Expression: ${project.remoteArtifactRepositories}", 3 );
 539  0
                 append( sb, "", 0 );
 540  
 
 541  0
                 append( sb, "webAccessUrl (Default: ${project.scm.url})", 2 );
 542  0
                 append( sb, "The SCM web access url.", 3 );
 543  0
                 append( sb, "", 0 );
 544  
             }
 545  
         }
 546  
 
 547  0
         if ( goal == null || goal.length() <= 0 || "summary".equals( goal ) )
 548  
         {
 549  0
             append( sb, "project-info-reports:summary", 0 );
 550  0
             append( sb, "Generates the project information reports summary.", 1 );
 551  0
             append( sb, "", 0 );
 552  0
             if ( detail )
 553  
             {
 554  0
                 append( sb, "Available parameters:", 1 );
 555  0
                 append( sb, "", 0 );
 556  
 
 557  0
                 append( sb, "customBundle", 2 );
 558  0
                 append( sb, "Path for a custom bundle instead of using the default one.\nUsing this field, you could change the texts in the generated reports.", 3 );
 559  0
                 append( sb, "Expression: ${project.basedir}/src/site/custom/project-info-report.properties", 3 );
 560  0
                 append( sb, "", 0 );
 561  
 
 562  0
                 append( sb, "outputDirectory", 2 );
 563  0
                 append( sb, "The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from the command line. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.", 3 );
 564  0
                 append( sb, "Required: Yes", 3 );
 565  0
                 append( sb, "Expression: ${project.reporting.outputDirectory}", 3 );
 566  0
                 append( sb, "", 0 );
 567  
 
 568  0
                 append( sb, "remoteRepositories", 2 );
 569  0
                 append( sb, "Remote repositories used for the project.", 3 );
 570  0
                 append( sb, "Expression: ${project.remoteArtifactRepositories}", 3 );
 571  0
                 append( sb, "", 0 );
 572  
             }
 573  
         }
 574  
 
 575  0
         if ( getLog().isInfoEnabled() )
 576  
         {
 577  0
             getLog().info( sb.toString() );
 578  
         }
 579  0
     }
 580  
 
 581  
     /**
 582  
      * <p>Repeat a String <code>n</code> times to form a new string.</p>
 583  
      *
 584  
      * @param str String to repeat
 585  
      * @param repeat number of times to repeat str
 586  
      * @return String with repeated String
 587  
      * @throws NegativeArraySizeException if <code>repeat < 0</code>
 588  
      * @throws NullPointerException if str is <code>null</code>
 589  
      */
 590  
     private static String repeat( String str, int repeat )
 591  
     {
 592  0
         StringBuffer buffer = new StringBuffer( repeat * str.length() );
 593  
 
 594  0
         for ( int i = 0; i < repeat; i++ )
 595  
         {
 596  0
             buffer.append( str );
 597  
         }
 598  
 
 599  0
         return buffer.toString();
 600  
     }
 601  
 
 602  
     /** 
 603  
      * Append a description to the buffer by respecting the indentSize and lineLength parameters.
 604  
      * <b>Note</b>: The last character is always a new line.
 605  
      * 
 606  
      * @param sb The buffer to append the description, not <code>null</code>.
 607  
      * @param description The description, not <code>null</code>.
 608  
      * @param indent The base indentation level of each line, must not be negative.
 609  
      */
 610  
     private void append( StringBuffer sb, String description, int indent )
 611  
     {
 612  0
         for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); )
 613  
         {
 614  0
             sb.append( it.next().toString() ).append( '\n' );
 615  
         }
 616  0
     }
 617  
 
 618  
     /** 
 619  
      * Splits the specified text into lines of convenient display length.
 620  
      * 
 621  
      * @param text The text to split into lines, must not be <code>null</code>.
 622  
      * @param indent The base indentation level of each line, must not be negative.
 623  
      * @param indentSize The size of each indentation, must not be negative.
 624  
      * @param lineLength The length of the line, must not be negative.
 625  
      * @return The sequence of display lines, never <code>null</code>.
 626  
      * @throws NegativeArraySizeException if <code>indent < 0</code>
 627  
      */
 628  
     private static List toLines( String text, int indent, int indentSize, int lineLength )
 629  
     {
 630  0
         List lines = new ArrayList();
 631  
 
 632  0
         String ind = repeat( "\t", indent );
 633  0
         String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" );
 634  0
         for ( int i = 0; i < plainLines.length; i++ )
 635  
         {
 636  0
             toLines( lines, ind + plainLines[i], indentSize, lineLength );
 637  
         }
 638  
 
 639  0
         return lines;
 640  
     }
 641  
 
 642  
     /** 
 643  
      * Adds the specified line to the output sequence, performing line wrapping if necessary.
 644  
      * 
 645  
      * @param lines The sequence of display lines, must not be <code>null</code>.
 646  
      * @param line The line to add, must not be <code>null</code>.
 647  
      * @param indentSize The size of each indentation, must not be negative.
 648  
      * @param lineLength The length of the line, must not be negative.
 649  
      */
 650  
     private static void toLines( List lines, String line, int indentSize, int lineLength )
 651  
     {
 652  0
         int lineIndent = getIndentLevel( line );
 653  0
         StringBuffer buf = new StringBuffer( 256 );
 654  0
         String[] tokens = line.split( " +" );
 655  0
         for ( int i = 0; i < tokens.length; i++ )
 656  
         {
 657  0
             String token = tokens[i];
 658  0
             if ( i > 0 )
 659  
             {
 660  0
                 if ( buf.length() + token.length() >= lineLength )
 661  
                 {
 662  0
                     lines.add( buf.toString() );
 663  0
                     buf.setLength( 0 );
 664  0
                     buf.append( repeat( " ", lineIndent * indentSize ) );
 665  
                 }
 666  
                 else
 667  
                 {
 668  0
                     buf.append( ' ' );
 669  
                 }
 670  
             }
 671  0
             for ( int j = 0; j < token.length(); j++ )
 672  
             {
 673  0
                 char c = token.charAt( j );
 674  0
                 if ( c == '\t' )
 675  
                 {
 676  0
                     buf.append( repeat( " ", indentSize - buf.length() % indentSize ) );
 677  
                 }
 678  0
                 else if ( c == '\u00A0' )
 679  
                 {
 680  0
                     buf.append( ' ' );
 681  
                 }
 682  
                 else
 683  
                 {
 684  0
                     buf.append( c );
 685  
                 }
 686  
             }
 687  
         }
 688  0
         lines.add( buf.toString() );
 689  0
     }
 690  
 
 691  
     /** 
 692  
      * Gets the indentation level of the specified line.
 693  
      * 
 694  
      * @param line The line whose indentation level should be retrieved, must not be <code>null</code>.
 695  
      * @return The indentation level of the line.
 696  
      */
 697  
     private static int getIndentLevel( String line )
 698  
     {
 699  0
         int level = 0;
 700  0
         for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ )
 701  
         {
 702  0
             level++;
 703  
         }
 704  0
         for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ )
 705  
         {
 706  0
             if ( line.charAt( i ) == '\t' )
 707  
             {
 708  0
                 level++;
 709  0
                 break;
 710  
             }
 711  
         }
 712  0
         return level;
 713  
     }
 714  
 }