1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  package org.apache.maven.plugin.surefire.booterclient;
20  
21  import javax.annotation.Nonnull;
22  import javax.annotation.Nullable;
23  
24  import java.io.File;
25  import java.util.Map;
26  import java.util.Properties;
27  
28  import org.apache.maven.plugin.surefire.JdkAttributes;
29  import org.apache.maven.plugin.surefire.booterclient.lazytestprovider.Commandline;
30  import org.apache.maven.surefire.booter.Classpath;
31  import org.apache.maven.surefire.booter.ForkedBooter;
32  import org.apache.maven.surefire.booter.StartupConfiguration;
33  import org.apache.maven.surefire.booter.SurefireBooterForkException;
34  import org.apache.maven.surefire.extensions.ForkNodeFactory;
35  
36  
37  
38  
39  public abstract class ForkConfiguration {
40      static final String DEFAULT_PROVIDER_CLASS = ForkedBooter.class.getName();
41  
42      @Nonnull
43      public abstract ForkNodeFactory getForkNodeFactory();
44  
45      @Nonnull
46      public abstract File getTempDirectory();
47  
48      @Nullable
49      protected abstract String getDebugLine();
50  
51      @Nonnull
52      protected abstract File getWorkingDirectory();
53  
54      @Nonnull
55      protected abstract Properties getModelProperties();
56  
57      @Nullable
58      protected abstract String getArgLine();
59  
60      @Nonnull
61      protected abstract Map<String, String> getEnvironmentVariables();
62  
63      @Nonnull
64      protected abstract String[] getExcludedEnvironmentVariables();
65  
66      protected abstract boolean isDebug();
67  
68      protected abstract int getForkCount();
69  
70      protected abstract boolean isReuseForks();
71  
72      @Nonnull
73      protected abstract Platform getPluginPlatform();
74  
75      @Nonnull
76      protected abstract JdkAttributes getJdkForTests();
77  
78      @Nonnull
79      protected abstract Classpath getBooterClasspath();
80  
81      
82  
83  
84  
85  
86  
87  
88  
89      @Nonnull
90      public abstract Commandline createCommandLine(
91              @Nonnull StartupConfiguration config, int forkNumber, @Nonnull File dumpLogDirectory)
92              throws SurefireBooterForkException;
93  }