1 | |
package org.apache.maven.plugin.failsafe; |
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
import java.io.BufferedOutputStream; |
23 | |
import java.io.File; |
24 | |
import java.io.FileOutputStream; |
25 | |
import java.io.IOException; |
26 | |
import java.io.OutputStreamWriter; |
27 | |
import java.io.Writer; |
28 | |
import java.util.HashMap; |
29 | |
import java.util.List; |
30 | |
import java.util.Map; |
31 | |
import java.util.Properties; |
32 | |
|
33 | |
import org.apache.maven.artifact.factory.ArtifactFactory; |
34 | |
import org.apache.maven.artifact.metadata.ArtifactMetadataSource; |
35 | |
import org.apache.maven.artifact.repository.ArtifactRepository; |
36 | |
import org.apache.maven.artifact.resolver.ArtifactResolver; |
37 | |
import org.apache.maven.execution.MavenSession; |
38 | |
import org.apache.maven.plugin.MojoExecutionException; |
39 | |
import org.apache.maven.plugin.MojoFailureException; |
40 | |
import org.apache.maven.plugin.surefire.AbstractSurefireMojo; |
41 | |
import org.apache.maven.plugin.surefire.Summary; |
42 | |
import org.apache.maven.plugin.surefire.booterclient.ChecksumCalculator; |
43 | |
import org.apache.maven.project.MavenProject; |
44 | |
import org.apache.maven.surefire.booter.ProviderConfiguration; |
45 | |
import org.apache.maven.surefire.failsafe.model.FailsafeSummary; |
46 | |
import org.apache.maven.surefire.failsafe.model.io.xpp3.FailsafeSummaryXpp3Writer; |
47 | |
import org.apache.maven.surefire.suite.RunResult; |
48 | |
import org.apache.maven.toolchain.ToolchainManager; |
49 | |
import org.codehaus.plexus.util.ReaderFactory; |
50 | |
import org.codehaus.plexus.util.StringUtils; |
51 | |
|
52 | |
|
53 | |
|
54 | |
|
55 | |
|
56 | |
|
57 | |
|
58 | |
|
59 | |
|
60 | |
|
61 | |
|
62 | |
|
63 | |
|
64 | 0 | public class IntegrationTestMojo |
65 | |
extends AbstractSurefireMojo |
66 | |
{ |
67 | |
|
68 | |
|
69 | |
|
70 | |
|
71 | |
|
72 | |
|
73 | |
|
74 | |
|
75 | |
private boolean skipTests; |
76 | |
|
77 | |
|
78 | |
|
79 | |
|
80 | |
|
81 | |
|
82 | |
|
83 | |
|
84 | |
private boolean skipITs; |
85 | |
|
86 | |
|
87 | |
|
88 | |
|
89 | |
|
90 | |
|
91 | |
|
92 | |
|
93 | |
private boolean skipExec; |
94 | |
|
95 | |
|
96 | |
|
97 | |
|
98 | |
|
99 | |
|
100 | |
|
101 | |
|
102 | |
private boolean skip; |
103 | |
|
104 | |
|
105 | |
|
106 | |
|
107 | |
|
108 | |
|
109 | |
|
110 | |
private File basedir; |
111 | |
|
112 | |
|
113 | |
|
114 | |
|
115 | |
|
116 | |
|
117 | |
|
118 | |
private File testClassesDirectory; |
119 | |
|
120 | |
|
121 | |
|
122 | |
|
123 | |
|
124 | |
|
125 | |
|
126 | |
private File classesDirectory; |
127 | |
|
128 | |
|
129 | |
|
130 | |
|
131 | |
|
132 | |
|
133 | |
|
134 | |
private MavenProject project; |
135 | |
|
136 | |
|
137 | |
|
138 | |
|
139 | |
|
140 | |
|
141 | |
|
142 | |
|
143 | |
private List classpathDependencyExcludes; |
144 | |
|
145 | |
|
146 | |
|
147 | |
|
148 | |
|
149 | |
|
150 | |
|
151 | |
|
152 | |
|
153 | |
|
154 | |
|
155 | |
|
156 | |
|
157 | |
|
158 | |
|
159 | |
|
160 | |
private String classpathDependencyScopeExclude; |
161 | |
|
162 | |
|
163 | |
|
164 | |
|
165 | |
|
166 | |
|
167 | |
|
168 | |
private List additionalClasspathElements; |
169 | |
|
170 | |
|
171 | |
|
172 | |
|
173 | |
|
174 | |
|
175 | |
private File reportsDirectory; |
176 | |
|
177 | |
|
178 | |
|
179 | |
|
180 | |
|
181 | |
|
182 | |
|
183 | |
|
184 | |
private File testSourceDirectory; |
185 | |
|
186 | |
|
187 | |
|
188 | |
|
189 | |
|
190 | |
|
191 | |
|
192 | |
|
193 | |
|
194 | |
|
195 | |
|
196 | |
|
197 | |
|
198 | |
|
199 | |
private String test; |
200 | |
|
201 | |
|
202 | |
|
203 | |
|
204 | |
|
205 | |
|
206 | |
|
207 | |
|
208 | |
|
209 | |
|
210 | |
|
211 | |
|
212 | |
|
213 | |
|
214 | |
|
215 | |
|
216 | |
|
217 | |
|
218 | |
private List includes; |
219 | |
|
220 | |
|
221 | |
|
222 | |
|
223 | |
|
224 | |
|
225 | |
|
226 | |
|
227 | |
|
228 | |
|
229 | |
|
230 | |
|
231 | |
|
232 | |
|
233 | |
|
234 | |
private List excludes; |
235 | |
|
236 | |
|
237 | |
|
238 | |
|
239 | |
|
240 | |
|
241 | |
|
242 | |
|
243 | |
|
244 | |
private ArtifactRepository localRepository; |
245 | |
|
246 | |
|
247 | |
|
248 | |
|
249 | |
|
250 | |
|
251 | |
|
252 | |
private Properties systemProperties; |
253 | |
|
254 | |
|
255 | |
|
256 | |
|
257 | |
|
258 | |
|
259 | |
|
260 | |
private Map systemPropertyVariables; |
261 | |
|
262 | |
|
263 | |
|
264 | |
|
265 | |
|
266 | |
|
267 | |
|
268 | |
private File systemPropertiesFile; |
269 | |
|
270 | |
|
271 | |
|
272 | |
|
273 | |
|
274 | |
|
275 | |
|
276 | |
|
277 | |
private Properties properties; |
278 | |
|
279 | |
|
280 | |
|
281 | |
|
282 | |
|
283 | |
|
284 | |
|
285 | |
|
286 | |
private Map pluginArtifactMap; |
287 | |
|
288 | |
|
289 | |
|
290 | |
|
291 | |
|
292 | |
|
293 | |
|
294 | |
|
295 | |
private Map projectArtifactMap; |
296 | |
|
297 | |
|
298 | |
|
299 | |
|
300 | |
|
301 | |
|
302 | |
|
303 | |
private File summaryFile; |
304 | |
|
305 | |
|
306 | |
|
307 | |
|
308 | |
|
309 | |
|
310 | |
private boolean printSummary; |
311 | |
|
312 | |
|
313 | |
|
314 | |
|
315 | |
|
316 | |
|
317 | |
private String reportFormat; |
318 | |
|
319 | |
|
320 | |
|
321 | |
|
322 | |
|
323 | |
|
324 | |
private boolean useFile; |
325 | |
|
326 | |
|
327 | |
|
328 | |
|
329 | |
|
330 | |
|
331 | |
|
332 | |
|
333 | |
private boolean redirectTestOutputToFile; |
334 | |
|
335 | |
|
336 | |
|
337 | |
|
338 | |
|
339 | |
|
340 | |
|
341 | |
private Boolean failIfNoTests; |
342 | |
|
343 | |
|
344 | |
|
345 | |
|
346 | |
|
347 | |
|
348 | |
|
349 | |
|
350 | |
private String forkMode; |
351 | |
|
352 | |
|
353 | |
|
354 | |
|
355 | |
|
356 | |
|
357 | |
|
358 | |
|
359 | |
|
360 | |
private String jvm; |
361 | |
|
362 | |
|
363 | |
|
364 | |
|
365 | |
|
366 | |
|
367 | |
|
368 | |
private String argLine; |
369 | |
|
370 | |
|
371 | |
|
372 | |
|
373 | |
|
374 | |
|
375 | |
|
376 | |
|
377 | |
|
378 | |
|
379 | |
private String debugForkedProcess; |
380 | |
|
381 | |
|
382 | |
|
383 | |
|
384 | |
|
385 | |
|
386 | |
|
387 | |
|
388 | |
private int forkedProcessTimeoutInSeconds; |
389 | |
|
390 | |
|
391 | |
|
392 | |
|
393 | |
|
394 | |
|
395 | |
|
396 | 0 | private Map environmentVariables = new HashMap(); |
397 | |
|
398 | |
|
399 | |
|
400 | |
|
401 | |
|
402 | |
|
403 | |
|
404 | |
private File workingDirectory; |
405 | |
|
406 | |
|
407 | |
|
408 | |
|
409 | |
|
410 | |
|
411 | |
|
412 | |
|
413 | |
|
414 | |
|
415 | |
private boolean childDelegation; |
416 | |
|
417 | |
|
418 | |
|
419 | |
|
420 | |
|
421 | |
|
422 | |
|
423 | |
|
424 | |
|
425 | |
private String groups; |
426 | |
|
427 | |
|
428 | |
|
429 | |
|
430 | |
|
431 | |
|
432 | |
|
433 | |
|
434 | |
|
435 | |
private String excludedGroups; |
436 | |
|
437 | |
|
438 | |
|
439 | |
|
440 | |
|
441 | |
|
442 | |
|
443 | |
|
444 | |
|
445 | |
|
446 | |
|
447 | |
private File[] suiteXmlFiles; |
448 | |
|
449 | |
|
450 | |
|
451 | |
|
452 | |
|
453 | |
|
454 | |
|
455 | |
private String junitArtifactName; |
456 | |
|
457 | |
|
458 | |
|
459 | |
|
460 | |
|
461 | |
|
462 | |
|
463 | |
private String testNGArtifactName; |
464 | |
|
465 | |
|
466 | |
|
467 | |
|
468 | |
|
469 | |
|
470 | |
|
471 | |
|
472 | |
private int threadCount; |
473 | |
|
474 | |
|
475 | |
|
476 | |
|
477 | |
|
478 | |
|
479 | |
|
480 | |
private boolean perCoreThreadCount; |
481 | |
|
482 | |
|
483 | |
|
484 | |
|
485 | |
|
486 | |
|
487 | |
|
488 | |
|
489 | |
|
490 | |
private boolean useUnlimitedThreads; |
491 | |
|
492 | |
|
493 | |
|
494 | |
|
495 | |
|
496 | |
|
497 | |
|
498 | |
|
499 | |
|
500 | |
|
501 | |
|
502 | |
|
503 | |
|
504 | |
private String parallel; |
505 | |
|
506 | |
|
507 | |
|
508 | |
|
509 | |
|
510 | |
|
511 | |
|
512 | |
private boolean trimStackTrace; |
513 | |
|
514 | |
|
515 | |
|
516 | |
|
517 | |
|
518 | |
|
519 | |
private ArtifactResolver artifactResolver; |
520 | |
|
521 | |
|
522 | |
|
523 | |
|
524 | |
|
525 | |
|
526 | |
private ArtifactFactory artifactFactory; |
527 | |
|
528 | |
|
529 | |
|
530 | |
|
531 | |
|
532 | |
|
533 | |
|
534 | |
private List remoteRepositories; |
535 | |
|
536 | |
|
537 | |
|
538 | |
|
539 | |
|
540 | |
|
541 | |
private ArtifactMetadataSource metadataSource; |
542 | |
|
543 | |
private Properties originalSystemProperties; |
544 | |
|
545 | |
|
546 | |
|
547 | |
|
548 | 0 | private Properties internalSystemProperties = new Properties(); |
549 | |
|
550 | |
|
551 | |
|
552 | |
|
553 | |
|
554 | |
|
555 | |
|
556 | |
private boolean disableXmlReport; |
557 | |
|
558 | |
|
559 | |
|
560 | |
|
561 | |
|
562 | |
|
563 | |
|
564 | |
|
565 | |
|
566 | |
private boolean useSystemClassLoader; |
567 | |
|
568 | |
|
569 | |
|
570 | |
|
571 | |
|
572 | |
|
573 | |
|
574 | |
|
575 | |
|
576 | |
|
577 | |
|
578 | |
|
579 | |
private boolean useManifestOnlyJar; |
580 | |
|
581 | |
|
582 | |
|
583 | |
|
584 | |
|
585 | |
|
586 | |
|
587 | |
|
588 | |
private boolean enableAssertions; |
589 | |
|
590 | |
|
591 | |
|
592 | |
|
593 | |
|
594 | |
|
595 | |
|
596 | |
|
597 | |
private MavenSession session; |
598 | |
|
599 | |
|
600 | |
|
601 | |
|
602 | |
|
603 | |
|
604 | |
|
605 | |
private String objectFactory; |
606 | |
|
607 | |
|
608 | |
|
609 | |
|
610 | |
|
611 | |
|
612 | |
private String encoding; |
613 | |
|
614 | |
|
615 | |
|
616 | |
|
617 | |
|
618 | |
private Boolean parallelMavenExecution; |
619 | |
|
620 | |
|
621 | |
|
622 | |
|
623 | |
|
624 | |
|
625 | |
|
626 | |
|
627 | |
|
628 | |
|
629 | |
|
630 | |
|
631 | |
private String runOrder; |
632 | |
|
633 | |
|
634 | |
|
635 | |
|
636 | |
private ToolchainManager toolchainManager; |
637 | |
|
638 | |
protected void handleSummary( Summary summary ) |
639 | |
throws MojoExecutionException, MojoFailureException |
640 | |
{ |
641 | 0 | FailsafeSummary failsafeSummary = createFailsafeSummaryFromSummary( summary ); |
642 | 0 | writeSummary( failsafeSummary ); |
643 | 0 | } |
644 | |
|
645 | |
private FailsafeSummary createFailsafeSummaryFromSummary( Summary summary ) |
646 | |
{ |
647 | 0 | FailsafeSummary failsafeSummary = new FailsafeSummary(); |
648 | 0 | if ( summary.isErrorFree() ) |
649 | |
{ |
650 | 0 | RunResult result = summary.getResultOfLastSuccessfulRun(); |
651 | 0 | if ( result != null ) |
652 | |
{ |
653 | 0 | failsafeSummary.setResult( result.getForkedProcessCode() ); |
654 | |
} |
655 | 0 | } |
656 | |
else |
657 | |
{ |
658 | 0 | failsafeSummary.setResult( ProviderConfiguration.TESTS_FAILED_EXIT_CODE ); |
659 | 0 | failsafeSummary.setException( summary.getFirstException().getMessage() ); |
660 | |
} |
661 | 0 | return failsafeSummary; |
662 | |
} |
663 | |
|
664 | |
private void writeSummary( FailsafeSummary summary ) |
665 | |
throws MojoExecutionException |
666 | |
{ |
667 | 0 | File summaryFile = getSummaryFile(); |
668 | 0 | if ( !summaryFile.getParentFile().isDirectory() ) |
669 | |
{ |
670 | 0 | summaryFile.getParentFile().mkdirs(); |
671 | |
} |
672 | |
try |
673 | |
{ |
674 | 0 | FileOutputStream fileOutputStream = new FileOutputStream( summaryFile ); |
675 | 0 | BufferedOutputStream bufferedOutputStream = new BufferedOutputStream( fileOutputStream ); |
676 | 0 | Writer writer = new OutputStreamWriter( bufferedOutputStream, getEncodingOrDefault() ); |
677 | 0 | FailsafeSummaryXpp3Writer xpp3Writer = new FailsafeSummaryXpp3Writer(); |
678 | 0 | xpp3Writer.write( writer, summary ); |
679 | 0 | writer.close(); |
680 | 0 | bufferedOutputStream.close(); |
681 | 0 | fileOutputStream.close(); |
682 | |
} |
683 | 0 | catch ( IOException e ) |
684 | |
{ |
685 | 0 | throw new MojoExecutionException( e.getMessage(), e ); |
686 | 0 | } |
687 | 0 | } |
688 | |
|
689 | |
private String getEncodingOrDefault() |
690 | |
{ |
691 | 0 | if ( StringUtils.isEmpty( encoding ) ) |
692 | |
{ |
693 | 0 | getLog().warn( "File encoding has not been set, using platform encoding " + ReaderFactory.FILE_ENCODING + |
694 | |
", i.e. build is platform dependent!" ); |
695 | 0 | return ReaderFactory.FILE_ENCODING; |
696 | |
} |
697 | |
else |
698 | |
{ |
699 | 0 | return encoding; |
700 | |
} |
701 | |
} |
702 | |
|
703 | |
protected boolean isSkipExecution() |
704 | |
{ |
705 | 0 | return isSkip() || isSkipTests() || isSkipITs() || isSkipExec(); |
706 | |
} |
707 | |
|
708 | |
protected String getPluginName() |
709 | |
{ |
710 | 0 | return "failsafe"; |
711 | |
} |
712 | |
|
713 | |
protected String[] getDefaultIncludes() |
714 | |
{ |
715 | 0 | return new String[]{"**/IT*.java", "**/*IT.java", "**/*ITCase.java"}; |
716 | |
} |
717 | |
|
718 | |
public boolean isSkipTests() |
719 | |
{ |
720 | 0 | return skipTests; |
721 | |
} |
722 | |
|
723 | |
public void setSkipTests( boolean skipTests ) |
724 | |
{ |
725 | 0 | this.skipTests = skipTests; |
726 | 0 | } |
727 | |
|
728 | |
public boolean isSkipITs() |
729 | |
{ |
730 | 0 | return skipITs; |
731 | |
} |
732 | |
|
733 | |
public void setSkipITs( boolean skipITs ) |
734 | |
{ |
735 | 0 | this.skipITs = skipITs; |
736 | 0 | } |
737 | |
|
738 | |
public boolean isSkipExec() |
739 | |
{ |
740 | 0 | return skipExec; |
741 | |
} |
742 | |
|
743 | |
public void setSkipExec( boolean skipExec ) |
744 | |
{ |
745 | 0 | this.skipExec = skipExec; |
746 | 0 | } |
747 | |
|
748 | |
public boolean isSkip() |
749 | |
{ |
750 | 0 | return skip; |
751 | |
} |
752 | |
|
753 | |
public void setSkip( boolean skip ) |
754 | |
{ |
755 | 0 | this.skip = skip; |
756 | 0 | } |
757 | |
|
758 | |
public File getBasedir() |
759 | |
{ |
760 | 0 | return basedir; |
761 | |
} |
762 | |
|
763 | |
public void setBasedir( File basedir ) |
764 | |
{ |
765 | 0 | this.basedir = basedir; |
766 | 0 | } |
767 | |
|
768 | |
public File getTestClassesDirectory() |
769 | |
{ |
770 | 0 | return testClassesDirectory; |
771 | |
} |
772 | |
|
773 | |
public void setTestClassesDirectory( File testClassesDirectory ) |
774 | |
{ |
775 | 0 | this.testClassesDirectory = testClassesDirectory; |
776 | 0 | } |
777 | |
|
778 | |
public File getClassesDirectory() |
779 | |
{ |
780 | 0 | return classesDirectory; |
781 | |
} |
782 | |
|
783 | |
public void setClassesDirectory( File classesDirectory ) |
784 | |
{ |
785 | 0 | this.classesDirectory = classesDirectory; |
786 | 0 | } |
787 | |
|
788 | |
public MavenProject getProject() |
789 | |
{ |
790 | 0 | return project; |
791 | |
} |
792 | |
|
793 | |
public void setProject( MavenProject project ) |
794 | |
{ |
795 | 0 | this.project = project; |
796 | 0 | } |
797 | |
|
798 | |
public List getClasspathDependencyExcludes() |
799 | |
{ |
800 | 0 | return classpathDependencyExcludes; |
801 | |
} |
802 | |
|
803 | |
public void setClasspathDependencyExcludes( List classpathDependencyExcludes ) |
804 | |
{ |
805 | 0 | this.classpathDependencyExcludes = classpathDependencyExcludes; |
806 | 0 | } |
807 | |
|
808 | |
public String getClasspathDependencyScopeExclude() |
809 | |
{ |
810 | 0 | return classpathDependencyScopeExclude; |
811 | |
} |
812 | |
|
813 | |
public void setClasspathDependencyScopeExclude( String classpathDependencyScopeExclude ) |
814 | |
{ |
815 | 0 | this.classpathDependencyScopeExclude = classpathDependencyScopeExclude; |
816 | 0 | } |
817 | |
|
818 | |
public List getAdditionalClasspathElements() |
819 | |
{ |
820 | 0 | return additionalClasspathElements; |
821 | |
} |
822 | |
|
823 | |
public void setAdditionalClasspathElements( List additionalClasspathElements ) |
824 | |
{ |
825 | 0 | this.additionalClasspathElements = additionalClasspathElements; |
826 | 0 | } |
827 | |
|
828 | |
public File getReportsDirectory() |
829 | |
{ |
830 | 0 | return reportsDirectory; |
831 | |
} |
832 | |
|
833 | |
public void setReportsDirectory( File reportsDirectory ) |
834 | |
{ |
835 | 0 | this.reportsDirectory = reportsDirectory; |
836 | 0 | } |
837 | |
|
838 | |
public File getTestSourceDirectory() |
839 | |
{ |
840 | 0 | return testSourceDirectory; |
841 | |
} |
842 | |
|
843 | |
public void setTestSourceDirectory( File testSourceDirectory ) |
844 | |
{ |
845 | 0 | this.testSourceDirectory = testSourceDirectory; |
846 | 0 | } |
847 | |
|
848 | |
public String getTest() |
849 | |
{ |
850 | 0 | if ( StringUtils.isBlank( test ) ) |
851 | |
{ |
852 | 0 | return null; |
853 | |
} |
854 | 0 | int index = test.indexOf( '#' ); |
855 | 0 | if ( index >= 0 ) |
856 | |
{ |
857 | 0 | return test.substring( 0, index ); |
858 | |
} |
859 | 0 | return test; |
860 | |
} |
861 | |
|
862 | |
public void setTest( String test ) |
863 | |
{ |
864 | 0 | this.test = test; |
865 | 0 | } |
866 | |
|
867 | |
|
868 | |
|
869 | |
|
870 | |
public String getTestMethod() |
871 | |
{ |
872 | 0 | if ( StringUtils.isBlank( test ) ) |
873 | |
{ |
874 | 0 | return null; |
875 | |
} |
876 | 0 | int index = this.test.indexOf( '#' ); |
877 | 0 | if ( index >= 0 ) |
878 | |
{ |
879 | 0 | return this.test.substring( index + 1, this.test.length() ); |
880 | |
} |
881 | 0 | return null; |
882 | |
} |
883 | |
|
884 | |
public List getIncludes() |
885 | |
{ |
886 | 0 | return includes; |
887 | |
} |
888 | |
|
889 | |
public void setIncludes( List includes ) |
890 | |
{ |
891 | 0 | this.includes = includes; |
892 | 0 | } |
893 | |
|
894 | |
public List getExcludes() |
895 | |
{ |
896 | 0 | return excludes; |
897 | |
} |
898 | |
|
899 | |
public void setExcludes( List excludes ) |
900 | |
{ |
901 | 0 | this.excludes = excludes; |
902 | 0 | } |
903 | |
|
904 | |
public ArtifactRepository getLocalRepository() |
905 | |
{ |
906 | 0 | return localRepository; |
907 | |
} |
908 | |
|
909 | |
public void setLocalRepository( ArtifactRepository localRepository ) |
910 | |
{ |
911 | 0 | this.localRepository = localRepository; |
912 | 0 | } |
913 | |
|
914 | |
public Properties getSystemProperties() |
915 | |
{ |
916 | 0 | return systemProperties; |
917 | |
} |
918 | |
|
919 | |
public void setSystemProperties( Properties systemProperties ) |
920 | |
{ |
921 | 0 | this.systemProperties = systemProperties; |
922 | 0 | } |
923 | |
|
924 | |
public Map getSystemPropertyVariables() |
925 | |
{ |
926 | 0 | return systemPropertyVariables; |
927 | |
} |
928 | |
|
929 | |
public void setSystemPropertyVariables( Map systemPropertyVariables ) |
930 | |
{ |
931 | 0 | this.systemPropertyVariables = systemPropertyVariables; |
932 | 0 | } |
933 | |
|
934 | |
public File getSystemPropertiesFile() |
935 | |
{ |
936 | 0 | return systemPropertiesFile; |
937 | |
} |
938 | |
|
939 | |
public void setSystemPropertiesFile( File systemPropertiesFile ) |
940 | |
{ |
941 | 0 | this.systemPropertiesFile = systemPropertiesFile; |
942 | 0 | } |
943 | |
|
944 | |
public Properties getProperties() |
945 | |
{ |
946 | 0 | return properties; |
947 | |
} |
948 | |
|
949 | |
public void setProperties( Properties properties ) |
950 | |
{ |
951 | 0 | this.properties = properties; |
952 | 0 | } |
953 | |
|
954 | |
public Map getPluginArtifactMap() |
955 | |
{ |
956 | 0 | return pluginArtifactMap; |
957 | |
} |
958 | |
|
959 | |
public void setPluginArtifactMap( Map pluginArtifactMap ) |
960 | |
{ |
961 | 0 | this.pluginArtifactMap = pluginArtifactMap; |
962 | 0 | } |
963 | |
|
964 | |
public Map getProjectArtifactMap() |
965 | |
{ |
966 | 0 | return projectArtifactMap; |
967 | |
} |
968 | |
|
969 | |
public void setProjectArtifactMap( Map projectArtifactMap ) |
970 | |
{ |
971 | 0 | this.projectArtifactMap = projectArtifactMap; |
972 | 0 | } |
973 | |
|
974 | |
public File getSummaryFile() |
975 | |
{ |
976 | 0 | return summaryFile; |
977 | |
} |
978 | |
|
979 | |
public void setSummaryFile( File summaryFile ) |
980 | |
{ |
981 | 0 | this.summaryFile = summaryFile; |
982 | 0 | } |
983 | |
|
984 | |
public boolean isPrintSummary() |
985 | |
{ |
986 | 0 | return printSummary; |
987 | |
} |
988 | |
|
989 | |
public void setPrintSummary( boolean printSummary ) |
990 | |
{ |
991 | 0 | this.printSummary = printSummary; |
992 | 0 | } |
993 | |
|
994 | |
public String getReportFormat() |
995 | |
{ |
996 | 0 | return reportFormat; |
997 | |
} |
998 | |
|
999 | |
public void setReportFormat( String reportFormat ) |
1000 | |
{ |
1001 | 0 | this.reportFormat = reportFormat; |
1002 | 0 | } |
1003 | |
|
1004 | |
public boolean isUseFile() |
1005 | |
{ |
1006 | 0 | return useFile; |
1007 | |
} |
1008 | |
|
1009 | |
public void setUseFile( boolean useFile ) |
1010 | |
{ |
1011 | 0 | this.useFile = useFile; |
1012 | 0 | } |
1013 | |
|
1014 | |
public boolean isRedirectTestOutputToFile() |
1015 | |
{ |
1016 | 0 | return redirectTestOutputToFile; |
1017 | |
} |
1018 | |
|
1019 | |
public void setRedirectTestOutputToFile( boolean redirectTestOutputToFile ) |
1020 | |
{ |
1021 | 0 | this.redirectTestOutputToFile = redirectTestOutputToFile; |
1022 | 0 | } |
1023 | |
|
1024 | |
public Boolean getFailIfNoTests() |
1025 | |
{ |
1026 | 0 | return failIfNoTests; |
1027 | |
} |
1028 | |
|
1029 | |
public void setFailIfNoTests( Boolean failIfNoTests ) |
1030 | |
{ |
1031 | 0 | this.failIfNoTests = failIfNoTests; |
1032 | 0 | } |
1033 | |
|
1034 | |
public String getForkMode() |
1035 | |
{ |
1036 | 0 | return forkMode; |
1037 | |
} |
1038 | |
|
1039 | |
public void setForkMode( String forkMode ) |
1040 | |
{ |
1041 | 0 | this.forkMode = forkMode; |
1042 | 0 | } |
1043 | |
|
1044 | |
public String getJvm() |
1045 | |
{ |
1046 | 0 | return jvm; |
1047 | |
} |
1048 | |
|
1049 | |
public void setJvm( String jvm ) |
1050 | |
{ |
1051 | 0 | this.jvm = jvm; |
1052 | 0 | } |
1053 | |
|
1054 | |
public String getArgLine() |
1055 | |
{ |
1056 | 0 | return argLine; |
1057 | |
} |
1058 | |
|
1059 | |
public void setArgLine( String argLine ) |
1060 | |
{ |
1061 | 0 | this.argLine = argLine; |
1062 | 0 | } |
1063 | |
|
1064 | |
public String getDebugForkedProcess() |
1065 | |
{ |
1066 | 0 | return debugForkedProcess; |
1067 | |
} |
1068 | |
|
1069 | |
public void setDebugForkedProcess( String debugForkedProcess ) |
1070 | |
{ |
1071 | 0 | this.debugForkedProcess = debugForkedProcess; |
1072 | 0 | } |
1073 | |
|
1074 | |
public int getForkedProcessTimeoutInSeconds() |
1075 | |
{ |
1076 | 0 | return forkedProcessTimeoutInSeconds; |
1077 | |
} |
1078 | |
|
1079 | |
public void setForkedProcessTimeoutInSeconds( int forkedProcessTimeoutInSeconds ) |
1080 | |
{ |
1081 | 0 | this.forkedProcessTimeoutInSeconds = forkedProcessTimeoutInSeconds; |
1082 | 0 | } |
1083 | |
|
1084 | |
public Map getEnvironmentVariables() |
1085 | |
{ |
1086 | 0 | return environmentVariables; |
1087 | |
} |
1088 | |
|
1089 | |
public void setEnvironmentVariables( Map environmentVariables ) |
1090 | |
{ |
1091 | 0 | this.environmentVariables = environmentVariables; |
1092 | 0 | } |
1093 | |
|
1094 | |
public File getWorkingDirectory() |
1095 | |
{ |
1096 | 0 | return workingDirectory; |
1097 | |
} |
1098 | |
|
1099 | |
public void setWorkingDirectory( File workingDirectory ) |
1100 | |
{ |
1101 | 0 | this.workingDirectory = workingDirectory; |
1102 | 0 | } |
1103 | |
|
1104 | |
public boolean isChildDelegation() |
1105 | |
{ |
1106 | 0 | return childDelegation; |
1107 | |
} |
1108 | |
|
1109 | |
public void setChildDelegation( boolean childDelegation ) |
1110 | |
{ |
1111 | 0 | this.childDelegation = childDelegation; |
1112 | 0 | } |
1113 | |
|
1114 | |
public String getGroups() |
1115 | |
{ |
1116 | 0 | return groups; |
1117 | |
} |
1118 | |
|
1119 | |
public void setGroups( String groups ) |
1120 | |
{ |
1121 | 0 | this.groups = groups; |
1122 | 0 | } |
1123 | |
|
1124 | |
public String getExcludedGroups() |
1125 | |
{ |
1126 | 0 | return excludedGroups; |
1127 | |
} |
1128 | |
|
1129 | |
public void setExcludedGroups( String excludedGroups ) |
1130 | |
{ |
1131 | 0 | this.excludedGroups = excludedGroups; |
1132 | 0 | } |
1133 | |
|
1134 | |
public File[] getSuiteXmlFiles() |
1135 | |
{ |
1136 | 0 | return suiteXmlFiles; |
1137 | |
} |
1138 | |
|
1139 | |
public void setSuiteXmlFiles( File[] suiteXmlFiles ) |
1140 | |
{ |
1141 | 0 | this.suiteXmlFiles = suiteXmlFiles; |
1142 | 0 | } |
1143 | |
|
1144 | |
public String getJunitArtifactName() |
1145 | |
{ |
1146 | 0 | return junitArtifactName; |
1147 | |
} |
1148 | |
|
1149 | |
public void setJunitArtifactName( String junitArtifactName ) |
1150 | |
{ |
1151 | 0 | this.junitArtifactName = junitArtifactName; |
1152 | 0 | } |
1153 | |
|
1154 | |
public String getTestNGArtifactName() |
1155 | |
{ |
1156 | 0 | return testNGArtifactName; |
1157 | |
} |
1158 | |
|
1159 | |
public void setTestNGArtifactName( String testNGArtifactName ) |
1160 | |
{ |
1161 | 0 | this.testNGArtifactName = testNGArtifactName; |
1162 | 0 | } |
1163 | |
|
1164 | |
public int getThreadCount() |
1165 | |
{ |
1166 | 0 | return threadCount; |
1167 | |
} |
1168 | |
|
1169 | |
public void setThreadCount( int threadCount ) |
1170 | |
{ |
1171 | 0 | this.threadCount = threadCount; |
1172 | 0 | } |
1173 | |
|
1174 | |
public boolean getPerCoreThreadCount() |
1175 | |
{ |
1176 | 0 | return perCoreThreadCount; |
1177 | |
} |
1178 | |
|
1179 | |
public void setPerCoreThreadCount( boolean perCoreThreadCount ) |
1180 | |
{ |
1181 | 0 | this.perCoreThreadCount = perCoreThreadCount; |
1182 | 0 | } |
1183 | |
|
1184 | |
public boolean getUseUnlimitedThreads() |
1185 | |
{ |
1186 | 0 | return useUnlimitedThreads; |
1187 | |
} |
1188 | |
|
1189 | |
public void setUseUnlimitedThreads( boolean useUnlimitedThreads ) |
1190 | |
{ |
1191 | 0 | this.useUnlimitedThreads = useUnlimitedThreads; |
1192 | 0 | } |
1193 | |
|
1194 | |
public String getParallel() |
1195 | |
{ |
1196 | 0 | return parallel; |
1197 | |
} |
1198 | |
|
1199 | |
public void setParallel( String parallel ) |
1200 | |
{ |
1201 | 0 | this.parallel = parallel; |
1202 | 0 | } |
1203 | |
|
1204 | |
public boolean isTrimStackTrace() |
1205 | |
{ |
1206 | 0 | return trimStackTrace; |
1207 | |
} |
1208 | |
|
1209 | |
public void setTrimStackTrace( boolean trimStackTrace ) |
1210 | |
{ |
1211 | 0 | this.trimStackTrace = trimStackTrace; |
1212 | 0 | } |
1213 | |
|
1214 | |
public ArtifactResolver getArtifactResolver() |
1215 | |
{ |
1216 | 0 | return artifactResolver; |
1217 | |
} |
1218 | |
|
1219 | |
public void setArtifactResolver( ArtifactResolver artifactResolver ) |
1220 | |
{ |
1221 | 0 | this.artifactResolver = artifactResolver; |
1222 | 0 | } |
1223 | |
|
1224 | |
public ArtifactFactory getArtifactFactory() |
1225 | |
{ |
1226 | 0 | return artifactFactory; |
1227 | |
} |
1228 | |
|
1229 | |
public void setArtifactFactory( ArtifactFactory artifactFactory ) |
1230 | |
{ |
1231 | 0 | this.artifactFactory = artifactFactory; |
1232 | 0 | } |
1233 | |
|
1234 | |
public List getRemoteRepositories() |
1235 | |
{ |
1236 | 0 | return remoteRepositories; |
1237 | |
} |
1238 | |
|
1239 | |
public void setRemoteRepositories( List remoteRepositories ) |
1240 | |
{ |
1241 | 0 | this.remoteRepositories = remoteRepositories; |
1242 | 0 | } |
1243 | |
|
1244 | |
public ArtifactMetadataSource getMetadataSource() |
1245 | |
{ |
1246 | 0 | return metadataSource; |
1247 | |
} |
1248 | |
|
1249 | |
public void setMetadataSource( ArtifactMetadataSource metadataSource ) |
1250 | |
{ |
1251 | 0 | this.metadataSource = metadataSource; |
1252 | 0 | } |
1253 | |
|
1254 | |
public Properties getOriginalSystemProperties() |
1255 | |
{ |
1256 | 0 | return originalSystemProperties; |
1257 | |
} |
1258 | |
|
1259 | |
public void setOriginalSystemProperties( Properties originalSystemProperties ) |
1260 | |
{ |
1261 | 0 | this.originalSystemProperties = originalSystemProperties; |
1262 | 0 | } |
1263 | |
|
1264 | |
public Properties getInternalSystemProperties() |
1265 | |
{ |
1266 | 0 | return internalSystemProperties; |
1267 | |
} |
1268 | |
|
1269 | |
public void setInternalSystemProperties( Properties internalSystemProperties ) |
1270 | |
{ |
1271 | 0 | this.internalSystemProperties = internalSystemProperties; |
1272 | 0 | } |
1273 | |
|
1274 | |
public boolean isDisableXmlReport() |
1275 | |
{ |
1276 | 0 | return disableXmlReport; |
1277 | |
} |
1278 | |
|
1279 | |
public void setDisableXmlReport( boolean disableXmlReport ) |
1280 | |
{ |
1281 | 0 | this.disableXmlReport = disableXmlReport; |
1282 | 0 | } |
1283 | |
|
1284 | |
public boolean isUseSystemClassLoader() |
1285 | |
{ |
1286 | 0 | return useSystemClassLoader; |
1287 | |
} |
1288 | |
|
1289 | |
public void setUseSystemClassLoader( boolean useSystemClassLoader ) |
1290 | |
{ |
1291 | 0 | this.useSystemClassLoader = useSystemClassLoader; |
1292 | 0 | } |
1293 | |
|
1294 | |
public boolean isUseManifestOnlyJar() |
1295 | |
{ |
1296 | 0 | return useManifestOnlyJar; |
1297 | |
} |
1298 | |
|
1299 | |
public void setUseManifestOnlyJar( boolean useManifestOnlyJar ) |
1300 | |
{ |
1301 | 0 | this.useManifestOnlyJar = useManifestOnlyJar; |
1302 | 0 | } |
1303 | |
|
1304 | |
public boolean isEnableAssertions() |
1305 | |
{ |
1306 | 0 | return enableAssertions; |
1307 | |
} |
1308 | |
|
1309 | |
public void setEnableAssertions( boolean enableAssertions ) |
1310 | |
{ |
1311 | 0 | this.enableAssertions = enableAssertions; |
1312 | 0 | } |
1313 | |
|
1314 | |
public MavenSession getSession() |
1315 | |
{ |
1316 | 0 | return session; |
1317 | |
} |
1318 | |
|
1319 | |
public void setSession( MavenSession session ) |
1320 | |
{ |
1321 | 0 | this.session = session; |
1322 | 0 | } |
1323 | |
|
1324 | |
public String getObjectFactory() |
1325 | |
{ |
1326 | 0 | return objectFactory; |
1327 | |
} |
1328 | |
|
1329 | |
public void setObjectFactory( String objectFactory ) |
1330 | |
{ |
1331 | 0 | this.objectFactory = objectFactory; |
1332 | 0 | } |
1333 | |
|
1334 | |
public ToolchainManager getToolchainManager() |
1335 | |
{ |
1336 | 0 | return toolchainManager; |
1337 | |
} |
1338 | |
|
1339 | |
public void setToolchainManager( ToolchainManager toolchainManager ) |
1340 | |
{ |
1341 | 0 | this.toolchainManager = toolchainManager; |
1342 | 0 | } |
1343 | |
|
1344 | |
|
1345 | |
|
1346 | |
public boolean isTestFailureIgnore() |
1347 | |
{ |
1348 | 0 | return true; |
1349 | |
} |
1350 | |
|
1351 | |
public void setTestFailureIgnore( boolean testFailureIgnore ) |
1352 | |
{ |
1353 | |
|
1354 | 0 | } |
1355 | |
|
1356 | |
public boolean isMavenParallel() |
1357 | |
{ |
1358 | 0 | return parallelMavenExecution != null && parallelMavenExecution.booleanValue(); |
1359 | |
} |
1360 | |
|
1361 | |
public String getRunOrder() |
1362 | |
{ |
1363 | 0 | return runOrder; |
1364 | |
} |
1365 | |
|
1366 | |
public void setRunOrder( String runOrder ) |
1367 | |
{ |
1368 | 0 | this.runOrder = runOrder; |
1369 | 0 | } |
1370 | |
|
1371 | |
protected void addPluginSpecificChecksumItems( ChecksumCalculator checksum ) |
1372 | |
{ |
1373 | 0 | checksum.add( skipITs ); |
1374 | 0 | checksum.add( summaryFile ); |
1375 | 0 | } |
1376 | |
|
1377 | |
} |