View Javadoc

1   package org.apache.maven.plugin.surefire;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *     http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import org.apache.maven.artifact.factory.ArtifactFactory;
23  import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
24  import org.apache.maven.artifact.repository.ArtifactRepository;
25  import org.apache.maven.artifact.resolver.ArtifactResolver;
26  import org.apache.maven.execution.MavenSession;
27  import org.apache.maven.plugin.MojoExecutionException;
28  import org.apache.maven.plugin.MojoFailureException;
29  import org.apache.maven.plugin.surefire.booterclient.ForkConfiguration;
30  import org.apache.maven.plugin.surefire.booterclient.ForkStarter;
31  import org.apache.maven.project.MavenProject;
32  import org.apache.maven.surefire.booter.ClassLoaderConfiguration;
33  import org.apache.maven.surefire.booter.SurefireBooterForkException;
34  import org.apache.maven.surefire.booter.SurefireExecutionException;
35  import org.apache.maven.toolchain.ToolchainManager;
36  
37  import java.io.File;
38  import java.util.HashMap;
39  import java.util.Iterator;
40  import java.util.List;
41  import java.util.Map;
42  import java.util.Properties;
43  
44  /**
45   * Run tests using Surefire.
46   *
47   * @author Jason van Zyl
48   * @version $Id: SurefirePlugin.java 1051648 2010-12-21 20:55:12Z krosenvold $
49   * @requiresDependencyResolution test
50   * @goal test
51   * @phase test
52   * @threadSafe
53   * @noinspection JavaDoc
54   */
55  public class SurefirePlugin
56      extends AbstractSurefireMojo
57      implements SurefireExecutionParameters, SurefireReportParameters
58  {
59  
60      /**
61       * Set this to 'true' to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite
62       * convenient on occasion.
63       *
64       * @parameter default-value="false" expression="${skipTests}"
65       * @since 2.4
66       */
67      private boolean skipTests;
68  
69      /**
70       * This old parameter is just like skipTests, but bound to the old property maven.test.skip.exec.
71       *
72       * @parameter expression="${maven.test.skip.exec}"
73       * @since 2.3
74       * @deprecated Use -DskipTests instead.
75       */
76      private boolean skipExec;
77  
78      /**
79       * Set this to 'true' to bypass unit tests entirely. Its use is NOT RECOMMENDED, especially if you
80       * enable it using the "maven.test.skip" property, because maven.test.skip disables both running the
81       * tests and compiling the tests.  Consider using the skipTests parameter instead.
82       *
83       * @parameter default-value="false" expression="${maven.test.skip}"
84       */
85      private boolean skip;
86  
87      /**
88       * Set this to true to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on
89       * occasion.
90       *
91       * @parameter default-value="false" expression="${maven.test.failure.ignore}"
92       */
93      private boolean testFailureIgnore;
94  
95      /**
96       * The base directory of the project being tested. This can be obtained in your unit test by
97       * System.getProperty("basedir").
98       *
99       * @parameter default-value="${basedir}"
100      */
101     private File basedir;
102 
103     /**
104      * The directory containing generated test classes of the project being tested.
105      * This will be included at the beginning the test classpath.
106      *
107      * @parameter default-value="${project.build.testOutputDirectory}"
108      */
109     private File testClassesDirectory;
110 
111     /**
112      * The directory containing generated classes of the project being tested.
113      * This will be included after the test classes in the test classpath.
114      *
115      * @parameter default-value="${project.build.outputDirectory}"
116      */
117     private File classesDirectory;
118 
119     /**
120      * The Maven Project Object
121      *
122      * @parameter default-value="${project}"
123      * @readonly
124      */
125     private MavenProject project;
126 
127     /**
128      * List of dependencies to exclude from the test classpath.
129      * Each dependency string must follow the format <i>groupId:artifactId</i>.
130      * For example: <i>org.acme:project-a</i>
131      *
132      * @parameter
133      * @since 2.6
134      */
135     private List classpathDependencyExcludes;
136 
137     /**
138      * A dependency scope to exclude from the test classpath
139      * The scope can be one of the following scopes:
140      * <p/>
141      * <ul><li><i>compile</i> - system, provided, compile
142      * <li><i>runtime</i> - compile, runtime
143      * <li><i>test</i> - system, provided, compile, runtime, test</ul>
144      *
145      * @parameter default-value=""
146      * @since 2.6
147      */
148     private String classpathDependencyScopeExclude;
149 
150     /**
151      * Additional elements to be appended to the classpath.
152      *
153      * @parameter
154      * @since 2.4
155      */
156     private List additionalClasspathElements;
157 
158     /**
159      * Base directory where all reports are written to.
160      *
161      * @parameter default-value="${project.build.directory}/surefire-reports"
162      */
163     private File reportsDirectory;
164 
165     /**
166      * The test source directory containing test class sources.
167      *
168      * @parameter default-value="${project.build.testSourceDirectory}"
169      * @required
170      * @since 2.2
171      */
172     private File testSourceDirectory;
173 
174     /**
175      * Specify this parameter to run individual tests by file name, overriding the <code>includes/excludes</code>
176      * parameters.  Each pattern you specify here will be used to create an
177      * include pattern formatted like <code>**&#47;${test}.java</code>, so you can just type "-Dtest=MyTest"
178      * to run a single test called "foo/MyTest.java".  This parameter will override the TestNG suiteXmlFiles
179      * parameter.
180      *
181      * @parameter expression="${test}"
182      */
183     private String test;
184 
185     /**
186      * A list of &lt;include> elements used to specify the the tests that should be included in testing. When not
187      * specified and when the <code>test</code> parameter is not specified, the default includes will be
188      * <code><br/>
189         &lt;includes><br/>
190             &nbsp;&lt;include>**&#47;Test*.java&lt;/include><br/>
191             &nbsp;&lt;include>**&#47;*Test.java&lt;/include><br/>
192             &nbsp;&lt;include>**&#47;*TestCase.java&lt;/include><br/>
193         &lt;/includes><br/>
194      * </code>
195      * This parameter is ignored if TestNG suiteXmlFiles are specified.
196      *
197      * @parameter
198      */
199     private List includes;
200 
201     /**
202      * List of patterns (separated by commas) used to specify the tests that should be excluded in testing. When not
203      * specified and when the <code>test</code> parameter is not specified, the default excludes will be
204      * <code><br/>
205         &lt;excludes><br/>
206             &nbsp;&lt;exclude>**&#47;*$*&lt;/exclude><br/>
207         &lt;/excludes><br/>
208      * </code>
209      * (which excludes all inner classes).  This parameter is ignored if TestNG suiteXmlFiles are specified.
210      *
211      * @parameter
212      */
213     private List excludes;
214 
215     /**
216      * ArtifactRepository of the localRepository. To obtain the directory of localRepository in unit tests use
217      * System.setProperty( "localRepository").
218      *
219      * @parameter expression="${localRepository}"
220      * @required
221      * @readonly
222      */
223     private ArtifactRepository localRepository;
224 
225     /**
226      * List of System properties to pass to the JUnit tests.
227      *
228      * @parameter
229      * @deprecated Use systemPropertyVariables instead.
230      */
231     private Properties systemProperties;
232 
233     /**
234      * List of System properties to pass to the JUnit tests.
235      *
236      * @parameter
237      * @since 2.5
238      */
239     private Map systemPropertyVariables;
240 
241     /**
242      * List of properties for configuring all TestNG related configurations. This is the new
243      * preferred method of configuring TestNG.
244      *
245      * @parameter
246      * @since 2.4
247      */
248     private Properties properties;
249 
250     /**
251      * Map of of plugin artifacts.
252      *
253      * @parameter expression="${plugin.artifactMap}"
254      * @required
255      * @readonly
256      */
257     private Map pluginArtifactMap;
258 
259     /**
260      * Map of of project artifacts.
261      *
262      * @parameter expression="${project.artifactMap}"
263      * @required
264      * @readonly
265      */
266     private Map projectArtifactMap;
267 
268     /**
269      * Option to print summary of test suites or just print the test cases that has errors.
270      *
271      * @parameter expression="${surefire.printSummary}" default-value="true"
272      */
273     private boolean printSummary;
274 
275     /**
276      * Selects the formatting for the test report to be generated. Can be set as brief or plain.
277      *
278      * @parameter expression="${surefire.reportFormat}" default-value="brief"
279      */
280     private String reportFormat;
281 
282     /**
283      * Option to generate a file test report or just output the test report to the console.
284      *
285      * @parameter expression="${surefire.useFile}" default-value="true"
286      */
287     private boolean useFile;
288 
289     /**
290      * When forking, set this to true to redirect the unit test standard output to a file (found in
291      * reportsDirectory/testName-output.txt).
292      *
293      * @parameter expression="${maven.test.redirectTestOutputToFile}" default-value="false"
294      * @since 2.3
295      */
296     private boolean redirectTestOutputToFile;
297 
298     /**
299      * Set this to "true" to cause a failure if there are no tests to run.
300      *
301      * @parameter expression="${failIfNoTests}"
302      * @since 2.4
303      */
304     private Boolean failIfNoTests;
305 
306     /**
307      * Option to specify the forking mode. Can be "never", "once" or "always". "none" and "pertest" are also accepted
308      * for backwards compatibility.
309      *
310      * @parameter expression="${forkMode}" default-value="once"
311      * @since 2.1
312      */
313     private String forkMode;
314 
315     /**
316      * Option to specify the jvm (or path to the java executable) to use with the forking options. For the default, the
317      * jvm will be a new instance of the same VM as the one used to run Maven. JVM settings are not inherited from
318      * MAVEN_OPTS
319      *
320      * @parameter expression="${jvm}"
321      * @since 2.1
322      */
323     private String jvm;
324 
325     /**
326      * Arbitrary JVM options to set on the command line.
327      *
328      * @parameter expression="${argLine}"
329      * @since 2.1
330      */
331     private String argLine;
332 
333     /**
334      * Attach a debugger to the forked JVM.  If set to "true", the process will suspend and
335      * wait for a debugger to attach on port 5005.  If set to some other string, that
336      * string will be appended to the argLine, allowing you to configure arbitrary
337      * debuggability options (without overwriting the other options specified in the argLine).
338      *
339      * @parameter expression="${maven.surefire.debug}"
340      * @since 2.4
341      */
342     private String debugForkedProcess;
343 
344     /**
345      * Kill the forked test process after a certain number of seconds.  If set to 0,
346      * wait forever for the process, never timing out.
347      *
348      * @parameter expression="${surefire.timeout}"
349      * @since 2.4
350      */
351     private int forkedProcessTimeoutInSeconds;
352 
353     /**
354      * Additional environments to set on the command line.
355      *
356      * @parameter
357      * @since 2.1.3
358      */
359     private Map environmentVariables = new HashMap();
360 
361     /**
362      * Command line working directory.
363      *
364      * @parameter expression="${basedir}"
365      * @since 2.1.3
366      */
367     private File workingDirectory;
368 
369     /**
370      * When false it makes tests run using the standard classloader delegation instead of the default Maven isolated
371      * classloader. Only used when forking (forkMode is not "none").<br/> Setting it to false helps with some problems
372      * caused by conflicts between xml parsers in the classpath and the Java 5 provider parser.
373      *
374      * @parameter expression="${childDelegation}" default-value="false"
375      * @since 2.1
376      */
377     private boolean childDelegation;
378 
379     /**
380      * (TestNG only) Groups for this test. Only classes/methods/etc decorated with one of the groups specified here will be included
381      * in test run, if specified.  This parameter is overridden if suiteXmlFiles are specified.
382      *
383      * @parameter expression="${groups}"
384      * @since 2.2
385      */
386     private String groups;
387 
388     /**
389      * (TestNG only) Excluded groups. Any methods/classes/etc with one of the groups specified in this list will specifically not be
390      * run.  This parameter is overridden if suiteXmlFiles are specified.
391      *
392      * @parameter expression="${excludedGroups}"
393      * @since 2.2
394      */
395     private String excludedGroups;
396 
397     /**
398      * (TestNG only) List of TestNG suite xml file locations, seperated by commas. Note that suiteXmlFiles is incompatible
399      * with several other parameters on this plugin, like includes/excludes.  This parameter is ignored if
400      * the "test" parameter is specified (allowing you to run a single test instead of an entire suite).
401      *
402      * @parameter
403      * @since 2.2
404      */
405     private File[] suiteXmlFiles;
406 
407     /**
408      * Allows you to specify the name of the JUnit artifact. If not set, <code>junit:junit</code> will be used.
409      *
410      * @parameter expression="${junitArtifactName}" default-value="junit:junit"
411      * @since 2.3.1
412      */
413     private String junitArtifactName;
414 
415     /**
416      * Allows you to specify the name of the TestNG artifact. If not set, <code>org.testng:testng</code> will be used.
417      *
418      * @parameter expression="${testNGArtifactName}" default-value="org.testng:testng"
419      * @since 2.3.1
420      */
421     private String testNGArtifactName;
422 
423     /**
424      * (TestNG/JUnit 4.7 provider only) The attribute thread-count allows you to specify how many threads should be allocated for this execution. Only
425      * makes sense to use in conjunction with parallel.
426      *
427      * @parameter expression="${threadCount}"
428      * @since 2.2
429      */
430     private int threadCount;
431 
432     /**
433      * (JUnit 4.7 provider) Indicates that threadCount is per cpu core. Defaults to true
434      *
435      * @parameter expression="${perCoreThreadCount}"
436      * @since 2.5
437      */
438     private String perCoreThreadCount;
439 
440     /**
441      * (JUnit 4.7 provider) Indicates that the thread pool will be unlimited. The parallel parameter and the actual number of classes/methods
442      * will decide. Setting this to true effectively disables perCoreThreadCount and threadCount.
443      *
444      * @parameter expression="${useUnlimitedThreads}"
445      * @since 2.5
446      */
447     private String useUnlimitedThreads;
448 
449     /**
450      * (TestNG only) When you use the parallel attribute, TestNG will try to run all your test methods in separate threads, except for
451      * methods that depend on each other, which will be run in the same thread in order to respect their order of
452      * execution.
453      * <p/>
454      * (JUnit 4.7 provider) Supports values classes/methods/both to run in separate threads, as controlled by threadCount.
455      *
456      * @parameter expression="${parallel}"
457      * @since 2.2
458      */
459     private String parallel;
460 
461     /**
462      * Whether to trim the stack trace in the reports to just the lines within the test, or show the full trace.
463      *
464      * @parameter expression="${trimStackTrace}" default-value="true"
465      * @since 2.2
466      */
467     private boolean trimStackTrace;
468 
469     /**
470      * Resolves the artifacts needed.
471      *
472      * @component
473      */
474     private ArtifactResolver artifactResolver;
475 
476     /**
477      * Creates the artifact
478      *
479      * @component
480      */
481     private ArtifactFactory artifactFactory;
482 
483     /**
484      * The plugin remote repositories declared in the POM.
485      *
486      * @parameter expression="${project.pluginArtifactRepositories}"
487      * @since 2.2
488      */
489     private List remoteRepositories;
490 
491     /**
492      * For retrieval of artifact's metadata.
493      *
494      * @component
495      */
496     private ArtifactMetadataSource metadataSource;
497 
498     private Properties originalSystemProperties;
499 
500     /**
501      * systemPropertyVariables + systemProperties
502      */
503     private Properties internalSystemProperties = new Properties();
504 
505     /**
506      * Flag to disable the generation of report files in xml format.
507      *
508      * @parameter expression="${disableXmlReport}" default-value="false"
509      * @since 2.2
510      */
511     private boolean disableXmlReport;
512 
513     /**
514      * Option to pass dependencies to the system's classloader instead of using an isolated class loader when forking.
515      * Prevents problems with JDKs which implement the service provider lookup mechanism by using the system's
516      * classloader.  Default value is "true".
517      *
518      * @parameter expression="${surefire.useSystemClassLoader}"
519      * @since 2.3
520      */
521     private Boolean useSystemClassLoader;
522 
523     /**
524      * By default, Surefire forks your tests using a manifest-only JAR; set this parameter
525      * to "false" to force it to launch your tests with a plain old Java classpath.
526      * (See http://maven.apache.org/plugins/maven-surefire-plugin/examples/class-loading.html
527      * for a more detailed explanation of manifest-only JARs and their benefits.)
528      * <p/>
529      * Beware, setting this to "false" may cause your tests to
530      * fail on Windows if your classpath is too long.
531      *
532      * @parameter expression="${surefire.useManifestOnlyJar}" default-value="true"
533      * @since 2.4.3
534      */
535     private boolean useManifestOnlyJar;
536 
537     /**
538      * By default, Surefire enables JVM assertions for the execution of your test cases. To disable the assertions, set
539      * this flag to <code>false</code>.
540      *
541      * @parameter expression="${enableAssertions}" default-value="true"
542      * @since 2.3.1
543      */
544     private boolean enableAssertions;
545 
546     /**
547      * The current build session instance.
548      *
549      * @parameter expression="${session}"
550      * @required
551      * @readonly
552      */
553     private MavenSession session;
554 
555     /**
556      * (TestNG only) Define the factory class used to create all test instances
557      *
558      * @parameter expression="${objectFactory}"
559      * @since 2.5
560      */
561     private String objectFactory;
562 
563 
564     /**
565      * @parameter default-value="${session.parallel}"   '
566      * @readonly
567      * @noinspection UnusedDeclaration
568      */
569     private Boolean parallelMavenExecution;
570 
571     /**
572      * Defines the order the tests will be run in. Supported values are alphabetical, reversealphabetical
573      * random, hourly (alphabetical on even hours, reverse alphabetical on odd hours) and filesystem.<p/>
574      * Not supplying a value for this setting will run tests in filesystem order. <p/>
575      * Odd/Even for hourly is determined at the time the of scanning the classpath, meaning it could change during
576      * a multi-module build.
577      *
578      * @parameter
579      * @since 2.7
580      */
581     private String runOrder;
582 
583     /**
584      * @component
585      */
586     private ToolchainManager toolchainManager;
587 
588     public void execute()
589         throws MojoExecutionException, MojoFailureException
590     {
591         if ( verifyParameters() )
592         {
593             logReportsDirectory();
594 
595             final List providers = initialize();
596             Exception exception = null;
597             ForkConfiguration forkConfiguration = null;
598             int result = 0;
599             for ( Iterator iter = providers.iterator(); iter.hasNext(); )
600             {
601                 ProviderInfo provider = (ProviderInfo) iter.next();
602                 forkConfiguration = getForkConfiguration();
603                 ClassLoaderConfiguration classLoaderConfiguration = getClassLoaderConfiguration( forkConfiguration );
604                 ForkStarter forkStarter = createForkStarter( provider, forkConfiguration, classLoaderConfiguration );
605 
606                 try
607                 {
608                     result = forkStarter.run();
609                 }
610                 catch ( SurefireBooterForkException e )
611                 {
612                     exception = e;
613                 }
614                 catch ( SurefireExecutionException e )
615                 {
616                     exception = e;
617                 }
618             }
619 
620             if ( exception != null )
621             {
622                 throw new MojoExecutionException( exception.getMessage(), exception );
623             }
624 
625             if ( getOriginalSystemProperties() != null && forkConfiguration != null && !forkConfiguration.isForking() )
626             {
627                 // restore system properties, only makes sense when not forking..
628                 System.setProperties( getOriginalSystemProperties() );
629             }
630 
631             SurefireHelper.reportExecution( this, result, getLog() );
632         }
633     }
634 
635     protected boolean verifyParameters()
636         throws MojoFailureException
637     {
638         if ( isSkip() || isSkipTests() || isSkipExec() )
639         {
640             getLog().info( "Tests are skipped." );
641             return false;
642         }
643 
644         if ( !getTestClassesDirectory().exists() )
645         {
646             if ( getFailIfNoTests() != null && getFailIfNoTests().booleanValue() )
647             {
648                 throw new MojoFailureException( "No tests to run!" );
649             }
650             getLog().info( "No tests to run." );
651             return true;
652         }
653 
654         ensureWorkingDirectoryExists();
655 
656         ensureParallelRunningCompatibility();
657 
658         warnIfUselessUseSystemClassLoaderParameter();
659 
660         return true;
661     }
662 
663     protected String getPluginName()
664     {
665         return "surefire";
666     }
667 
668     protected String[] getDefaultIncludes()
669     {
670         return new String[]{ "**/Test*.java", "**/*Test.java", "**/*TestCase.java" };
671     }
672 
673     // now for the implementation of the field accessors
674 
675     public boolean isSkipTests()
676     {
677         return skipTests;
678     }
679 
680 
681     public void setSkipTests( boolean skipTests )
682     {
683         this.skipTests = skipTests;
684     }
685 
686     /** @noinspection deprecation*/
687     public boolean isSkipExec()
688     {
689         return skipExec;
690     }
691 
692     /** @noinspection deprecation*/
693     public void setSkipExec( boolean skipExec )
694     {
695         this.skipExec = skipExec;
696     }
697 
698     public boolean isSkip()
699     {
700         return skip;
701     }
702 
703     public void setSkip( boolean skip )
704     {
705         this.skip = skip;
706     }
707 
708     public boolean isTestFailureIgnore()
709     {
710         return testFailureIgnore;
711     }
712 
713     public void setTestFailureIgnore( boolean testFailureIgnore )
714     {
715         this.testFailureIgnore = testFailureIgnore;
716     }
717 
718     public File getBasedir()
719     {
720         return basedir;
721     }
722 
723     public void setBasedir( File basedir )
724     {
725         this.basedir = basedir;
726     }
727 
728     public File getTestClassesDirectory()
729     {
730         return testClassesDirectory;
731     }
732 
733     public void setTestClassesDirectory( File testClassesDirectory )
734     {
735         this.testClassesDirectory = testClassesDirectory;
736     }
737 
738     public File getClassesDirectory()
739     {
740         return classesDirectory;
741     }
742 
743     public void setClassesDirectory( File classesDirectory )
744     {
745         this.classesDirectory = classesDirectory;
746     }
747 
748     public MavenProject getProject()
749     {
750         return project;
751     }
752 
753     public void setProject( MavenProject project )
754     {
755         this.project = project;
756     }
757 
758     public List getClasspathDependencyExcludes()
759     {
760         return classpathDependencyExcludes;
761     }
762 
763     public void setClasspathDependencyExcludes( List classpathDependencyExcludes )
764     {
765         this.classpathDependencyExcludes = classpathDependencyExcludes;
766     }
767 
768     public String getClasspathDependencyScopeExclude()
769     {
770         return classpathDependencyScopeExclude;
771     }
772 
773     public void setClasspathDependencyScopeExclude( String classpathDependencyScopeExclude )
774     {
775         this.classpathDependencyScopeExclude = classpathDependencyScopeExclude;
776     }
777 
778     public List getAdditionalClasspathElements()
779     {
780         return additionalClasspathElements;
781     }
782 
783     public void setAdditionalClasspathElements( List additionalClasspathElements )
784     {
785         this.additionalClasspathElements = additionalClasspathElements;
786     }
787 
788     public File getReportsDirectory()
789     {
790         return reportsDirectory;
791     }
792 
793     public void setReportsDirectory( File reportsDirectory )
794     {
795         this.reportsDirectory = reportsDirectory;
796     }
797 
798     public File getTestSourceDirectory()
799     {
800         return testSourceDirectory;
801     }
802 
803     public void setTestSourceDirectory( File testSourceDirectory )
804     {
805         this.testSourceDirectory = testSourceDirectory;
806     }
807 
808     public String getTest()
809     {
810         return test;
811     }
812 
813     public void setTest( String test )
814     {
815         this.test = test;
816     }
817 
818     public List getIncludes()
819     {
820         return includes;
821     }
822 
823     public void setIncludes( List includes )
824     {
825         this.includes = includes;
826     }
827 
828     public List getExcludes()
829     {
830         return excludes;
831     }
832 
833     public void setExcludes( List excludes )
834     {
835         this.excludes = excludes;
836     }
837 
838     public ArtifactRepository getLocalRepository()
839     {
840         return localRepository;
841     }
842 
843     public void setLocalRepository( ArtifactRepository localRepository )
844     {
845         this.localRepository = localRepository;
846     }
847 
848     /** @noinspection deprecation*/
849     public Properties getSystemProperties()
850     {
851         return systemProperties;
852     }
853 
854     /** @noinspection deprecation*/
855     public void setSystemProperties( Properties systemProperties )
856     {
857         this.systemProperties = systemProperties;
858     }
859 
860     public Map getSystemPropertyVariables()
861     {
862         return systemPropertyVariables;
863     }
864 
865     public void setSystemPropertyVariables( Map systemPropertyVariables )
866     {
867         this.systemPropertyVariables = systemPropertyVariables;
868     }
869 
870     public Properties getProperties()
871     {
872         return properties;
873     }
874 
875     public void setProperties( Properties properties )
876     {
877         this.properties = properties;
878     }
879 
880     public Map getPluginArtifactMap()
881     {
882         return pluginArtifactMap;
883     }
884 
885     public void setPluginArtifactMap( Map pluginArtifactMap )
886     {
887         this.pluginArtifactMap = pluginArtifactMap;
888     }
889 
890     public Map getProjectArtifactMap()
891     {
892         return projectArtifactMap;
893     }
894 
895     public void setProjectArtifactMap( Map projectArtifactMap )
896     {
897         this.projectArtifactMap = projectArtifactMap;
898     }
899 
900     public boolean isPrintSummary()
901     {
902         return printSummary;
903     }
904 
905     public void setPrintSummary( boolean printSummary )
906     {
907         this.printSummary = printSummary;
908     }
909 
910     public String getReportFormat()
911     {
912         return reportFormat;
913     }
914 
915     public void setReportFormat( String reportFormat )
916     {
917         this.reportFormat = reportFormat;
918     }
919 
920     public boolean isUseFile()
921     {
922         return useFile;
923     }
924 
925     public void setUseFile( boolean useFile )
926     {
927         this.useFile = useFile;
928     }
929 
930     public boolean isRedirectTestOutputToFile()
931     {
932         return redirectTestOutputToFile;
933     }
934 
935     public void setRedirectTestOutputToFile( boolean redirectTestOutputToFile )
936     {
937         this.redirectTestOutputToFile = redirectTestOutputToFile;
938     }
939 
940     public Boolean getFailIfNoTests()
941     {
942         return failIfNoTests;
943     }
944 
945     public void setFailIfNoTests( Boolean failIfNoTests )
946     {
947         this.failIfNoTests = failIfNoTests;
948     }
949 
950     public String getForkMode()
951     {
952         return forkMode;
953     }
954 
955     public void setForkMode( String forkMode )
956     {
957         this.forkMode = forkMode;
958     }
959 
960     public String getJvm()
961     {
962         return jvm;
963     }
964 
965     public void setJvm( String jvm )
966     {
967         this.jvm = jvm;
968     }
969 
970     public String getArgLine()
971     {
972         return argLine;
973     }
974 
975     public void setArgLine( String argLine )
976     {
977         this.argLine = argLine;
978     }
979 
980     public String getDebugForkedProcess()
981     {
982         return debugForkedProcess;
983     }
984 
985     public void setDebugForkedProcess( String debugForkedProcess )
986     {
987         this.debugForkedProcess = debugForkedProcess;
988     }
989 
990     public int getForkedProcessTimeoutInSeconds()
991     {
992         return forkedProcessTimeoutInSeconds;
993     }
994 
995     public void setForkedProcessTimeoutInSeconds( int forkedProcessTimeoutInSeconds )
996     {
997         this.forkedProcessTimeoutInSeconds = forkedProcessTimeoutInSeconds;
998     }
999 
1000     public Map getEnvironmentVariables()
1001     {
1002         return environmentVariables;
1003     }
1004 
1005     public void setEnvironmentVariables( Map environmentVariables )
1006     {
1007         this.environmentVariables = environmentVariables;
1008     }
1009 
1010     public File getWorkingDirectory()
1011     {
1012         return workingDirectory;
1013     }
1014 
1015     public void setWorkingDirectory( File workingDirectory )
1016     {
1017         this.workingDirectory = workingDirectory;
1018     }
1019 
1020     public boolean isChildDelegation()
1021     {
1022         return childDelegation;
1023     }
1024 
1025     public void setChildDelegation( boolean childDelegation )
1026     {
1027         this.childDelegation = childDelegation;
1028     }
1029 
1030     public String getGroups()
1031     {
1032         return groups;
1033     }
1034 
1035     public void setGroups( String groups )
1036     {
1037         this.groups = groups;
1038     }
1039 
1040     public String getExcludedGroups()
1041     {
1042         return excludedGroups;
1043     }
1044 
1045     public void setExcludedGroups( String excludedGroups )
1046     {
1047         this.excludedGroups = excludedGroups;
1048     }
1049 
1050     public File[] getSuiteXmlFiles()
1051     {
1052         return suiteXmlFiles;
1053     }
1054 
1055     public void setSuiteXmlFiles( File[] suiteXmlFiles )
1056     {
1057         this.suiteXmlFiles = suiteXmlFiles;
1058     }
1059 
1060     public String getJunitArtifactName()
1061     {
1062         return junitArtifactName;
1063     }
1064 
1065     public void setJunitArtifactName( String junitArtifactName )
1066     {
1067         this.junitArtifactName = junitArtifactName;
1068     }
1069 
1070     public String getTestNGArtifactName()
1071     {
1072         return testNGArtifactName;
1073     }
1074 
1075     public void setTestNGArtifactName( String testNGArtifactName )
1076     {
1077         this.testNGArtifactName = testNGArtifactName;
1078     }
1079 
1080     public int getThreadCount()
1081     {
1082         return threadCount;
1083     }
1084 
1085     public void setThreadCount( int threadCount )
1086     {
1087         this.threadCount = threadCount;
1088     }
1089 
1090     public String getPerCoreThreadCount()
1091     {
1092         return perCoreThreadCount;
1093     }
1094 
1095     public void setPerCoreThreadCount( String perCoreThreadCount )
1096     {
1097         this.perCoreThreadCount = perCoreThreadCount;
1098     }
1099 
1100     public String getUseUnlimitedThreads()
1101     {
1102         return useUnlimitedThreads;
1103     }
1104 
1105     public void setUseUnlimitedThreads( String useUnlimitedThreads )
1106     {
1107         this.useUnlimitedThreads = useUnlimitedThreads;
1108     }
1109 
1110     public String getParallel()
1111     {
1112         return parallel;
1113     }
1114 
1115     public void setParallel( String parallel )
1116     {
1117         this.parallel = parallel;
1118     }
1119 
1120     public boolean isTrimStackTrace()
1121     {
1122         return trimStackTrace;
1123     }
1124 
1125     public void setTrimStackTrace( boolean trimStackTrace )
1126     {
1127         this.trimStackTrace = trimStackTrace;
1128     }
1129 
1130     public ArtifactResolver getArtifactResolver()
1131     {
1132         return artifactResolver;
1133     }
1134 
1135     public void setArtifactResolver( ArtifactResolver artifactResolver )
1136     {
1137         this.artifactResolver = artifactResolver;
1138     }
1139 
1140     public ArtifactFactory getArtifactFactory()
1141     {
1142         return artifactFactory;
1143     }
1144 
1145     public void setArtifactFactory( ArtifactFactory artifactFactory )
1146     {
1147         this.artifactFactory = artifactFactory;
1148     }
1149 
1150     public List getRemoteRepositories()
1151     {
1152         return remoteRepositories;
1153     }
1154 
1155     public void setRemoteRepositories( List remoteRepositories )
1156     {
1157         this.remoteRepositories = remoteRepositories;
1158     }
1159 
1160     public ArtifactMetadataSource getMetadataSource()
1161     {
1162         return metadataSource;
1163     }
1164 
1165     public void setMetadataSource( ArtifactMetadataSource metadataSource )
1166     {
1167         this.metadataSource = metadataSource;
1168     }
1169 
1170     public Properties getOriginalSystemProperties()
1171     {
1172         return originalSystemProperties;
1173     }
1174 
1175     public void setOriginalSystemProperties( Properties originalSystemProperties )
1176     {
1177         this.originalSystemProperties = originalSystemProperties;
1178     }
1179 
1180     public Properties getInternalSystemProperties()
1181     {
1182         return internalSystemProperties;
1183     }
1184 
1185     public void setInternalSystemProperties( Properties internalSystemProperties )
1186     {
1187         this.internalSystemProperties = internalSystemProperties;
1188     }
1189 
1190     public boolean isDisableXmlReport()
1191     {
1192         return disableXmlReport;
1193     }
1194 
1195     public void setDisableXmlReport( boolean disableXmlReport )
1196     {
1197         this.disableXmlReport = disableXmlReport;
1198     }
1199 
1200     public Boolean getUseSystemClassLoader()
1201     {
1202         return useSystemClassLoader;
1203     }
1204 
1205     public void setUseSystemClassLoader( Boolean useSystemClassLoader )
1206     {
1207         this.useSystemClassLoader = useSystemClassLoader;
1208     }
1209 
1210     public boolean isUseManifestOnlyJar()
1211     {
1212         return useManifestOnlyJar;
1213     }
1214 
1215     public void setUseManifestOnlyJar( boolean useManifestOnlyJar )
1216     {
1217         this.useManifestOnlyJar = useManifestOnlyJar;
1218     }
1219 
1220     public boolean isEnableAssertions()
1221     {
1222         return enableAssertions;
1223     }
1224 
1225     public void setEnableAssertions( boolean enableAssertions )
1226     {
1227         this.enableAssertions = enableAssertions;
1228     }
1229 
1230     public MavenSession getSession()
1231     {
1232         return session;
1233     }
1234 
1235     public void setSession( MavenSession session )
1236     {
1237         this.session = session;
1238     }
1239 
1240     public String getObjectFactory()
1241     {
1242         return objectFactory;
1243     }
1244 
1245     public void setObjectFactory( String objectFactory )
1246     {
1247         this.objectFactory = objectFactory;
1248     }
1249 
1250     public ToolchainManager getToolchainManager()
1251     {
1252         return toolchainManager;
1253     }
1254 
1255     public void setToolchainManager( ToolchainManager toolchainManager )
1256     {
1257         this.toolchainManager = toolchainManager;
1258     }
1259 
1260     public boolean isMavenParallel()
1261     {
1262         return parallelMavenExecution != null && parallelMavenExecution.booleanValue();
1263     }
1264 
1265     public String getRunOrder()
1266     {
1267         return runOrder;
1268     }
1269 
1270     public void setRunOrder( String runOrder )
1271     {
1272         this.runOrder = runOrder;
1273     }
1274 }