Coverage Report - org.apache.maven.plugin.changes.HelpMojo
 
Classes in this File Line Coverage Branch Coverage Complexity
HelpMojo
0%
0/485
0%
0/102
9.5
 
 1  
 package org.apache.maven.plugin.changes;
 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-changes-plugin.<br/> Call <pre>  mvn changes:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</pre> to display parameter details.
 12  
  *
 13  
  * @version generated on Thu May 10 17:27:31 EDT 2012
 14  
  * @author org.apache.maven.tools.plugin.generator.PluginHelpGenerator (version 2.8)
 15  
  * @goal help
 16  
  * @requiresProject false
 17  
  * @threadSafe
 18  
  */
 19  
 @SuppressWarnings( "all" )
 20  0
 public class HelpMojo
 21  
     extends AbstractMojo
 22  
 {
 23  
     /**
 24  
      * If <code>true</code>, display all settable properties for each goal.
 25  
      * 
 26  
      * @parameter expression="${detail}" default-value="false"
 27  
      */
 28  
     private boolean detail;
 29  
 
 30  
     /**
 31  
      * The name of the goal for which to show help. If unspecified, all goals will be displayed.
 32  
      * 
 33  
      * @parameter expression="${goal}"
 34  
      */
 35  
     private java.lang.String goal;
 36  
 
 37  
     /**
 38  
      * The maximum length of a display line, should be positive.
 39  
      * 
 40  
      * @parameter expression="${lineLength}" default-value="80"
 41  
      */
 42  
     private int lineLength;
 43  
 
 44  
     /**
 45  
      * The number of spaces per indentation level, should be positive.
 46  
      * 
 47  
      * @parameter expression="${indentSize}" default-value="2"
 48  
      */
 49  
     private int indentSize;
 50  
 
 51  
 
 52  
     /** {@inheritDoc} */
 53  
     public void execute()
 54  
         throws MojoExecutionException
 55  
     {
 56  0
         if ( lineLength <= 0 )
 57  
         {
 58  0
             getLog().warn( "The parameter 'lineLength' should be positive, using '80' as default." );
 59  0
             lineLength = 80;
 60  
         }
 61  0
         if ( indentSize <= 0 )
 62  
         {
 63  0
             getLog().warn( "The parameter 'indentSize' should be positive, using '2' as default." );
 64  0
             indentSize = 2;
 65  
         }
 66  
 
 67  0
         StringBuffer sb = new StringBuffer();
 68  
 
 69  0
         append( sb, "org.apache.maven.plugins:maven-changes-plugin:2.7.1", 0 );
 70  0
         append( sb, "", 0 );
 71  
 
 72  0
         append( sb, "Maven Changes Report Plugin", 0 );
 73  0
         append( sb, "Creates a release history for inclusion into the site and assists in generating an announcement mail.", 1 );
 74  0
         append( sb, "", 0 );
 75  
 
 76  0
         if ( goal == null || goal.length() <= 0 )
 77  
         {
 78  0
             append( sb, "This plugin has 8 goals:", 0 );
 79  0
             append( sb, "", 0 );
 80  
         }
 81  
 
 82  0
         if ( goal == null || goal.length() <= 0 || "announcement-generate".equals( goal ) )
 83  
         {
 84  0
             append( sb, "changes:announcement-generate", 0 );
 85  0
             append( sb, "Goal which generate the template for an announcement.", 1 );
 86  0
             append( sb, "", 0 );
 87  0
             if ( detail )
 88  
             {
 89  0
                 append( sb, "Available parameters:", 1 );
 90  0
                 append( sb, "", 0 );
 91  
 
 92  0
                 append( sb, "announcementFile", 2 );
 93  0
                 append( sb, "The name of the file which will contain the generated announcement. If no value is specified the plugin will use the name of the template.", 3 );
 94  0
                 append( sb, "Expression: ${changes.announcementFile}", 3 );
 95  0
                 append( sb, "", 0 );
 96  
 
 97  0
                 append( sb, "announceParameters", 2 );
 98  0
                 append( sb, "Map of custom parameters for the announcement. This Map will be passed to the template.", 3 );
 99  0
                 append( sb, "", 0 );
 100  
 
 101  0
                 append( sb, "basedir", 2 );
 102  0
                 append( sb, "The current project base directory.", 3 );
 103  0
                 append( sb, "Required: Yes", 3 );
 104  0
                 append( sb, "Expression: ${basedir}", 3 );
 105  0
                 append( sb, "", 0 );
 106  
 
 107  0
                 append( sb, "developmentTeam (Default: ${project.name} team)", 2 );
 108  0
                 append( sb, "Name of the team that develops the artifact. This parameter will be passed to the template.", 3 );
 109  0
                 append( sb, "Required: Yes", 3 );
 110  0
                 append( sb, "Expression: ${changes.developmentTeam}", 3 );
 111  0
                 append( sb, "", 0 );
 112  
 
 113  0
                 append( sb, "filter", 2 );
 114  0
                 append( sb, "Defines the filter parameters to restrict which issues are retrieved from JIRA. The filter parameter uses the same format of url parameters that is used in a JIRA search.", 3 );
 115  0
                 append( sb, "", 0 );
 116  
 
 117  0
                 append( sb, "finalName (Default: ${project.build.finalName})", 2 );
 118  0
                 append( sb, "The name of the artifact to be used in the announcement.", 3 );
 119  0
                 append( sb, "Required: Yes", 3 );
 120  0
                 append( sb, "Expression: ${changes.finalName}", 3 );
 121  0
                 append( sb, "", 0 );
 122  
 
 123  0
                 append( sb, "generateJiraAnnouncement (Default: false)", 2 );
 124  0
                 append( sb, "Deprecated. Since version 2.4 this parameter has been deprecated. Please use the issueManagementSystems parameter instead.", 3 );
 125  0
                 append( sb, "", 0 );
 126  0
                 append( sb, "Flag to determine if the plugin will generate a JIRA announcement.", 3 );
 127  0
                 append( sb, "Required: Yes", 3 );
 128  0
                 append( sb, "Expression: ${generateJiraAnnouncement}", 3 );
 129  0
                 append( sb, "", 0 );
 130  
 
 131  0
                 append( sb, "introduction (Default: ${project.description})", 2 );
 132  0
                 append( sb, "Short description or introduction of the released artifact. This parameter will be passed to the template.", 3 );
 133  0
                 append( sb, "", 0 );
 134  
 
 135  0
                 append( sb, "issueManagementSystems", 2 );
 136  0
                 append( sb, "A list of issue management systems to fetch releases from. This parameter replaces the parameters generateJiraAnnouncement and jiraMerge.\nValid values are: changes.xml and JIRA.\nNote: Only one issue management system that is configured in <project>/<issueManagement> can be used. This currently means that you can combine a changes.xml file with one other issue management system.", 3 );
 137  0
                 append( sb, "", 0 );
 138  
 
 139  0
                 append( sb, "issueTypes", 2 );
 140  0
                 append( sb, "Maps issues types to action types for grouping issues in announcements. If issue types are not defined for a action type then the default issue type will be applied.\nValid action types: add, fix and update.\n", 3 );
 141  0
                 append( sb, "", 0 );
 142  
 
 143  0
                 append( sb, "jiraMerge (Default: false)", 2 );
 144  0
                 append( sb, "Deprecated. Since version 2.4 this parameter has been deprecated. Please use the issueManagementSystems parameter instead.", 3 );
 145  0
                 append( sb, "", 0 );
 146  0
                 append( sb, "If releases from JIRA should be merged with the releases from a changes.xml file.", 3 );
 147  0
                 append( sb, "Expression: ${changes.jiraMerge}", 3 );
 148  0
                 append( sb, "", 0 );
 149  
 
 150  0
                 append( sb, "jiraPassword", 2 );
 151  0
                 append( sb, "Defines the JIRA password for authentication into a private JIRA installation.", 3 );
 152  0
                 append( sb, "Expression: ${changes.jiraPassword}", 3 );
 153  0
                 append( sb, "", 0 );
 154  
 
 155  0
                 append( sb, "jiraUser", 2 );
 156  0
                 append( sb, "Defines the JIRA username for authentication into a private JIRA installation.", 3 );
 157  0
                 append( sb, "Expression: ${changes.jiraUser}", 3 );
 158  0
                 append( sb, "", 0 );
 159  
 
 160  0
                 append( sb, "maxEntries (Default: 25)", 2 );
 161  0
                 append( sb, "The maximum number of issues to fetch from JIRA.\nNote: In versions 2.0-beta-3 and earlier this parameter was called \'nbEntries\'.\n", 3 );
 162  0
                 append( sb, "Required: Yes", 3 );
 163  0
                 append( sb, "Expression: ${changes.maxEntries}", 3 );
 164  0
                 append( sb, "", 0 );
 165  
 
 166  0
                 append( sb, "outputDirectory", 2 );
 167  0
                 append( sb, "Directory where the template file will be generated.", 3 );
 168  0
                 append( sb, "Required: Yes", 3 );
 169  0
                 append( sb, "Expression: ${project.build.directory}/announcement", 3 );
 170  0
                 append( sb, "", 0 );
 171  
 
 172  0
                 append( sb, "resolutionIds (Default: Fixed)", 2 );
 173  0
                 append( sb, "Include issues from JIRA with these resolution ids. Multiple resolution ids can be specified as a comma separated list of ids.\nNote: In versions 2.0-beta-3 and earlier this parameter was called \'resolutionId\'.\n", 3 );
 174  0
                 append( sb, "Expression: ${changes.resolutionIds}", 3 );
 175  0
                 append( sb, "", 0 );
 176  
 
 177  0
                 append( sb, "runOnlyAtExecutionRoot (Default: false)", 2 );
 178  0
                 append( sb, "This will cause the execution to be run only at the top of a given module tree. That is, run in the project contained in the same folder where the mvn execution was launched.", 3 );
 179  0
                 append( sb, "Expression: ${announcement.runOnlyAtExecutionRoot}", 3 );
 180  0
                 append( sb, "", 0 );
 181  
 
 182  0
                 append( sb, "statusIds (Default: Closed)", 2 );
 183  0
                 append( sb, "Include issues from JIRA with these status ids. Multiple status ids can be specified as a comma separated list of ids.\nNote: In versions 2.0-beta-3 and earlier this parameter was called \'statusId\'.\n", 3 );
 184  0
                 append( sb, "Expression: ${changes.statusIds}", 3 );
 185  0
                 append( sb, "", 0 );
 186  
 
 187  0
                 append( sb, "template (Default: announcement.vm)", 2 );
 188  0
                 append( sb, "The Velocity template used to format the announcement.", 3 );
 189  0
                 append( sb, "Required: Yes", 3 );
 190  0
                 append( sb, "Expression: ${changes.template}", 3 );
 191  0
                 append( sb, "", 0 );
 192  
 
 193  0
                 append( sb, "templateDirectory (Default: org/apache/maven/plugin/announcement)", 2 );
 194  0
                 append( sb, "Directory that contains the template.\nNote: This directory must be a subdirectory of /src/main/resources/ or current project base directory.\n", 3 );
 195  0
                 append( sb, "Required: Yes", 3 );
 196  0
                 append( sb, "Expression: ${changes.templateDirectory}", 3 );
 197  0
                 append( sb, "", 0 );
 198  
 
 199  0
                 append( sb, "templateEncoding (Default: ${project.build.sourceEncoding})", 2 );
 200  0
                 append( sb, "The template encoding.", 3 );
 201  0
                 append( sb, "Expression: ${changes.templateEncoding}", 3 );
 202  0
                 append( sb, "", 0 );
 203  
 
 204  0
                 append( sb, "tracPassword", 2 );
 205  0
                 append( sb, "Defines the Trac password for authentication into a private Trac installation.", 3 );
 206  0
                 append( sb, "Expression: ${changes.tracPassword}", 3 );
 207  0
                 append( sb, "", 0 );
 208  
 
 209  0
                 append( sb, "tracQuery (Default: order=id)", 2 );
 210  0
                 append( sb, "Defines the Trac query for searching for tickets.", 3 );
 211  0
                 append( sb, "", 0 );
 212  
 
 213  0
                 append( sb, "tracUser", 2 );
 214  0
                 append( sb, "Defines the Trac username for authentication into a private Trac installation.", 3 );
 215  0
                 append( sb, "Expression: ${changes.tracUser}", 3 );
 216  0
                 append( sb, "", 0 );
 217  
 
 218  0
                 append( sb, "url", 2 );
 219  0
                 append( sb, "Distribution URL of the artifact. This parameter will be passed to the template.", 3 );
 220  0
                 append( sb, "Expression: ${project.url}", 3 );
 221  0
                 append( sb, "", 0 );
 222  
 
 223  0
                 append( sb, "urlDownload", 2 );
 224  0
                 append( sb, "URL where the artifact can be downloaded. If not specified, no URL is used. This parameter will be passed to the template.", 3 );
 225  0
                 append( sb, "", 0 );
 226  
 
 227  0
                 append( sb, "version (Default: ${project.version})", 2 );
 228  0
                 append( sb, "Version of the artifact.", 3 );
 229  0
                 append( sb, "Required: Yes", 3 );
 230  0
                 append( sb, "Expression: ${changes.version}", 3 );
 231  0
                 append( sb, "", 0 );
 232  
 
 233  0
                 append( sb, "versionPrefix", 2 );
 234  0
                 append( sb, "The prefix used when naming versions in JIRA.\nIf you have a project in JIRA with several components that have different release cycles, it is an often used pattern to prefix the version with the name of the component, e.g. maven-filtering-1.0 etc. To fetch issues from JIRA for a release of the \'maven-filtering\' component you would need to set this parameter to \'maven-filtering-\'.\n", 3 );
 235  0
                 append( sb, "Expression: ${changes.versionPrefix}", 3 );
 236  0
                 append( sb, "", 0 );
 237  
 
 238  0
                 append( sb, "webPassword", 2 );
 239  0
                 append( sb, "Defines the http password for basic authentication into the JIRA webserver.", 3 );
 240  0
                 append( sb, "Expression: ${changes.webPassword}", 3 );
 241  0
                 append( sb, "", 0 );
 242  
 
 243  0
                 append( sb, "webUser", 2 );
 244  0
                 append( sb, "Defines the http user for basic authentication into the JIRA webserver.", 3 );
 245  0
                 append( sb, "Expression: ${changes.webUser}", 3 );
 246  0
                 append( sb, "", 0 );
 247  
 
 248  0
                 append( sb, "xmlPath", 2 );
 249  0
                 append( sb, "The path of the changes.xml file.", 3 );
 250  0
                 append( sb, "Required: Yes", 3 );
 251  0
                 append( sb, "Expression: ${basedir}/src/changes/changes.xml", 3 );
 252  0
                 append( sb, "", 0 );
 253  
             }
 254  
         }
 255  
 
 256  0
         if ( goal == null || goal.length() <= 0 || "announcement-mail".equals( goal ) )
 257  
         {
 258  0
             append( sb, "changes:announcement-mail", 0 );
 259  0
             append( sb, "Goal which sends an announcement through email.", 1 );
 260  0
             append( sb, "", 0 );
 261  0
             if ( detail )
 262  
             {
 263  0
                 append( sb, "Available parameters:", 1 );
 264  0
                 append( sb, "", 0 );
 265  
 
 266  0
                 append( sb, "basedir", 2 );
 267  0
                 append( sb, "The current project base directory.", 3 );
 268  0
                 append( sb, "Required: Yes", 3 );
 269  0
                 append( sb, "Expression: ${basedir}", 3 );
 270  0
                 append( sb, "", 0 );
 271  
 
 272  0
                 append( sb, "bccAddresses", 2 );
 273  0
                 append( sb, "Recipient bcc email address.", 3 );
 274  0
                 append( sb, "", 0 );
 275  
 
 276  0
                 append( sb, "ccAddresses", 2 );
 277  0
                 append( sb, "Recipient cc email address.", 3 );
 278  0
                 append( sb, "", 0 );
 279  
 
 280  0
                 append( sb, "fromDeveloperId", 2 );
 281  0
                 append( sb, "The id of the developer sending the announcement mail. Only used if the mailSender attribute is not set. In this case, this should match the id of one of the developers in the pom. If a matching developer is not found, then the first developer in the pom will be used.", 3 );
 282  0
                 append( sb, "Expression: ${changes.fromDeveloperId}", 3 );
 283  0
                 append( sb, "", 0 );
 284  
 
 285  0
                 append( sb, "mailContentType (Default: text/plain)", 2 );
 286  0
                 append( sb, "Mail content type to use.", 3 );
 287  0
                 append( sb, "Required: Yes", 3 );
 288  0
                 append( sb, "", 0 );
 289  
 
 290  0
                 append( sb, "mailSender", 2 );
 291  0
                 append( sb, "Defines the sender of the announcement email. This takes precedence over the list of developers specified in the POM. if the sender is not a member of the development team. Note that since this is a bean type, you cannot specify it from command level with\n-D\n. Use\n-Dchanges.sender=\'Your\u00a0Name\u00a0<you@domain>\'\ninstead.", 3 );
 292  0
                 append( sb, "Expression: ${changes.mailSender}", 3 );
 293  0
                 append( sb, "", 0 );
 294  
 
 295  0
                 append( sb, "password", 2 );
 296  0
                 append( sb, "The password used to send the email.", 3 );
 297  0
                 append( sb, "Expression: ${changes.password}", 3 );
 298  0
                 append( sb, "", 0 );
 299  
 
 300  0
                 append( sb, "runOnlyAtExecutionRoot (Default: false)", 2 );
 301  0
                 append( sb, "This will cause the execution to be run only at the top of a given module tree. That is, run in the project contained in the same folder where the mvn execution was launched.", 3 );
 302  0
                 append( sb, "Expression: ${announcement.runOnlyAtExecutionRoot}", 3 );
 303  0
                 append( sb, "", 0 );
 304  
 
 305  0
                 append( sb, "senderString", 2 );
 306  0
                 append( sb, "Defines the sender of the announcement. This takes precedence over both ${changes.mailSender} and the list of developers in the POM. This parameter parses an email address in standard RFC822 format, e.g.\n-Dchanges.sender=\'Your\u00a0Name\u00a0<you@domain>\'\n.", 3 );
 307  0
                 append( sb, "Expression: ${changes.sender}", 3 );
 308  0
                 append( sb, "", 0 );
 309  
 
 310  0
                 append( sb, "smtpHost", 2 );
 311  0
                 append( sb, "Smtp Server.", 3 );
 312  0
                 append( sb, "Required: Yes", 3 );
 313  0
                 append( sb, "Expression: ${changes.smtpHost}", 3 );
 314  0
                 append( sb, "", 0 );
 315  
 
 316  0
                 append( sb, "smtpPort (Default: 25)", 2 );
 317  0
                 append( sb, "Port.", 3 );
 318  0
                 append( sb, "Required: Yes", 3 );
 319  0
                 append( sb, "Expression: ${changes.smtpPort}", 3 );
 320  0
                 append( sb, "", 0 );
 321  
 
 322  0
                 append( sb, "sslMode (Default: false)", 2 );
 323  0
                 append( sb, "If the email should be sent in SSL mode.", 3 );
 324  0
                 append( sb, "Expression: ${changes.sslMode}", 3 );
 325  0
                 append( sb, "", 0 );
 326  
 
 327  0
                 append( sb, "subject (Default: [ANNOUNCEMENT] - ${project.name} ${project.version} released)", 2 );
 328  0
                 append( sb, "Subject for the email.", 3 );
 329  0
                 append( sb, "Required: Yes", 3 );
 330  0
                 append( sb, "Expression: ${changes.subject}", 3 );
 331  0
                 append( sb, "", 0 );
 332  
 
 333  0
                 append( sb, "template (Default: announcement.vm)", 2 );
 334  0
                 append( sb, "The Velocity template used to format the announcement.", 3 );
 335  0
                 append( sb, "Required: Yes", 3 );
 336  0
                 append( sb, "Expression: ${changes.template}", 3 );
 337  0
                 append( sb, "", 0 );
 338  
 
 339  0
                 append( sb, "templateOutputDirectory", 2 );
 340  0
                 append( sb, "Directory which contains the template for announcement email.", 3 );
 341  0
                 append( sb, "Required: Yes", 3 );
 342  0
                 append( sb, "Expression: ${project.build.directory}/announcement", 3 );
 343  0
                 append( sb, "", 0 );
 344  
 
 345  0
                 append( sb, "toAddresses", 2 );
 346  0
                 append( sb, "Recipient email address.", 3 );
 347  0
                 append( sb, "Required: Yes", 3 );
 348  0
                 append( sb, "", 0 );
 349  
 
 350  0
                 append( sb, "username", 2 );
 351  0
                 append( sb, "The username used to send the email.", 3 );
 352  0
                 append( sb, "Expression: ${changes.username}", 3 );
 353  0
                 append( sb, "", 0 );
 354  
             }
 355  
         }
 356  
 
 357  0
         if ( goal == null || goal.length() <= 0 || "changes-check".equals( goal ) )
 358  
         {
 359  0
             append( sb, "changes:changes-check", 0 );
 360  0
             append( sb, "Goal which checks that the changes.xml file has the necessary data to generate an announcement or a report for the current release.", 1 );
 361  0
             append( sb, "", 0 );
 362  0
             if ( detail )
 363  
             {
 364  0
                 append( sb, "Available parameters:", 1 );
 365  0
                 append( sb, "", 0 );
 366  
 
 367  0
                 append( sb, "releaseDateFormat (Default: yyyy-MM-dd)", 2 );
 368  0
                 append( sb, "The format that a correct release date should have. This value will be used as a pattern to try to create a date.", 3 );
 369  0
                 append( sb, "Expression: ${changes.releaseDateFormat}", 3 );
 370  0
                 append( sb, "", 0 );
 371  
 
 372  0
                 append( sb, "skipSnapshots (Default: false)", 2 );
 373  0
                 append( sb, "Flag controlling snapshot processing. If set, versions ending with -SNAPSHOT won\'t be checked.", 3 );
 374  0
                 append( sb, "Expression: ${changes.skipSnapshots}", 3 );
 375  0
                 append( sb, "", 0 );
 376  
 
 377  0
                 append( sb, "version (Default: ${project.version})", 2 );
 378  0
                 append( sb, "Version of the artifact.", 3 );
 379  0
                 append( sb, "Required: Yes", 3 );
 380  0
                 append( sb, "Expression: ${changes.version}", 3 );
 381  0
                 append( sb, "", 0 );
 382  
 
 383  0
                 append( sb, "xmlPath (Default: src/changes/changes.xml)", 2 );
 384  0
                 append( sb, "The path of the changes.xml file that will be checked.", 3 );
 385  0
                 append( sb, "Expression: ${changes.xmlPath}", 3 );
 386  0
                 append( sb, "", 0 );
 387  
             }
 388  
         }
 389  
 
 390  0
         if ( goal == null || goal.length() <= 0 || "changes-report".equals( goal ) )
 391  
         {
 392  0
             append( sb, "changes:changes-report", 0 );
 393  0
             append( sb, "Goal which creates a nicely formatted Changes Report in html format from a changes.xml file.", 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, "addActionDate (Default: false)", 2 );
 401  0
                 append( sb, "A flag whether the report should also include the dates of individual actions. If set to false, only the dates of releases will be written to the report.", 3 );
 402  0
                 append( sb, "Expression: ${changes.addActionDate}", 3 );
 403  0
                 append( sb, "", 0 );
 404  
 
 405  0
                 append( sb, "aggregated (Default: false)", 2 );
 406  0
                 append( sb, "A flag whether the report should also include changes from child modules. If set to false, only the changes from current project will be written to the report.", 3 );
 407  0
                 append( sb, "", 0 );
 408  
 
 409  0
                 append( sb, "escapeHTML (Default: true)", 2 );
 410  0
                 append( sb, "Deprecated. using markup inside CDATA sections does not work for all output formats!", 3 );
 411  0
                 append( sb, "", 0 );
 412  0
                 append( sb, "Whether HTML code within an action should be escaped. By changing this to false you can restore the behavior that was in version 2.2 of this plugin, allowing you to use HTML code to format the content of an action.\nNote: If you use HTML code in an action you need to place it inside a CDATA section.\nNote: Putting any kind of markup inside a CDATA section might mess up the Changes Report or other generated documents, such as PDFs, that are based on your changes.xml file if you are not careful.", 3 );
 413  0
                 append( sb, "", 0 );
 414  
 
 415  0
                 append( sb, "filteringChanges (Default: false)", 2 );
 416  0
                 append( sb, "applying filtering filtering \'a la\' resources plugin", 3 );
 417  0
                 append( sb, "", 0 );
 418  
 
 419  0
                 append( sb, "issueLinkTemplate (Default: %URL%/ViewIssue.jspa?key=%ISSUE%)", 2 );
 420  0
                 append( sb, "Deprecated. As of 2.1 use issueLinkTemplatePerSystem : this one will be with system default", 3 );
 421  0
                 append( sb, "", 0 );
 422  0
                 append( sb, "Template string that is used to discover the URL to use to display an issue report. There are 2 template tokens you can use. %URL%: this is computed by getting the <issueManagement>/<url> value from the POM, and removing the last \'/\' and everything that comes after it. %ISSUE%: this is the issue number.\nNote: In versions of this plugin prior to 2.0-beta-2 this parameter was called link_template.\n", 3 );
 423  0
                 append( sb, "Expression: ${changes.issueLinkTemplate}", 3 );
 424  0
                 append( sb, "", 0 );
 425  
 
 426  0
                 append( sb, "issueLinkTemplatePerSystem", 2 );
 427  0
                 append( sb, "Template strings per system that is used to discover the URL to use to display an issue report. Each key in this map denotes the (case-insensitive) identifier of the issue tracking system and its value gives the URL template.\nThere are 2 template tokens you can use. %URL%: this is computed by getting the <issueManagement>/<url> value from the POM, and removing the last \'/\' and everything that comes after it. %ISSUE%: this is the issue number.\n\nNote: The deprecated issueLinkTemplate will be used for a system called \'default\'.\n\nNote: Starting with version 2.4 you usually don\'t need to specify this, unless you need to link to an issue management system in your Changes report that isn\'t supported out of the box. See the Usage page for more information.\n", 3 );
 428  0
                 append( sb, "", 0 );
 429  
 
 430  0
                 append( sb, "outputDirectory (Default: ${project.reporting.outputDirectory})", 2 );
 431  0
                 append( sb, "Report output directory. Note that this parameter is only relevant if the goal is run from the command line or from the default build lifecycle. 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 );
 432  0
                 append( sb, "", 0 );
 433  
 
 434  0
                 append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 );
 435  0
                 append( sb, "Report output encoding. Note that this parameter is only relevant if the goal is run from the command line or from the default build lifecycle. If the goal is run indirectly as part of a site generation, the output encoding configured in the Maven Site Plugin is used instead.", 3 );
 436  0
                 append( sb, "Expression: ${outputEncoding}", 3 );
 437  0
                 append( sb, "", 0 );
 438  
 
 439  0
                 append( sb, "publishDateFormat (Default: yyyy-MM-dd)", 2 );
 440  0
                 append( sb, "Format to use for publishDate. The value will be available with the following expression ${publishDate}", 3 );
 441  0
                 append( sb, "", 0 );
 442  
 
 443  0
                 append( sb, "publishDateLocale (Default: en)", 2 );
 444  0
                 append( sb, "Locale to use for publishDate when formatting", 3 );
 445  0
                 append( sb, "", 0 );
 446  
 
 447  0
                 append( sb, "teamlist (Default: team-list.html)", 2 );
 448  0
                 append( sb, "The URI of a file containing all the team members. If this is set to the special value \'none\', no links will be generated for the team members.", 3 );
 449  0
                 append( sb, "", 0 );
 450  
 
 451  0
                 append( sb, "xmlPath (Default: src/changes/changes.xml)", 2 );
 452  0
                 append( sb, "The path of the changes.xml file that will be converted into an HTML report.", 3 );
 453  0
                 append( sb, "Expression: ${changes.xmlPath}", 3 );
 454  0
                 append( sb, "", 0 );
 455  
             }
 456  
         }
 457  
 
 458  0
         if ( goal == null || goal.length() <= 0 || "changes-validate".equals( goal ) )
 459  
         {
 460  0
             append( sb, "changes:changes-validate", 0 );
 461  0
             append( sb, "Goal which validate the changes.xml file.", 1 );
 462  0
             append( sb, "", 0 );
 463  0
             if ( detail )
 464  
             {
 465  0
                 append( sb, "Available parameters:", 1 );
 466  0
                 append( sb, "", 0 );
 467  
 
 468  0
                 append( sb, "changesXsdVersion (Default: 1.0.0)", 2 );
 469  0
                 append( sb, "The changes xsd version.", 3 );
 470  0
                 append( sb, "Expression: ${changes.xsdVersion}", 3 );
 471  0
                 append( sb, "", 0 );
 472  
 
 473  0
                 append( sb, "failOnError (Default: false)", 2 );
 474  0
                 append( sb, "Mojo failure if validation failed. If not and validation failed only a warning will be logged.", 3 );
 475  0
                 append( sb, "Expression: ${changes.validate.failed}", 3 );
 476  0
                 append( sb, "", 0 );
 477  
 
 478  0
                 append( sb, "xmlPath (Default: src/changes/changes.xml)", 2 );
 479  0
                 append( sb, "The path of the changes.xml file that will be converted into an HTML report.", 3 );
 480  0
                 append( sb, "Expression: ${changes.xmlPath}", 3 );
 481  0
                 append( sb, "", 0 );
 482  
             }
 483  
         }
 484  
 
 485  0
         if ( goal == null || goal.length() <= 0 || "help".equals( goal ) )
 486  
         {
 487  0
             append( sb, "changes:help", 0 );
 488  0
             append( sb, "Display help information on maven-changes-plugin.\nCall\n\u00a0\u00a0mvn\u00a0changes:help\u00a0-Ddetail=true\u00a0-Dgoal=<goal-name>\nto display parameter details.", 1 );
 489  0
             append( sb, "", 0 );
 490  0
             if ( detail )
 491  
             {
 492  0
                 append( sb, "Available parameters:", 1 );
 493  0
                 append( sb, "", 0 );
 494  
 
 495  0
                 append( sb, "detail (Default: false)", 2 );
 496  0
                 append( sb, "If true, display all settable properties for each goal.", 3 );
 497  0
                 append( sb, "Expression: ${detail}", 3 );
 498  0
                 append( sb, "", 0 );
 499  
 
 500  0
                 append( sb, "goal", 2 );
 501  0
                 append( sb, "The name of the goal for which to show help. If unspecified, all goals will be displayed.", 3 );
 502  0
                 append( sb, "Expression: ${goal}", 3 );
 503  0
                 append( sb, "", 0 );
 504  
 
 505  0
                 append( sb, "indentSize (Default: 2)", 2 );
 506  0
                 append( sb, "The number of spaces per indentation level, should be positive.", 3 );
 507  0
                 append( sb, "Expression: ${indentSize}", 3 );
 508  0
                 append( sb, "", 0 );
 509  
 
 510  0
                 append( sb, "lineLength (Default: 80)", 2 );
 511  0
                 append( sb, "The maximum length of a display line, should be positive.", 3 );
 512  0
                 append( sb, "Expression: ${lineLength}", 3 );
 513  0
                 append( sb, "", 0 );
 514  
             }
 515  
         }
 516  
 
 517  0
         if ( goal == null || goal.length() <= 0 || "jira-report".equals( goal ) )
 518  
         {
 519  0
             append( sb, "changes:jira-report", 0 );
 520  0
             append( sb, "Goal which downloads issues from the Issue Tracking System and generates a report.", 1 );
 521  0
             append( sb, "", 0 );
 522  0
             if ( detail )
 523  
             {
 524  0
                 append( sb, "Available parameters:", 1 );
 525  0
                 append( sb, "", 0 );
 526  
 
 527  0
                 append( sb, "columnNames (Default: Key,Summary,Status,Resolution,Assignee)", 2 );
 528  0
                 append( sb, "Sets the names of the columns that you want in the report. The columns will appear in the report in the same order as you specify them here. Multiple values can be separated by commas.\nValid columns are: Assignee, Component, Created, Fix Version, Id, Key, Priority, Reporter, Resolution, Status, Summary, Type, Updated and Version.\n", 3 );
 529  0
                 append( sb, "", 0 );
 530  
 
 531  0
                 append( sb, "component", 2 );
 532  0
                 append( sb, "Sets the component(s) that you want to limit your report to include. Multiple values can be separated by commas (such as 10011,10012). If this is set to empty - that means all components will be included.", 3 );
 533  0
                 append( sb, "", 0 );
 534  
 
 535  0
                 append( sb, "filter", 2 );
 536  0
                 append( sb, "Defines the filter parameters to restrict which issues are retrieved from JIRA. The filter parameter uses the same format of url parameters that is used in a JIRA search.", 3 );
 537  0
                 append( sb, "", 0 );
 538  
 
 539  0
                 append( sb, "fixVersionIds", 2 );
 540  0
                 append( sb, "Sets the fix version id(s) that you want to limit your report to include. These are JIRA\'s internal version ids, NOT the human readable display ones. Multiple fix versions can be separated by commas. If this is set to empty - that means all fix versions will be included.", 3 );
 541  0
                 append( sb, "", 0 );
 542  
 
 543  0
                 append( sb, "jiraDatePattern (Default: EEE, d MMM yyyy HH:mm:ss Z)", 2 );
 544  0
                 append( sb, "The pattern used by dates in the JIRA XML-file. This is used to parse the Created and Updated fields.", 3 );
 545  0
                 append( sb, "", 0 );
 546  
 
 547  0
                 append( sb, "jiraPassword", 2 );
 548  0
                 append( sb, "Defines the JIRA password for authentication into a private JIRA installation.", 3 );
 549  0
                 append( sb, "", 0 );
 550  
 
 551  0
                 append( sb, "jiraUser", 2 );
 552  0
                 append( sb, "Defines the JIRA username for authentication into a private JIRA installation.", 3 );
 553  0
                 append( sb, "", 0 );
 554  
 
 555  0
                 append( sb, "maxEntries (Default: 100)", 2 );
 556  0
                 append( sb, "Maximum number of entries to be fetched from JIRA.", 3 );
 557  0
                 append( sb, "", 0 );
 558  
 
 559  0
                 append( sb, "onlyCurrentVersion (Default: false)", 2 );
 560  0
                 append( sb, "If you only want to show issues for the current version in the report. The current version being used is ${project.version} minus any \'-SNAPSHOT\' suffix.", 3 );
 561  0
                 append( sb, "", 0 );
 562  
 
 563  0
                 append( sb, "outputDirectory (Default: ${project.reporting.outputDirectory})", 2 );
 564  0
                 append( sb, "Report output directory. Note that this parameter is only relevant if the goal is run from the command line or from the default build lifecycle. 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 );
 565  0
                 append( sb, "", 0 );
 566  
 
 567  0
                 append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 );
 568  0
                 append( sb, "Report output encoding. Note that this parameter is only relevant if the goal is run from the command line or from the default build lifecycle. If the goal is run indirectly as part of a site generation, the output encoding configured in the Maven Site Plugin is used instead.", 3 );
 569  0
                 append( sb, "Expression: ${outputEncoding}", 3 );
 570  0
                 append( sb, "", 0 );
 571  
 
 572  0
                 append( sb, "priorityIds", 2 );
 573  0
                 append( sb, "Sets the priority(s) that you want to limit your report to include. Valid statuses are Blocker, Critical, Major, Minor and Trivial. Multiple values can be separated by commas. If this is set to empty - that means all priorities will be included.", 3 );
 574  0
                 append( sb, "", 0 );
 575  
 
 576  0
                 append( sb, "resolutionIds (Default: Fixed)", 2 );
 577  0
                 append( sb, "Sets the resolution(s) that you want to fetch from JIRA. Valid resolutions are: Unresolved, Fixed, Won\'t Fix, Duplicate, Incomplete and Cannot Reproduce. Multiple values can be separated by commas.\nNote: In versions 2.0-beta-3 and earlier this parameter had no default value.\n", 3 );
 578  0
                 append( sb, "", 0 );
 579  
 
 580  0
                 append( sb, "sortColumnNames (Default: Priority DESC, Created DESC)", 2 );
 581  0
                 append( sb, "Sets the column names that you want to sort the report by. Add DESC following the column name to specify descending sequence. For example Fix Version DESC, Type sorts first by the Fix Version in descending order and then by Type in ascending order. By default sorting is done in ascending order, but is possible to specify ASC for consistency. The previous example would then become Fix Version DESC, Type ASC.\nValid columns are: Assignee, Component, Created, Fix Version, Id, Key, Priority, Reporter, Resolution, Status, Summary, Type, Updated and Version.\n\nNote: If you are using JIRA 4 you need to put your sort column names in the reverse order. The handling of this changed between JIRA 3 and JIRA 4. The current default value is suitable for JIRA 3. This may change in the future, so please configure your sort column names in an order that works for your own JIRA version.\n", 3 );
 582  0
                 append( sb, "", 0 );
 583  
 
 584  0
                 append( sb, "statusIds (Default: Closed)", 2 );
 585  0
                 append( sb, "Sets the status(es) that you want to fetch from JIRA. Valid statuses are: Open, In Progress, Reopened, Resolved and Closed. Multiple values can be separated by commas.\nIf your installation of JIRA uses custom status IDs, you can reference them here by their numeric values. You can obtain them on the Statuses page (in 4.0.2 it\'s under Administration > Issue Settings > Statuses) - just hover over the Edit link for the status you want and you\'ll see something like <your JIRA URL>/secure/admin/EditStatus!default.jspa?id=12345; in this case the value is 12345.\n\nNote: In versions 2.0-beta-3 and earlier this parameter had no default value.\n", 3 );
 586  0
                 append( sb, "", 0 );
 587  
 
 588  0
                 append( sb, "typeIds", 2 );
 589  0
                 append( sb, "Sets the types(s) that you want to limit your report to include. Valid types are: Bug, New Feature, Task, Improvement, Wish, Test and Sub-task. Multiple values can be separated by commas. If this is set to empty - that means all types will be included.", 3 );
 590  0
                 append( sb, "", 0 );
 591  
 
 592  0
                 append( sb, "versionPrefix", 2 );
 593  0
                 append( sb, "The prefix used when naming versions in JIRA.\nIf you have a project in JIRA with several components that have different release cycles, it is an often used pattern to prefix the version with the name of the component, e.g. maven-filtering-1.0 etc. To fetch issues from JIRA for a release of the \'maven-filtering\' component you would need to set this parameter to \'maven-filtering-\'.\n", 3 );
 594  0
                 append( sb, "", 0 );
 595  
 
 596  0
                 append( sb, "webPassword", 2 );
 597  0
                 append( sb, "Defines the http password for basic authentication into the JIRA webserver.", 3 );
 598  0
                 append( sb, "", 0 );
 599  
 
 600  0
                 append( sb, "webUser", 2 );
 601  0
                 append( sb, "Defines the http user for basic authentication into the JIRA webserver.", 3 );
 602  0
                 append( sb, "", 0 );
 603  
             }
 604  
         }
 605  
 
 606  0
         if ( goal == null || goal.length() <= 0 || "trac-report".equals( goal ) )
 607  
         {
 608  0
             append( sb, "changes:trac-report", 0 );
 609  0
             append( sb, "Goal which downloads issues from the Issue Tracking System and generates a report.", 1 );
 610  0
             append( sb, "", 0 );
 611  0
             if ( detail )
 612  
             {
 613  0
                 append( sb, "Available parameters:", 1 );
 614  0
                 append( sb, "", 0 );
 615  
 
 616  0
                 append( sb, "columnNames (Default: Id,Type,Summary,Assignee,Reporter,Priority,Status,Resolution,Created,Updated)", 2 );
 617  0
                 append( sb, "Sets the column names that you want to show in the report. The columns will appear in the report in the same order as you specify them here. Multiple values can be separated by commas.\nValid columns are: Assignee, Component, Created, Fix Version, Id, Priority, Reporter, Resolution, Status, Summary, Type and Updated.\n", 3 );
 618  0
                 append( sb, "", 0 );
 619  
 
 620  0
                 append( sb, "outputDirectory (Default: ${project.reporting.outputDirectory})", 2 );
 621  0
                 append( sb, "Report output directory. Note that this parameter is only relevant if the goal is run from the command line or from the default build lifecycle. 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 );
 622  0
                 append( sb, "", 0 );
 623  
 
 624  0
                 append( sb, "outputEncoding (Default: ${project.reporting.outputEncoding})", 2 );
 625  0
                 append( sb, "Report output encoding. Note that this parameter is only relevant if the goal is run from the command line or from the default build lifecycle. If the goal is run indirectly as part of a site generation, the output encoding configured in the Maven Site Plugin is used instead.", 3 );
 626  0
                 append( sb, "Expression: ${outputEncoding}", 3 );
 627  0
                 append( sb, "", 0 );
 628  
 
 629  0
                 append( sb, "query (Default: order=id)", 2 );
 630  0
                 append( sb, "Defines the Trac query for searching ticket.", 3 );
 631  0
                 append( sb, "", 0 );
 632  
 
 633  0
                 append( sb, "tracPassword", 2 );
 634  0
                 append( sb, "Defines the Trac password for authentication into a private Trac installation.", 3 );
 635  0
                 append( sb, "", 0 );
 636  
 
 637  0
                 append( sb, "tracUser", 2 );
 638  0
                 append( sb, "Defines the Trac username for authentication into a private Trac installation.", 3 );
 639  0
                 append( sb, "", 0 );
 640  
             }
 641  
         }
 642  
 
 643  0
         if ( getLog().isInfoEnabled() )
 644  
         {
 645  0
             getLog().info( sb.toString() );
 646  
         }
 647  0
     }
 648  
 
 649  
     /**
 650  
      * <p>Repeat a String <code>n</code> times to form a new string.</p>
 651  
      *
 652  
      * @param str String to repeat
 653  
      * @param repeat number of times to repeat str
 654  
      * @return String with repeated String
 655  
      * @throws NegativeArraySizeException if <code>repeat < 0</code>
 656  
      * @throws NullPointerException if str is <code>null</code>
 657  
      */
 658  
     private static String repeat( String str, int repeat )
 659  
     {
 660  0
         StringBuffer buffer = new StringBuffer( repeat * str.length() );
 661  
 
 662  0
         for ( int i = 0; i < repeat; i++ )
 663  
         {
 664  0
             buffer.append( str );
 665  
         }
 666  
 
 667  0
         return buffer.toString();
 668  
     }
 669  
 
 670  
     /** 
 671  
      * Append a description to the buffer by respecting the indentSize and lineLength parameters.
 672  
      * <b>Note</b>: The last character is always a new line.
 673  
      * 
 674  
      * @param sb The buffer to append the description, not <code>null</code>.
 675  
      * @param description The description, not <code>null</code>.
 676  
      * @param indent The base indentation level of each line, must not be negative.
 677  
      */
 678  
     private void append( StringBuffer sb, String description, int indent )
 679  
     {
 680  0
         for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); )
 681  
         {
 682  0
             sb.append( it.next().toString() ).append( '\n' );
 683  
         }
 684  0
     }
 685  
 
 686  
     /** 
 687  
      * Splits the specified text into lines of convenient display length.
 688  
      * 
 689  
      * @param text The text to split into lines, must not be <code>null</code>.
 690  
      * @param indent The base indentation level of each line, must not be negative.
 691  
      * @param indentSize The size of each indentation, must not be negative.
 692  
      * @param lineLength The length of the line, must not be negative.
 693  
      * @return The sequence of display lines, never <code>null</code>.
 694  
      * @throws NegativeArraySizeException if <code>indent < 0</code>
 695  
      */
 696  
     private static List toLines( String text, int indent, int indentSize, int lineLength )
 697  
     {
 698  0
         List<String> lines = new ArrayList<String>();
 699  
 
 700  0
         String ind = repeat( "\t", indent );
 701  0
         String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" );
 702  0
         for ( int i = 0; i < plainLines.length; i++ )
 703  
         {
 704  0
             toLines( lines, ind + plainLines[i], indentSize, lineLength );
 705  
         }
 706  
 
 707  0
         return lines;
 708  
     }
 709  
 
 710  
     /** 
 711  
      * Adds the specified line to the output sequence, performing line wrapping if necessary.
 712  
      * 
 713  
      * @param lines The sequence of display lines, must not be <code>null</code>.
 714  
      * @param line The line to add, must not be <code>null</code>.
 715  
      * @param indentSize The size of each indentation, must not be negative.
 716  
      * @param lineLength The length of the line, must not be negative.
 717  
      */
 718  
     private static void toLines( List<String> lines, String line, int indentSize, int lineLength )
 719  
     {
 720  0
         int lineIndent = getIndentLevel( line );
 721  0
         StringBuffer buf = new StringBuffer( 256 );
 722  0
         String[] tokens = line.split( " +" );
 723  0
         for ( int i = 0; i < tokens.length; i++ )
 724  
         {
 725  0
             String token = tokens[i];
 726  0
             if ( i > 0 )
 727  
             {
 728  0
                 if ( buf.length() + token.length() >= lineLength )
 729  
                 {
 730  0
                     lines.add( buf.toString() );
 731  0
                     buf.setLength( 0 );
 732  0
                     buf.append( repeat( " ", lineIndent * indentSize ) );
 733  
                 }
 734  
                 else
 735  
                 {
 736  0
                     buf.append( ' ' );
 737  
                 }
 738  
             }
 739  0
             for ( int j = 0; j < token.length(); j++ )
 740  
             {
 741  0
                 char c = token.charAt( j );
 742  0
                 if ( c == '\t' )
 743  
                 {
 744  0
                     buf.append( repeat( " ", indentSize - buf.length() % indentSize ) );
 745  
                 }
 746  0
                 else if ( c == '\u00A0' )
 747  
                 {
 748  0
                     buf.append( ' ' );
 749  
                 }
 750  
                 else
 751  
                 {
 752  0
                     buf.append( c );
 753  
                 }
 754  
             }
 755  
         }
 756  0
         lines.add( buf.toString() );
 757  0
     }
 758  
 
 759  
     /** 
 760  
      * Gets the indentation level of the specified line.
 761  
      * 
 762  
      * @param line The line whose indentation level should be retrieved, must not be <code>null</code>.
 763  
      * @return The indentation level of the line.
 764  
      */
 765  
     private static int getIndentLevel( String line )
 766  
     {
 767  0
         int level = 0;
 768  0
         for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ )
 769  
         {
 770  0
             level++;
 771  
         }
 772  0
         for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ )
 773  
         {
 774  0
             if ( line.charAt( i ) == '\t' )
 775  
             {
 776  0
                 level++;
 777  0
                 break;
 778  
             }
 779  
         }
 780  0
         return level;
 781  
     }
 782  
 }