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