Coverage Report - org.apache.maven.plugin.failsafe.HelpMojo
 
Classes in this File Line Coverage Branch Coverage Complexity
HelpMojo
0%
0/337
0%
0/62
4.667
 
 1  
 package org.apache.maven.plugin.failsafe;
 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-failsafe-plugin.<br/> Call <pre>  mvn failsafe:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</pre> to display parameter details.
 12  
  *
 13  
  * @version generated on Tue Jun 14 21:30:37 CEST 2011
 14  
  * @author org.apache.maven.tools.plugin.generator.PluginHelpGenerator (version 2.8)
 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-failsafe-plugin:2.9", 0 );
 69  0
         append( sb, "", 0 );
 70  
 
 71  0
         append( sb, "Maven Failsafe Plugin", 0 );
 72  0
         append( sb, "Surefire is a test framework project.", 1 );
 73  0
         append( sb, "", 0 );
 74  
 
 75  0
         if ( goal == null || goal.length() <= 0 )
 76  
         {
 77  0
             append( sb, "This plugin has 3 goals:", 0 );
 78  0
             append( sb, "", 0 );
 79  
         }
 80  
 
 81  0
         if ( goal == null || goal.length() <= 0 || "help".equals( goal ) )
 82  
         {
 83  0
             append( sb, "failsafe:help", 0 );
 84  0
             append( sb, "Display help information on maven-failsafe-plugin.\nCall\n\u00a0\u00a0mvn\u00a0failsafe:help\u00a0-Ddetail=true\u00a0-Dgoal=<goal-name>\nto display parameter details.", 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, "detail (Default: false)", 2 );
 92  0
                 append( sb, "If true, display all settable properties for each goal.", 3 );
 93  0
                 append( sb, "Expression: ${detail}", 3 );
 94  0
                 append( sb, "", 0 );
 95  
 
 96  0
                 append( sb, "goal", 2 );
 97  0
                 append( sb, "The name of the goal for which to show help. If unspecified, all goals will be displayed.", 3 );
 98  0
                 append( sb, "Expression: ${goal}", 3 );
 99  0
                 append( sb, "", 0 );
 100  
 
 101  0
                 append( sb, "indentSize (Default: 2)", 2 );
 102  0
                 append( sb, "The number of spaces per indentation level, should be positive.", 3 );
 103  0
                 append( sb, "Expression: ${indentSize}", 3 );
 104  0
                 append( sb, "", 0 );
 105  
 
 106  0
                 append( sb, "lineLength (Default: 80)", 2 );
 107  0
                 append( sb, "The maximum length of a display line, should be positive.", 3 );
 108  0
                 append( sb, "Expression: ${lineLength}", 3 );
 109  0
                 append( sb, "", 0 );
 110  
             }
 111  
         }
 112  
 
 113  0
         if ( goal == null || goal.length() <= 0 || "integration-test".equals( goal ) )
 114  
         {
 115  0
             append( sb, "failsafe:integration-test", 0 );
 116  0
             append( sb, "Run integration tests using Surefire.", 1 );
 117  0
             append( sb, "", 0 );
 118  0
             if ( detail )
 119  
             {
 120  0
                 append( sb, "Available parameters:", 1 );
 121  0
                 append( sb, "", 0 );
 122  
 
 123  0
                 append( sb, "additionalClasspathElements", 2 );
 124  0
                 append( sb, "Additional elements to be appended to the classpath.", 3 );
 125  0
                 append( sb, "", 0 );
 126  
 
 127  0
                 append( sb, "argLine", 2 );
 128  0
                 append( sb, "Arbitrary JVM options to set on the command line.", 3 );
 129  0
                 append( sb, "Expression: ${argLine}", 3 );
 130  0
                 append( sb, "", 0 );
 131  
 
 132  0
                 append( sb, "basedir (Default: ${basedir})", 2 );
 133  0
                 append( sb, "The base directory of the project being tested. This can be obtained in your integration test via System.getProperty(\'basedir\').", 3 );
 134  0
                 append( sb, "", 0 );
 135  
 
 136  0
                 append( sb, "childDelegation (Default: false)", 2 );
 137  0
                 append( sb, "When false it makes tests run using the standard classloader delegation instead of the default Maven isolated classloader. Only used when forking (forkMode is not \'none\').\nSetting it to false helps with some problems caused by conflicts between xml parsers in the classpath and the Java 5 provider parser.", 3 );
 138  0
                 append( sb, "Expression: ${childDelegation}", 3 );
 139  0
                 append( sb, "", 0 );
 140  
 
 141  0
                 append( sb, "classesDirectory (Default: ${project.build.outputDirectory})", 2 );
 142  0
                 append( sb, "The directory containing generated classes of the project being tested. This will be included after the test classes in the test classpath.", 3 );
 143  0
                 append( sb, "", 0 );
 144  
 
 145  0
                 append( sb, "classpathDependencyExcludes", 2 );
 146  0
                 append( sb, "List of dependencies to exclude from the test classpath. Each dependency string must follow the format groupId:artifactId. For example: org.acme:project-a", 3 );
 147  0
                 append( sb, "", 0 );
 148  
 
 149  0
                 append( sb, "classpathDependencyScopeExclude", 2 );
 150  0
                 append( sb, "A dependency scope to exclude from the test classpath. The scope should be one of the scopes defined by org.apache.maven.artifact.Artifact. This includes the following:\n-\tcompile - system, provided, compile\n-\truntime - compile, runtime\n-\tcompile+runtime - system, provided, compile, runtime\n-\truntime+system - system, compile, runtime\n-\ttest - system, provided, compile, runtime, test\n", 3 );
 151  0
                 append( sb, "", 0 );
 152  
 
 153  0
                 append( sb, "debugForkedProcess", 2 );
 154  0
                 append( sb, "Attach a debugger to the forked JVM. If set to \'true\', the process will suspend and wait for a debugger to attach on port 5005. If set to some other string, that string will be appended to the argLine, allowing you to configure arbitrary debuggability options (without overwriting the other options specified through the argLine parameter).", 3 );
 155  0
                 append( sb, "Expression: ${maven.failsafe.debug}", 3 );
 156  0
                 append( sb, "", 0 );
 157  
 
 158  0
                 append( sb, "disableXmlReport (Default: false)", 2 );
 159  0
                 append( sb, "Flag to disable the generation of report files in xml format.", 3 );
 160  0
                 append( sb, "Expression: ${disableXmlReport}", 3 );
 161  0
                 append( sb, "", 0 );
 162  
 
 163  0
                 append( sb, "enableAssertions (Default: true)", 2 );
 164  0
                 append( sb, "By default, Surefire enables JVM assertions for the execution of your test cases. To disable the assertions, set this flag to \'false\'.", 3 );
 165  0
                 append( sb, "Expression: ${enableAssertions}", 3 );
 166  0
                 append( sb, "", 0 );
 167  
 
 168  0
                 append( sb, "encoding (Default: ${project.reporting.outputEncoding})", 2 );
 169  0
                 append( sb, "The character encoding scheme to be applied.", 3 );
 170  0
                 append( sb, "Expression: ${encoding}", 3 );
 171  0
                 append( sb, "", 0 );
 172  
 
 173  0
                 append( sb, "environmentVariables", 2 );
 174  0
                 append( sb, "Additional environment variables to set on the command line.", 3 );
 175  0
                 append( sb, "", 0 );
 176  
 
 177  0
                 append( sb, "excludedGroups", 2 );
 178  0
                 append( sb, "(TestNG only) Excluded groups. Any methods/classes/etc with one of the groups specified in this list will specifically not be run.\nThis parameter is ignored if the suiteXmlFiles parameter is specified.", 3 );
 179  0
                 append( sb, "Expression: ${excludedGroups}", 3 );
 180  0
                 append( sb, "", 0 );
 181  
 
 182  0
                 append( sb, "excludes", 2 );
 183  0
                 append( sb, "A list of <exclude> elements specifying the tests (by pattern) that should be excluded in testing. When not specified and when the test parameter is not specified, the default excludes will be \n<excludes>\n\u00a0<exclude>**/*$*</exclude>\n</excludes>\n(which excludes all inner classes).\nThis parameter is ignored if the TestNG suiteXmlFiles parameter is specified. Each exclude item may also contain a comma-separated sublist of items, which will be treated as multiple \u00a0<exclude> entries.\n", 3 );
 184  0
                 append( sb, "", 0 );
 185  
 
 186  0
                 append( sb, "failIfNoTests", 2 );
 187  0
                 append( sb, "Set this to \'true\' to cause a failure if there are no tests to run. Defaults to \'false\'.", 3 );
 188  0
                 append( sb, "Expression: ${failIfNoTests}", 3 );
 189  0
                 append( sb, "", 0 );
 190  
 
 191  0
                 append( sb, "forkedProcessTimeoutInSeconds", 2 );
 192  0
                 append( sb, "Kill the forked test process after a certain number of seconds. If set to 0, wait forever for the process, never timing out.", 3 );
 193  0
                 append( sb, "Expression: ${failsafe.timeout}", 3 );
 194  0
                 append( sb, "", 0 );
 195  
 
 196  0
                 append( sb, "forkMode (Default: once)", 2 );
 197  0
                 append( sb, "Option to specify the forking mode. Can be \'never\', \'once\' or \'always\'. \'none\' and \'pertest\' are also accepted for backwards compatibility. \'always\' forks for each test-class.", 3 );
 198  0
                 append( sb, "Expression: ${forkMode}", 3 );
 199  0
                 append( sb, "", 0 );
 200  
 
 201  0
                 append( sb, "groups", 2 );
 202  0
                 append( sb, "(TestNG only) Groups for this test. Only classes/methods/etc decorated with one of the groups specified here will be included in test run, if specified.\nThis parameter is ignored if the suiteXmlFiles parameter is specified.", 3 );
 203  0
                 append( sb, "Expression: ${groups}", 3 );
 204  0
                 append( sb, "", 0 );
 205  
 
 206  0
                 append( sb, "includes", 2 );
 207  0
                 append( sb, "A list of <include> elements specifying the tests (by pattern) that should be included in testing. When not specified and when the test parameter is not specified, the default includes will be \n<includes>\n\u00a0<include>**/IT*.java</include>\n\u00a0<include>**/*IT.java</include>\n\u00a0<include>**/*ITCase.java</include>\n</includes>\nEach include item may also contain a comma-separated sublist of items, which will be treated as multiple \u00a0<include> entries.\nThis parameter is ignored if the TestNG suiteXmlFiles parameter is specified.", 3 );
 208  0
                 append( sb, "", 0 );
 209  
 
 210  0
                 append( sb, "junitArtifactName (Default: junit:junit)", 2 );
 211  0
                 append( sb, "Allows you to specify the name of the JUnit artifact. If not set, junit:junit will be used.", 3 );
 212  0
                 append( sb, "Expression: ${junitArtifactName}", 3 );
 213  0
                 append( sb, "", 0 );
 214  
 
 215  0
                 append( sb, "jvm", 2 );
 216  0
                 append( sb, "Option to specify the jvm (or path to the java executable) to use with the forking options. For the default, the jvm will be a new instance of the same VM as the one used to run Maven. JVM settings are not inherited from MAVEN_OPTS.", 3 );
 217  0
                 append( sb, "Expression: ${jvm}", 3 );
 218  0
                 append( sb, "", 0 );
 219  
 
 220  0
                 append( sb, "objectFactory", 2 );
 221  0
                 append( sb, "(TestNG only) Define the factory class used to create all test instances.", 3 );
 222  0
                 append( sb, "Expression: ${objectFactory}", 3 );
 223  0
                 append( sb, "", 0 );
 224  
 
 225  0
                 append( sb, "parallel", 2 );
 226  0
                 append( sb, "(TestNG only) When you use the parallel attribute, TestNG will try to run all your test methods in separate threads, except for methods that depend on each other, which will be run in the same thread in order to respect their order of execution. (JUnit 4.7 provider) Supports values \'classes\'/\'methods\'/\'both\' to run in separate threads, as controlled by threadCount.", 3 );
 227  0
                 append( sb, "Expression: ${parallel}", 3 );
 228  0
                 append( sb, "", 0 );
 229  
 
 230  0
                 append( sb, "perCoreThreadCount (Default: true)", 2 );
 231  0
                 append( sb, "(JUnit 4.7 provider) Indicates that threadCount is per cpu core.", 3 );
 232  0
                 append( sb, "Expression: ${perCoreThreadCount}", 3 );
 233  0
                 append( sb, "", 0 );
 234  
 
 235  0
                 append( sb, "printSummary (Default: true)", 2 );
 236  0
                 append( sb, "Option to print summary of test suites or just print the test cases that have errors.", 3 );
 237  0
                 append( sb, "Expression: ${failsafe.printSummary}", 3 );
 238  0
                 append( sb, "", 0 );
 239  
 
 240  0
                 append( sb, "properties", 2 );
 241  0
                 append( sb, "List of properties for configuring all TestNG related configurations. This is the new preferred method of configuring TestNG.", 3 );
 242  0
                 append( sb, "", 0 );
 243  
 
 244  0
                 append( sb, "redirectTestOutputToFile (Default: false)", 2 );
 245  0
                 append( sb, "Set this to \'true\' to redirect the unit test standard output to a file (found in reportsDirectory/testName-output.txt).", 3 );
 246  0
                 append( sb, "Expression: ${maven.test.redirectTestOutputToFile}", 3 );
 247  0
                 append( sb, "", 0 );
 248  
 
 249  0
                 append( sb, "remoteRepositories", 2 );
 250  0
                 append( sb, "The remote plugin repositories declared in the POM.", 3 );
 251  0
                 append( sb, "Expression: ${project.pluginArtifactRepositories}", 3 );
 252  0
                 append( sb, "", 0 );
 253  
 
 254  0
                 append( sb, "reportFormat (Default: brief)", 2 );
 255  0
                 append( sb, "Selects the formatting for the test report to be generated. Can be set as \'brief\' or \'plain\'.", 3 );
 256  0
                 append( sb, "Expression: ${failsafe.reportFormat}", 3 );
 257  0
                 append( sb, "", 0 );
 258  
 
 259  0
                 append( sb, "reportsDirectory (Default: ${project.build.directory}/failsafe-reports)", 2 );
 260  0
                 append( sb, "Base directory where all reports are written to.", 3 );
 261  0
                 append( sb, "", 0 );
 262  
 
 263  0
                 append( sb, "runOrder (Default: filesystem)", 2 );
 264  0
                 append( sb, "Defines the order the tests will be run in. Supported values are \'alphabetical\', \'reversealphabetical\', \'random\', \'hourly\' (alphabetical on even hours, reverse alphabetical on odd hours) and \'filesystem\'. Odd/Even for hourly is determined at the time the of scanning the classpath, meaning it could change during a multi-module build.", 3 );
 265  0
                 append( sb, "", 0 );
 266  
 
 267  0
                 append( sb, "skip (Default: false)", 2 );
 268  0
                 append( sb, "Set this to \'true\' to bypass unit tests entirely. Its use is NOT RECOMMENDED, especially if you enable it using the \'maven.test.skip\' property, because maven.test.skip disables both running the tests and compiling the tests. Consider using the skipTests parameter instead.", 3 );
 269  0
                 append( sb, "Expression: ${maven.test.skip}", 3 );
 270  0
                 append( sb, "", 0 );
 271  
 
 272  0
                 append( sb, "skipExec", 2 );
 273  0
                 append( sb, "Deprecated. Use skipTests instead.", 3 );
 274  0
                 append( sb, "", 0 );
 275  0
                 append( sb, "This old parameter is just like skipTests, but bound to the old property \'maven.test.skip.exec\'.", 3 );
 276  0
                 append( sb, "Expression: ${maven.test.skip.exec}", 3 );
 277  0
                 append( sb, "", 0 );
 278  
 
 279  0
                 append( sb, "skipITs", 2 );
 280  0
                 append( sb, "Set this to \'true\' to skip running integration tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion.", 3 );
 281  0
                 append( sb, "Expression: ${skipITs}", 3 );
 282  0
                 append( sb, "", 0 );
 283  
 
 284  0
                 append( sb, "skipTests (Default: false)", 2 );
 285  0
                 append( sb, "Set this to \'true\' to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion.", 3 );
 286  0
                 append( sb, "Expression: ${skipTests}", 3 );
 287  0
                 append( sb, "", 0 );
 288  
 
 289  0
                 append( sb, "suiteXmlFiles", 2 );
 290  0
                 append( sb, "(TestNG only) List of <suiteXmlFile> elements specifying TestNG suite xml file locations. Note that suiteXmlFiles is incompatible with several other parameters of this plugin, like includes/excludes.\nThis parameter is ignored if the test parameter is specified (allowing you to run a single test instead of an entire suite).", 3 );
 291  0
                 append( sb, "", 0 );
 292  
 
 293  0
                 append( sb, "summaryFile", 2 );
 294  0
                 append( sb, "The summary file to write integration test results to.", 3 );
 295  0
                 append( sb, "Required: Yes", 3 );
 296  0
                 append( sb, "Expression: ${project.build.directory}/failsafe-reports/failsafe-summary.xml", 3 );
 297  0
                 append( sb, "", 0 );
 298  
 
 299  0
                 append( sb, "systemProperties", 2 );
 300  0
                 append( sb, "Deprecated. Use systemPropertyVariables instead.", 3 );
 301  0
                 append( sb, "", 0 );
 302  0
                 append( sb, "List of System properties to pass to the JUnit tests.", 3 );
 303  0
                 append( sb, "", 0 );
 304  
 
 305  0
                 append( sb, "systemPropertiesFile", 2 );
 306  0
                 append( sb, "List of System properties, loaded from a file, to pass to the JUnit tests.", 3 );
 307  0
                 append( sb, "", 0 );
 308  
 
 309  0
                 append( sb, "systemPropertyVariables", 2 );
 310  0
                 append( sb, "List of System properties to pass to the JUnit tests.", 3 );
 311  0
                 append( sb, "", 0 );
 312  
 
 313  0
                 append( sb, "test", 2 );
 314  0
                 append( sb, "Specify this parameter to run individual tests by file name, overriding the includes/excludes parameters. Each pattern you specify here will be used to create an include pattern formatted like **/${test}.java, so you can just type \'-Dit.test=MyTest\' to run a single test called \'foo/MyTest.java\'.\nThis parameter overrides the includes/excludes parameters, and the TestNG suiteXmlFiles parameter. since 2.7.3 You can execute a limited number of method in the test with adding #myMethod or #my*ethod. Si type \'-Dtest=MyTest#myMethod\' supported for junit 4.x and testNg", 3 );
 315  0
                 append( sb, "Expression: ${it.test}", 3 );
 316  0
                 append( sb, "", 0 );
 317  
 
 318  0
                 append( sb, "testClassesDirectory (Default: ${project.build.testOutputDirectory})", 2 );
 319  0
                 append( sb, "The directory containing generated test classes of the project being tested. This will be included at the beginning of the test classpath.", 3 );
 320  0
                 append( sb, "", 0 );
 321  
 
 322  0
                 append( sb, "testNGArtifactName (Default: org.testng:testng)", 2 );
 323  0
                 append( sb, "Allows you to specify the name of the TestNG artifact. If not set, org.testng:testng will be used.", 3 );
 324  0
                 append( sb, "Expression: ${testNGArtifactName}", 3 );
 325  0
                 append( sb, "", 0 );
 326  
 
 327  0
                 append( sb, "testSourceDirectory (Default: ${project.build.testSourceDirectory})", 2 );
 328  0
                 append( sb, "The test source directory containing test class sources.", 3 );
 329  0
                 append( sb, "Required: Yes", 3 );
 330  0
                 append( sb, "", 0 );
 331  
 
 332  0
                 append( sb, "threadCount", 2 );
 333  0
                 append( sb, "(TestNG/JUnit 4.7 provider only) The attribute thread-count allows you to specify how many threads should be allocated for this execution. Only makes sense to use in conjunction with the parallel parameter.", 3 );
 334  0
                 append( sb, "Expression: ${threadCount}", 3 );
 335  0
                 append( sb, "", 0 );
 336  
 
 337  0
                 append( sb, "trimStackTrace (Default: true)", 2 );
 338  0
                 append( sb, "Whether to trim the stack trace in the reports to just the lines within the test, or show the full trace.", 3 );
 339  0
                 append( sb, "Expression: ${trimStackTrace}", 3 );
 340  0
                 append( sb, "", 0 );
 341  
 
 342  0
                 append( sb, "useFile (Default: true)", 2 );
 343  0
                 append( sb, "Option to generate a file test report or just output the test report to the console.", 3 );
 344  0
                 append( sb, "Expression: ${failsafe.useFile}", 3 );
 345  0
                 append( sb, "", 0 );
 346  
 
 347  0
                 append( sb, "useManifestOnlyJar (Default: true)", 2 );
 348  0
                 append( sb, "By default, Surefire forks your tests using a manifest-only JAR; set this parameter to \'false\' to force it to launch your tests with a plain old Java classpath. (See http://maven.apache.org/plugins/maven-surefire-plugin/examples/class-loading.html for a more detailed explanation of manifest-only JARs and their benefits.) Beware, setting this to \'false\' may cause your tests to fail on Windows if your classpath is too long.", 3 );
 349  0
                 append( sb, "Expression: ${failsafe.useManifestOnlyJar}", 3 );
 350  0
                 append( sb, "", 0 );
 351  
 
 352  0
                 append( sb, "useSystemClassLoader (Default: true)", 2 );
 353  0
                 append( sb, "Option to pass dependencies to the system\'s classloader instead of using an isolated class loader when forking. Prevents problems with JDKs which implement the service provider lookup mechanism by using the system\'s classloader.", 3 );
 354  0
                 append( sb, "Expression: ${failsafe.useSystemClassLoader}", 3 );
 355  0
                 append( sb, "", 0 );
 356  
 
 357  0
                 append( sb, "useUnlimitedThreads (Default: false)", 2 );
 358  0
                 append( sb, "(JUnit 4.7 provider) Indicates that the thread pool will be unlimited. The parallel parameter and the actual number of classes/methods will decide. Setting this to \'true\' effectively disables perCoreThreadCount and threadCount. Defaults to \'false\'.", 3 );
 359  0
                 append( sb, "Expression: ${useUnlimitedThreads}", 3 );
 360  0
                 append( sb, "", 0 );
 361  
 
 362  0
                 append( sb, "workingDirectory", 2 );
 363  0
                 append( sb, "Command line working directory.", 3 );
 364  0
                 append( sb, "Expression: ${basedir}", 3 );
 365  0
                 append( sb, "", 0 );
 366  
             }
 367  
         }
 368  
 
 369  0
         if ( goal == null || goal.length() <= 0 || "verify".equals( goal ) )
 370  
         {
 371  0
             append( sb, "failsafe:verify", 0 );
 372  0
             append( sb, "Verify integration tests ran using Surefire.", 1 );
 373  0
             append( sb, "", 0 );
 374  0
             if ( detail )
 375  
             {
 376  0
                 append( sb, "Available parameters:", 1 );
 377  0
                 append( sb, "", 0 );
 378  
 
 379  0
                 append( sb, "basedir (Default: ${basedir})", 2 );
 380  0
                 append( sb, "The base directory of the project being tested. This can be obtained in your unit test by System.getProperty(\'basedir\').", 3 );
 381  0
                 append( sb, "", 0 );
 382  
 
 383  0
                 append( sb, "encoding (Default: ${project.reporting.outputEncoding})", 2 );
 384  0
                 append( sb, "The character encoding scheme to be applied.", 3 );
 385  0
                 append( sb, "Expression: ${encoding}", 3 );
 386  0
                 append( sb, "", 0 );
 387  
 
 388  0
                 append( sb, "failIfNoTests", 2 );
 389  0
                 append( sb, "Set this to \'true\' to cause a failure if there are no tests to run.", 3 );
 390  0
                 append( sb, "Expression: ${failIfNoTests}", 3 );
 391  0
                 append( sb, "", 0 );
 392  
 
 393  0
                 append( sb, "reportsDirectory (Default: ${project.build.directory}/failsafe-reports)", 2 );
 394  0
                 append( sb, "Base directory where all reports are written to.", 3 );
 395  0
                 append( sb, "", 0 );
 396  
 
 397  0
                 append( sb, "skip (Default: false)", 2 );
 398  0
                 append( sb, "Set this to \'true\' to bypass unit tests entirely. Its use is NOT RECOMMENDED, especially if you enable it using the \'maven.test.skip\' property, because maven.test.skip disables both running the tests and compiling the tests. Consider using the skipTests parameter instead.", 3 );
 399  0
                 append( sb, "Expression: ${maven.test.skip}", 3 );
 400  0
                 append( sb, "", 0 );
 401  
 
 402  0
                 append( sb, "skipExec", 2 );
 403  0
                 append( sb, "Deprecated. Use -DskipTests instead.", 3 );
 404  0
                 append( sb, "", 0 );
 405  0
                 append( sb, "This old parameter is just like skipTests, but bound to the old property maven.test.skip.exec.", 3 );
 406  0
                 append( sb, "Expression: ${maven.test.skip.exec}", 3 );
 407  0
                 append( sb, "", 0 );
 408  
 
 409  0
                 append( sb, "skipITs", 2 );
 410  0
                 append( sb, "Set this to \'true\' to skip running integration tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion.", 3 );
 411  0
                 append( sb, "Expression: ${skipITs}", 3 );
 412  0
                 append( sb, "", 0 );
 413  
 
 414  0
                 append( sb, "skipTests", 2 );
 415  0
                 append( sb, "Set this to \'true\' to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion.", 3 );
 416  0
                 append( sb, "Expression: ${skipTests}", 3 );
 417  0
                 append( sb, "", 0 );
 418  
 
 419  0
                 append( sb, "summaryFile", 2 );
 420  0
                 append( sb, "The summary file to read integration test results from.", 3 );
 421  0
                 append( sb, "Required: Yes", 3 );
 422  0
                 append( sb, "Expression: ${project.build.directory}/failsafe-reports/failsafe-summary.xml", 3 );
 423  0
                 append( sb, "", 0 );
 424  
 
 425  0
                 append( sb, "summaryFiles", 2 );
 426  0
                 append( sb, "Additional summary files to read integration test results from.", 3 );
 427  0
                 append( sb, "", 0 );
 428  
 
 429  0
                 append( sb, "testClassesDirectory (Default: ${project.build.testOutputDirectory})", 2 );
 430  0
                 append( sb, "The directory containing generated test classes of the project being tested. This will be included at the beginning the test classpath.", 3 );
 431  0
                 append( sb, "", 0 );
 432  
 
 433  0
                 append( sb, "testFailureIgnore (Default: false)", 2 );
 434  0
                 append( sb, "Set this to true to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on occasion.", 3 );
 435  0
                 append( sb, "Expression: ${maven.test.failure.ignore}", 3 );
 436  0
                 append( sb, "", 0 );
 437  
             }
 438  
         }
 439  
 
 440  0
         if ( getLog().isInfoEnabled() )
 441  
         {
 442  0
             getLog().info( sb.toString() );
 443  
         }
 444  0
     }
 445  
 
 446  
     /**
 447  
      * <p>Repeat a String <code>n</code> times to form a new string.</p>
 448  
      *
 449  
      * @param str String to repeat
 450  
      * @param repeat number of times to repeat str
 451  
      * @return String with repeated String
 452  
      * @throws NegativeArraySizeException if <code>repeat < 0</code>
 453  
      * @throws NullPointerException if str is <code>null</code>
 454  
      */
 455  
     private static String repeat( String str, int repeat )
 456  
     {
 457  0
         StringBuffer buffer = new StringBuffer( repeat * str.length() );
 458  
 
 459  0
         for ( int i = 0; i < repeat; i++ )
 460  
         {
 461  0
             buffer.append( str );
 462  
         }
 463  
 
 464  0
         return buffer.toString();
 465  
     }
 466  
 
 467  
     /** 
 468  
      * Append a description to the buffer by respecting the indentSize and lineLength parameters.
 469  
      * <b>Note</b>: The last character is always a new line.
 470  
      * 
 471  
      * @param sb The buffer to append the description, not <code>null</code>.
 472  
      * @param description The description, not <code>null</code>.
 473  
      * @param indent The base indentation level of each line, must not be negative.
 474  
      */
 475  
     private void append( StringBuffer sb, String description, int indent )
 476  
     {
 477  0
         for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); )
 478  
         {
 479  0
             sb.append( it.next().toString() ).append( '\n' );
 480  
         }
 481  0
     }
 482  
 
 483  
     /** 
 484  
      * Splits the specified text into lines of convenient display length.
 485  
      * 
 486  
      * @param text The text to split into lines, must not be <code>null</code>.
 487  
      * @param indent The base indentation level of each line, must not be negative.
 488  
      * @param indentSize The size of each indentation, must not be negative.
 489  
      * @param lineLength The length of the line, must not be negative.
 490  
      * @return The sequence of display lines, never <code>null</code>.
 491  
      * @throws NegativeArraySizeException if <code>indent < 0</code>
 492  
      */
 493  
     private static List toLines( String text, int indent, int indentSize, int lineLength )
 494  
     {
 495  0
         List lines = new ArrayList();
 496  
 
 497  0
         String ind = repeat( "\t", indent );
 498  0
         String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" );
 499  0
         for ( int i = 0; i < plainLines.length; i++ )
 500  
         {
 501  0
             toLines( lines, ind + plainLines[i], indentSize, lineLength );
 502  
         }
 503  
 
 504  0
         return lines;
 505  
     }
 506  
 
 507  
     /** 
 508  
      * Adds the specified line to the output sequence, performing line wrapping if necessary.
 509  
      * 
 510  
      * @param lines The sequence of display lines, must not be <code>null</code>.
 511  
      * @param line The line to add, must not be <code>null</code>.
 512  
      * @param indentSize The size of each indentation, must not be negative.
 513  
      * @param lineLength The length of the line, must not be negative.
 514  
      */
 515  
     private static void toLines( List lines, String line, int indentSize, int lineLength )
 516  
     {
 517  0
         int lineIndent = getIndentLevel( line );
 518  0
         StringBuffer buf = new StringBuffer( 256 );
 519  0
         String[] tokens = line.split( " +" );
 520  0
         for ( int i = 0; i < tokens.length; i++ )
 521  
         {
 522  0
             String token = tokens[i];
 523  0
             if ( i > 0 )
 524  
             {
 525  0
                 if ( buf.length() + token.length() >= lineLength )
 526  
                 {
 527  0
                     lines.add( buf.toString() );
 528  0
                     buf.setLength( 0 );
 529  0
                     buf.append( repeat( " ", lineIndent * indentSize ) );
 530  
                 }
 531  
                 else
 532  
                 {
 533  0
                     buf.append( ' ' );
 534  
                 }
 535  
             }
 536  0
             for ( int j = 0; j < token.length(); j++ )
 537  
             {
 538  0
                 char c = token.charAt( j );
 539  0
                 if ( c == '\t' )
 540  
                 {
 541  0
                     buf.append( repeat( " ", indentSize - buf.length() % indentSize ) );
 542  
                 }
 543  0
                 else if ( c == '\u00A0' )
 544  
                 {
 545  0
                     buf.append( ' ' );
 546  
                 }
 547  
                 else
 548  
                 {
 549  0
                     buf.append( c );
 550  
                 }
 551  
             }
 552  
         }
 553  0
         lines.add( buf.toString() );
 554  0
     }
 555  
 
 556  
     /** 
 557  
      * Gets the indentation level of the specified line.
 558  
      * 
 559  
      * @param line The line whose indentation level should be retrieved, must not be <code>null</code>.
 560  
      * @return The indentation level of the line.
 561  
      */
 562  
     private static int getIndentLevel( String line )
 563  
     {
 564  0
         int level = 0;
 565  0
         for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ )
 566  
         {
 567  0
             level++;
 568  
         }
 569  0
         for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ )
 570  
         {
 571  0
             if ( line.charAt( i ) == '\t' )
 572  
             {
 573  0
                 level++;
 574  0
                 break;
 575  
             }
 576  
         }
 577  0
         return level;
 578  
     }
 579  
 }