Coverage Report - org.apache.maven.plugin.surefire.HelpMojo
 
Classes in this File Line Coverage Branch Coverage Complexity
HelpMojo
0%
0/282
0%
0/54
5.5
 
 1  
 package org.apache.maven.plugin.surefire;
 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-surefire-plugin.<br/> Call <pre>  mvn surefire:help -Ddetail=true -Dgoal=&lt;goal-name&gt;</pre> to display parameter details.
 12  
  *
 13  
  * @version generated on Tue Jan 24 23:20:22 CET 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-surefire-plugin:2.12", 0 );
 70  0
         append( sb, "", 0 );
 71  
 
 72  0
         append( sb, "Maven Surefire Plugin", 0 );
 73  0
         append( sb, "Surefire is a test framework project.", 1 );
 74  0
         append( sb, "", 0 );
 75  
 
 76  0
         if ( goal == null || goal.length() <= 0 )
 77  
         {
 78  0
             append( sb, "This plugin has 2 goals:", 0 );
 79  0
             append( sb, "", 0 );
 80  
         }
 81  
 
 82  0
         if ( goal == null || goal.length() <= 0 || "help".equals( goal ) )
 83  
         {
 84  0
             append( sb, "surefire:help", 0 );
 85  0
             append( sb, "Display help information on maven-surefire-plugin.\nCall\n\u00a0\u00a0mvn\u00a0surefire:help\u00a0-Ddetail=true\u00a0-Dgoal=<goal-name>\nto display parameter details.", 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, "detail (Default: false)", 2 );
 93  0
                 append( sb, "If true, display all settable properties for each goal.", 3 );
 94  0
                 append( sb, "Expression: ${detail}", 3 );
 95  0
                 append( sb, "", 0 );
 96  
 
 97  0
                 append( sb, "goal", 2 );
 98  0
                 append( sb, "The name of the goal for which to show help. If unspecified, all goals will be displayed.", 3 );
 99  0
                 append( sb, "Expression: ${goal}", 3 );
 100  0
                 append( sb, "", 0 );
 101  
 
 102  0
                 append( sb, "indentSize (Default: 2)", 2 );
 103  0
                 append( sb, "The number of spaces per indentation level, should be positive.", 3 );
 104  0
                 append( sb, "Expression: ${indentSize}", 3 );
 105  0
                 append( sb, "", 0 );
 106  
 
 107  0
                 append( sb, "lineLength (Default: 80)", 2 );
 108  0
                 append( sb, "The maximum length of a display line, should be positive.", 3 );
 109  0
                 append( sb, "Expression: ${lineLength}", 3 );
 110  0
                 append( sb, "", 0 );
 111  
             }
 112  
         }
 113  
 
 114  0
         if ( goal == null || goal.length() <= 0 || "test".equals( goal ) )
 115  
         {
 116  0
             append( sb, "surefire:test", 0 );
 117  0
             append( sb, "Run tests using Surefire.", 1 );
 118  0
             append( sb, "", 0 );
 119  0
             if ( detail )
 120  
             {
 121  0
                 append( sb, "Available parameters:", 1 );
 122  0
                 append( sb, "", 0 );
 123  
 
 124  0
                 append( sb, "additionalClasspathElements", 2 );
 125  0
                 append( sb, "Additional elements to be appended to the classpath.", 3 );
 126  0
                 append( sb, "", 0 );
 127  
 
 128  0
                 append( sb, "argLine", 2 );
 129  0
                 append( sb, "Arbitrary JVM options to set on the command line.", 3 );
 130  0
                 append( sb, "Expression: ${argLine}", 3 );
 131  0
                 append( sb, "", 0 );
 132  
 
 133  0
                 append( sb, "basedir (Default: ${basedir})", 2 );
 134  0
                 append( sb, "The base directory of the project being tested. This can be obtained in your unit test via System.getProperty(\'basedir\').", 3 );
 135  0
                 append( sb, "", 0 );
 136  
 
 137  0
                 append( sb, "childDelegation (Default: false)", 2 );
 138  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 );
 139  0
                 append( sb, "Expression: ${childDelegation}", 3 );
 140  0
                 append( sb, "", 0 );
 141  
 
 142  0
                 append( sb, "classesDirectory (Default: ${project.build.outputDirectory})", 2 );
 143  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 );
 144  0
                 append( sb, "", 0 );
 145  
 
 146  0
                 append( sb, "classpathDependencyExcludes", 2 );
 147  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 );
 148  0
                 append( sb, "", 0 );
 149  
 
 150  0
                 append( sb, "classpathDependencyScopeExclude", 2 );
 151  0
                 append( sb, "A dependency scope to exclude from the test classpath. The scope can be one of the following scopes:\n-\tcompile - system, provided, compile\n-\truntime - compile, runtime\n-\ttest - system, provided, compile, runtime, test\n", 3 );
 152  0
                 append( sb, "", 0 );
 153  
 
 154  0
                 append( sb, "debugForkedProcess", 2 );
 155  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 );
 156  0
                 append( sb, "Expression: ${maven.surefire.debug}", 3 );
 157  0
                 append( sb, "", 0 );
 158  
 
 159  0
                 append( sb, "disableXmlReport (Default: false)", 2 );
 160  0
                 append( sb, "Flag to disable the generation of report files in xml format.", 3 );
 161  0
                 append( sb, "Expression: ${disableXmlReport}", 3 );
 162  0
                 append( sb, "", 0 );
 163  
 
 164  0
                 append( sb, "enableAssertions (Default: true)", 2 );
 165  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 );
 166  0
                 append( sb, "Expression: ${enableAssertions}", 3 );
 167  0
                 append( sb, "", 0 );
 168  
 
 169  0
                 append( sb, "environmentVariables", 2 );
 170  0
                 append( sb, "Additional environment variables to set on the command line.", 3 );
 171  0
                 append( sb, "", 0 );
 172  
 
 173  0
                 append( sb, "excludedGroups", 2 );
 174  0
                 append( sb, "(TestNG/JUnit47 provider with JUnit4.8+ only) Excluded groups. Any methods/classes/etc with one of the groups specified in this list will specifically not be run.\nFor JUnit, this parameter forces the use of the 4.7 provider\nThis parameter is ignored if the suiteXmlFiles parameter is specified.", 3 );
 175  0
                 append( sb, "Expression: ${excludedGroups}", 3 );
 176  0
                 append( sb, "", 0 );
 177  
 
 178  0
                 append( sb, "excludes", 2 );
 179  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.", 3 );
 180  0
                 append( sb, "", 0 );
 181  
 
 182  0
                 append( sb, "failIfNoSpecifiedTests", 2 );
 183  0
                 append( sb, "Set this to \'true\' to cause a failure if the none of the tests specified in -Dtest=... are run. Defaults to \'true\'.", 3 );
 184  0
                 append( sb, "Expression: ${surefire.failIfNoSpecifiedTests}", 3 );
 185  0
                 append( sb, "", 0 );
 186  
 
 187  0
                 append( sb, "failIfNoTests", 2 );
 188  0
                 append( sb, "Set this to \'true\' to cause a failure if there are no tests to run. Defaults to \'false\'.", 3 );
 189  0
                 append( sb, "Expression: ${failIfNoTests}", 3 );
 190  0
                 append( sb, "", 0 );
 191  
 
 192  0
                 append( sb, "forkedProcessTimeoutInSeconds", 2 );
 193  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 );
 194  0
                 append( sb, "Expression: ${surefire.timeout}", 3 );
 195  0
                 append( sb, "", 0 );
 196  
 
 197  0
                 append( sb, "forkMode (Default: once)", 2 );
 198  0
                 append( sb, "Option to specify the forking mode. Can be \'never\', \'once\', \'always\' or \'perthread\'. \'none\' and \'pertest\' are also accepted for backwards compatibility. \'always\' forks for each test-class. \'perthread\' will create \'threadCount\' parallel forks.", 3 );
 199  0
                 append( sb, "Expression: ${forkMode}", 3 );
 200  0
                 append( sb, "", 0 );
 201  
 
 202  0
                 append( sb, "groups", 2 );
 203  0
                 append( sb, "(TestNG/JUnit47 provider with JUnit4.8+ 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.\nFor JUnit, this parameter forces the use of the 4.7 provider\nThis parameter is ignored if the suiteXmlFiles parameter is specified. .", 3 );
 204  0
                 append( sb, "Expression: ${groups}", 3 );
 205  0
                 append( sb, "", 0 );
 206  
 
 207  0
                 append( sb, "includes", 2 );
 208  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>**/Test*.java</include>\n\u00a0<include>**/*Test.java</include>\n\u00a0<include>**/*TestCase.java</include>\n</includes>\nThis parameter is ignored if the TestNG suiteXmlFiles parameter is specified.", 3 );
 209  0
                 append( sb, "", 0 );
 210  
 
 211  0
                 append( sb, "junitArtifactName (Default: junit:junit)", 2 );
 212  0
                 append( sb, "Allows you to specify the name of the JUnit artifact. If not set, junit:junit will be used.", 3 );
 213  0
                 append( sb, "Expression: ${junitArtifactName}", 3 );
 214  0
                 append( sb, "", 0 );
 215  
 
 216  0
                 append( sb, "jvm", 2 );
 217  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 );
 218  0
                 append( sb, "Expression: ${jvm}", 3 );
 219  0
                 append( sb, "", 0 );
 220  
 
 221  0
                 append( sb, "objectFactory", 2 );
 222  0
                 append( sb, "(TestNG only) Define the factory class used to create all test instances.", 3 );
 223  0
                 append( sb, "Expression: ${objectFactory}", 3 );
 224  0
                 append( sb, "", 0 );
 225  
 
 226  0
                 append( sb, "parallel", 2 );
 227  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 );
 228  0
                 append( sb, "Expression: ${parallel}", 3 );
 229  0
                 append( sb, "", 0 );
 230  
 
 231  0
                 append( sb, "perCoreThreadCount (Default: true)", 2 );
 232  0
                 append( sb, "(JUnit 4.7 provider) Indicates that threadCount is per cpu core.", 3 );
 233  0
                 append( sb, "Expression: ${perCoreThreadCount}", 3 );
 234  0
                 append( sb, "", 0 );
 235  
 
 236  0
                 append( sb, "printSummary (Default: true)", 2 );
 237  0
                 append( sb, "Option to print summary of test suites or just print the test cases that have errors.", 3 );
 238  0
                 append( sb, "Expression: ${surefire.printSummary}", 3 );
 239  0
                 append( sb, "", 0 );
 240  
 
 241  0
                 append( sb, "properties", 2 );
 242  0
                 append( sb, "List of properties for configuring all TestNG related configurations. This is the new preferred method of configuring TestNG.", 3 );
 243  0
                 append( sb, "", 0 );
 244  
 
 245  0
                 append( sb, "redirectTestOutputToFile (Default: false)", 2 );
 246  0
                 append( sb, "Set this to \'true\' to redirect the unit test standard output to a file (found in reportsDirectory/testName-output.txt).", 3 );
 247  0
                 append( sb, "Expression: ${maven.test.redirectTestOutputToFile}", 3 );
 248  0
                 append( sb, "", 0 );
 249  
 
 250  0
                 append( sb, "remoteRepositories", 2 );
 251  0
                 append( sb, "The remote plugin repositories declared in the POM.", 3 );
 252  0
                 append( sb, "Expression: ${project.pluginArtifactRepositories}", 3 );
 253  0
                 append( sb, "", 0 );
 254  
 
 255  0
                 append( sb, "reportFormat (Default: brief)", 2 );
 256  0
                 append( sb, "Selects the formatting for the test report to be generated. Can be set as \'brief\' or \'plain\'.", 3 );
 257  0
                 append( sb, "Expression: ${surefire.reportFormat}", 3 );
 258  0
                 append( sb, "", 0 );
 259  
 
 260  0
                 append( sb, "reportNameSuffix", 2 );
 261  0
                 append( sb, "Add custom text into report filename: TEST-testClassName-reportNameSuffix.xml, testClassName-reportNameSuffix.txt and testClassName-reportNameSuffix-output.txt. File TEST-testClassName-reportNameSuffix.xml has changed attributes \'testsuite\'--\'name\' and \'testcase\'--\'classname\' - reportNameSuffix is added to the attribute value.", 3 );
 262  0
                 append( sb, "Expression: ${surefire.reportNameSuffix}", 3 );
 263  0
                 append( sb, "", 0 );
 264  
 
 265  0
                 append( sb, "reportsDirectory (Default: ${project.build.directory}/surefire-reports)", 2 );
 266  0
                 append( sb, "Base directory where all reports are written to.", 3 );
 267  0
                 append( sb, "", 0 );
 268  
 
 269  0
                 append( sb, "runOrder (Default: filesystem)", 2 );
 270  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), \'failedfirst\', \'balanced\' 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. Failed first will run tests that failed on previous run first, as well as new tests for this run. Balanced is only relevant with parallel=classes, and will try to optimize the run-order of the tests to make all tests complete at the same time, reducing the overall execution time. Note that the statistics are stored in a file named .surefire-XXXXXXXXX beside pom.xml, and should not be checked into version control. The \'XXXXX\' is the SHA1 checksum of the entire surefire configuration, so different configurations will have different statistics files, meaning if you change any config settings you will re-run once before new statistics data can be established.", 3 );
 271  0
                 append( sb, "", 0 );
 272  
 
 273  0
                 append( sb, "skip (Default: false)", 2 );
 274  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 );
 275  0
                 append( sb, "Expression: ${maven.test.skip}", 3 );
 276  0
                 append( sb, "", 0 );
 277  
 
 278  0
                 append( sb, "skipExec", 2 );
 279  0
                 append( sb, "Deprecated. Use skipTests instead.", 3 );
 280  0
                 append( sb, "", 0 );
 281  0
                 append( sb, "This old parameter is just like skipTests, but bound to the old property \'maven.test.skip.exec\'.", 3 );
 282  0
                 append( sb, "Expression: ${maven.test.skip.exec}", 3 );
 283  0
                 append( sb, "", 0 );
 284  
 
 285  0
                 append( sb, "skipTests (Default: false)", 2 );
 286  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 );
 287  0
                 append( sb, "Expression: ${skipTests}", 3 );
 288  0
                 append( sb, "", 0 );
 289  
 
 290  0
                 append( sb, "suiteXmlFiles", 2 );
 291  0
                 append( sb, "(TestNG) 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 );
 292  0
                 append( sb, "", 0 );
 293  
 
 294  0
                 append( sb, "systemProperties", 2 );
 295  0
                 append( sb, "Deprecated. Use systemPropertyVariables instead.", 3 );
 296  0
                 append( sb, "", 0 );
 297  0
                 append( sb, "List of System properties to pass to the JUnit tests.", 3 );
 298  0
                 append( sb, "", 0 );
 299  
 
 300  0
                 append( sb, "systemPropertiesFile", 2 );
 301  0
                 append( sb, "List of System properties, loaded from a file, to pass to the JUnit tests.", 3 );
 302  0
                 append( sb, "", 0 );
 303  
 
 304  0
                 append( sb, "systemPropertyVariables", 2 );
 305  0
                 append( sb, "List of System properties to pass to the JUnit tests.", 3 );
 306  0
                 append( sb, "", 0 );
 307  
 
 308  0
                 append( sb, "test", 2 );
 309  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 \'-Dtest=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 methods in the test by adding #myMethod or #my*ethod. For example, \'-Dtest=MyTest#myMethod\'. This is supported for junit 4.x and testNg.", 3 );
 310  0
                 append( sb, "Expression: ${test}", 3 );
 311  0
                 append( sb, "", 0 );
 312  
 
 313  0
                 append( sb, "testClassesDirectory (Default: ${project.build.testOutputDirectory})", 2 );
 314  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 );
 315  0
                 append( sb, "", 0 );
 316  
 
 317  0
                 append( sb, "testFailureIgnore (Default: false)", 2 );
 318  0
                 append( sb, "Set this to \'true\' to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on occasion.", 3 );
 319  0
                 append( sb, "Expression: ${maven.test.failure.ignore}", 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, "(forkMode=perthread or TestNG/JUnit 4.7 provider) 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. (forkMode=perthread does not support/require 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: ${surefire.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: ${surefire.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: ${surefire.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 ( getLog().isInfoEnabled() )
 370  
         {
 371  0
             getLog().info( sb.toString() );
 372  
         }
 373  0
     }
 374  
 
 375  
     /**
 376  
      * <p>Repeat a String <code>n</code> times to form a new string.</p>
 377  
      *
 378  
      * @param str String to repeat
 379  
      * @param repeat number of times to repeat str
 380  
      * @return String with repeated String
 381  
      * @throws NegativeArraySizeException if <code>repeat < 0</code>
 382  
      * @throws NullPointerException if str is <code>null</code>
 383  
      */
 384  
     private static String repeat( String str, int repeat )
 385  
     {
 386  0
         StringBuffer buffer = new StringBuffer( repeat * str.length() );
 387  
 
 388  0
         for ( int i = 0; i < repeat; i++ )
 389  
         {
 390  0
             buffer.append( str );
 391  
         }
 392  
 
 393  0
         return buffer.toString();
 394  
     }
 395  
 
 396  
     /** 
 397  
      * Append a description to the buffer by respecting the indentSize and lineLength parameters.
 398  
      * <b>Note</b>: The last character is always a new line.
 399  
      * 
 400  
      * @param sb The buffer to append the description, not <code>null</code>.
 401  
      * @param description The description, not <code>null</code>.
 402  
      * @param indent The base indentation level of each line, must not be negative.
 403  
      */
 404  
     private void append( StringBuffer sb, String description, int indent )
 405  
     {
 406  0
         for ( Iterator it = toLines( description, indent, indentSize, lineLength ).iterator(); it.hasNext(); )
 407  
         {
 408  0
             sb.append( it.next().toString() ).append( '\n' );
 409  
         }
 410  0
     }
 411  
 
 412  
     /** 
 413  
      * Splits the specified text into lines of convenient display length.
 414  
      * 
 415  
      * @param text The text to split into lines, must not be <code>null</code>.
 416  
      * @param indent The base indentation level of each line, must not be negative.
 417  
      * @param indentSize The size of each indentation, must not be negative.
 418  
      * @param lineLength The length of the line, must not be negative.
 419  
      * @return The sequence of display lines, never <code>null</code>.
 420  
      * @throws NegativeArraySizeException if <code>indent < 0</code>
 421  
      */
 422  
     private static List toLines( String text, int indent, int indentSize, int lineLength )
 423  
     {
 424  0
         List<String> lines = new ArrayList<String>();
 425  
 
 426  0
         String ind = repeat( "\t", indent );
 427  0
         String[] plainLines = text.split( "(\r\n)|(\r)|(\n)" );
 428  0
         for ( int i = 0; i < plainLines.length; i++ )
 429  
         {
 430  0
             toLines( lines, ind + plainLines[i], indentSize, lineLength );
 431  
         }
 432  
 
 433  0
         return lines;
 434  
     }
 435  
 
 436  
     /** 
 437  
      * Adds the specified line to the output sequence, performing line wrapping if necessary.
 438  
      * 
 439  
      * @param lines The sequence of display lines, must not be <code>null</code>.
 440  
      * @param line The line to add, must not be <code>null</code>.
 441  
      * @param indentSize The size of each indentation, must not be negative.
 442  
      * @param lineLength The length of the line, must not be negative.
 443  
      */
 444  
     private static void toLines( List<String> lines, String line, int indentSize, int lineLength )
 445  
     {
 446  0
         int lineIndent = getIndentLevel( line );
 447  0
         StringBuffer buf = new StringBuffer( 256 );
 448  0
         String[] tokens = line.split( " +" );
 449  0
         for ( int i = 0; i < tokens.length; i++ )
 450  
         {
 451  0
             String token = tokens[i];
 452  0
             if ( i > 0 )
 453  
             {
 454  0
                 if ( buf.length() + token.length() >= lineLength )
 455  
                 {
 456  0
                     lines.add( buf.toString() );
 457  0
                     buf.setLength( 0 );
 458  0
                     buf.append( repeat( " ", lineIndent * indentSize ) );
 459  
                 }
 460  
                 else
 461  
                 {
 462  0
                     buf.append( ' ' );
 463  
                 }
 464  
             }
 465  0
             for ( int j = 0; j < token.length(); j++ )
 466  
             {
 467  0
                 char c = token.charAt( j );
 468  0
                 if ( c == '\t' )
 469  
                 {
 470  0
                     buf.append( repeat( " ", indentSize - buf.length() % indentSize ) );
 471  
                 }
 472  0
                 else if ( c == '\u00A0' )
 473  
                 {
 474  0
                     buf.append( ' ' );
 475  
                 }
 476  
                 else
 477  
                 {
 478  0
                     buf.append( c );
 479  
                 }
 480  
             }
 481  
         }
 482  0
         lines.add( buf.toString() );
 483  0
     }
 484  
 
 485  
     /** 
 486  
      * Gets the indentation level of the specified line.
 487  
      * 
 488  
      * @param line The line whose indentation level should be retrieved, must not be <code>null</code>.
 489  
      * @return The indentation level of the line.
 490  
      */
 491  
     private static int getIndentLevel( String line )
 492  
     {
 493  0
         int level = 0;
 494  0
         for ( int i = 0; i < line.length() && line.charAt( i ) == '\t'; i++ )
 495  
         {
 496  0
             level++;
 497  
         }
 498  0
         for ( int i = level + 1; i <= level + 4 && i < line.length(); i++ )
 499  
         {
 500  0
             if ( line.charAt( i ) == '\t' )
 501  
             {
 502  0
                 level++;
 503  0
                 break;
 504  
             }
 505  
         }
 506  0
         return level;
 507  
     }
 508  
 }