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