1 package org.apache.maven.plugin.surefire.booterclient;
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.plugin.surefire.JdkAttributes;
23 import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.Commandline;
24 import org.apache.maven.surefire.booter.Classpath;
25 import org.apache.maven.surefire.booter.ForkedBooter;
26 import org.apache.maven.surefire.booter.StartupConfiguration;
27 import org.apache.maven.surefire.booter.SurefireBooterForkException;
28 import org.apache.maven.surefire.extensions.ForkNodeFactory;
29
30 import javax.annotation.Nonnull;
31 import javax.annotation.Nullable;
32 import java.io.File;
33 import java.util.Map;
34 import java.util.Properties;
35
36
37
38
39 public abstract class ForkConfiguration
40 {
41 static final String DEFAULT_PROVIDER_CLASS = ForkedBooter.class.getName();
42
43 @Nonnull public abstract ForkNodeFactory getForkNodeFactory();
44 @Nonnull public abstract File getTempDirectory();
45 @Nullable protected abstract String getDebugLine();
46 @Nonnull protected abstract File getWorkingDirectory();
47 @Nonnull protected abstract Properties getModelProperties();
48 @Nullable protected abstract String getArgLine();
49 @Nonnull protected abstract Map<String, String> getEnvironmentVariables();
50 @Nonnull protected abstract String[] getExcludedEnvironmentVariables();
51 protected abstract boolean isDebug();
52 protected abstract int getForkCount();
53 protected abstract boolean isReuseForks();
54 @Nonnull protected abstract Platform getPluginPlatform();
55 @Nonnull protected abstract JdkAttributes getJdkForTests();
56 @Nonnull protected abstract Classpath getBooterClasspath();
57
58
59
60
61
62
63
64
65
66 @Nonnull
67 public abstract Commandline createCommandLine( @Nonnull StartupConfiguration config,
68 int forkNumber,
69 @Nonnull File dumpLogDirectory )
70 throws SurefireBooterForkException;
71 }