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