Class DefaultForkConfiguration
java.lang.Object
org.apache.maven.plugin.surefire.booterclient.ForkConfiguration
org.apache.maven.plugin.surefire.booterclient.DefaultForkConfiguration
- Direct Known Subclasses:
ClasspathForkConfiguration
,JarManifestForkConfiguration
,ModularClasspathForkConfiguration
Basic framework which constructs CLI.
- Since:
- 2.21.0.Jigsaw
- Author:
- Tibor Digana (tibor17)
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DefaultForkConfiguration
(Classpath booterClasspath, File tempDirectory, String debugLine, File workingDirectory, Properties modelProperties, String argLine, Map<String, String> environmentVariables, String[] excludedEnvironmentVariables, boolean debug, int forkCount, boolean reuseForks, Platform pluginPlatform, ConsoleLogger log, ForkNodeFactory forkNodeFactory) -
Method Summary
Modifier and TypeMethodDescriptioncreateCommandLine
(StartupConfiguration config, int forkNumber, File dumpLogDirectory) protected String
extendJvmArgLine
(String jvmArgLine) protected String
protected Classpath
protected String
protected String[]
protected int
final ForkNodeFactory
protected JdkAttributes
protected ConsoleLogger
protected Properties
protected Platform
protected File
protected boolean
isDebug()
protected boolean
protected abstract void
resolveClasspath
(Commandline cli, String booterThatHasMainMethod, StartupConfiguration config, File dumpLogDirectory)
-
Constructor Details
-
DefaultForkConfiguration
protected DefaultForkConfiguration(@Nonnull Classpath booterClasspath, @Nonnull File tempDirectory, @Nullable String debugLine, @Nonnull File workingDirectory, @Nonnull Properties modelProperties, @Nullable String argLine, @Nonnull Map<String, String> environmentVariables, @Nonnull String[] excludedEnvironmentVariables, boolean debug, int forkCount, boolean reuseForks, @Nonnull Platform pluginPlatform, @Nonnull ConsoleLogger log, @Nonnull ForkNodeFactory forkNodeFactory)
-
-
Method Details
-
resolveClasspath
protected abstract void resolveClasspath(@Nonnull Commandline cli, @Nonnull String booterThatHasMainMethod, @Nonnull StartupConfiguration config, @Nonnull File dumpLogDirectory) throws SurefireBooterForkException - Throws:
SurefireBooterForkException
-
extendJvmArgLine
-
getForkNodeFactory
- Specified by:
getForkNodeFactory
in classForkConfiguration
-
createCommandLine
@Nonnull public Commandline createCommandLine(@Nonnull StartupConfiguration config, int forkNumber, @Nonnull File dumpLogDirectory) throws SurefireBooterForkException - Specified by:
createCommandLine
in classForkConfiguration
- Parameters:
config
- The startup configurationforkNumber
- index of forked JVM, to be the replacement in the argLinedumpLogDirectory
- directory for dump log file- Returns:
- CommandLine able to flush entire command going to be sent to forked JVM
- Throws:
SurefireBooterForkException
- when unable to perform the fork
-
getLogger
-
toCompleteClasspath
@Nonnull protected List<String> toCompleteClasspath(@Nonnull StartupConfiguration conf) throws SurefireBooterForkException - Throws:
SurefireBooterForkException
-
getTempDirectory
- Specified by:
getTempDirectory
in classForkConfiguration
-
getDebugLine
- Specified by:
getDebugLine
in classForkConfiguration
-
getWorkingDirectory
- Specified by:
getWorkingDirectory
in classForkConfiguration
-
getModelProperties
- Specified by:
getModelProperties
in classForkConfiguration
-
getArgLine
- Specified by:
getArgLine
in classForkConfiguration
-
getEnvironmentVariables
- Specified by:
getEnvironmentVariables
in classForkConfiguration
-
getExcludedEnvironmentVariables
- Specified by:
getExcludedEnvironmentVariables
in classForkConfiguration
-
isDebug
protected boolean isDebug()- Specified by:
isDebug
in classForkConfiguration
-
getForkCount
protected int getForkCount()- Specified by:
getForkCount
in classForkConfiguration
-
isReuseForks
protected boolean isReuseForks()- Specified by:
isReuseForks
in classForkConfiguration
-
getPluginPlatform
- Specified by:
getPluginPlatform
in classForkConfiguration
-
getJdkForTests
- Specified by:
getJdkForTests
in classForkConfiguration
-
getBooterClasspath
- Specified by:
getBooterClasspath
in classForkConfiguration
-