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
public abstract class DefaultForkConfiguration extends ForkConfiguration
Basic framework which constructs CLI.- Since:
- 2.21.0.Jigsaw
- Author:
- Tibor Digana (tibor17)
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultForkConfiguration(org.apache.maven.surefire.booter.Classpath booterClasspath, java.io.File tempDirectory, java.lang.String debugLine, java.io.File workingDirectory, java.util.Properties modelProperties, java.lang.String argLine, java.util.Map<java.lang.String,java.lang.String> environmentVariables, boolean debug, int forkCount, boolean reuseForks, Platform pluginPlatform, org.apache.maven.plugin.surefire.log.api.ConsoleLogger log)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description OutputStreamFlushableCommandline
createCommandLine(org.apache.maven.surefire.booter.StartupConfiguration config, int forkNumber)
protected java.lang.String
extendJvmArgLine(java.lang.String jvmArgLine)
protected java.lang.String
getArgLine()
protected org.apache.maven.surefire.booter.Classpath
getBooterClasspath()
protected java.lang.String
getDebugLine()
protected java.util.Map<java.lang.String,java.lang.String>
getEnvironmentVariables()
protected int
getForkCount()
protected JdkAttributes
getJdkForTests()
protected java.util.Properties
getModelProperties()
protected Platform
getPluginPlatform()
java.io.File
getTempDirectory()
protected java.io.File
getWorkingDirectory()
protected boolean
isDebug()
protected boolean
isReuseForks()
protected abstract void
resolveClasspath(OutputStreamFlushableCommandline cli, java.lang.String booterThatHasMainMethod, org.apache.maven.surefire.booter.StartupConfiguration config)
protected java.util.List<java.lang.String>
toCompleteClasspath(org.apache.maven.surefire.booter.StartupConfiguration conf)
-
-
-
Constructor Detail
-
DefaultForkConfiguration
protected DefaultForkConfiguration(@Nonnull org.apache.maven.surefire.booter.Classpath booterClasspath, @Nonnull java.io.File tempDirectory, @Nullable java.lang.String debugLine, @Nonnull java.io.File workingDirectory, @Nonnull java.util.Properties modelProperties, @Nullable java.lang.String argLine, @Nonnull java.util.Map<java.lang.String,java.lang.String> environmentVariables, boolean debug, int forkCount, boolean reuseForks, @Nonnull Platform pluginPlatform, @Nonnull org.apache.maven.plugin.surefire.log.api.ConsoleLogger log)
-
-
Method Detail
-
resolveClasspath
protected abstract void resolveClasspath(@Nonnull OutputStreamFlushableCommandline cli, @Nonnull java.lang.String booterThatHasMainMethod, @Nonnull org.apache.maven.surefire.booter.StartupConfiguration config) throws org.apache.maven.surefire.booter.SurefireBooterForkException
- Throws:
org.apache.maven.surefire.booter.SurefireBooterForkException
-
extendJvmArgLine
@Nonnull protected java.lang.String extendJvmArgLine(@Nonnull java.lang.String jvmArgLine)
-
createCommandLine
@Nonnull public OutputStreamFlushableCommandline createCommandLine(@Nonnull org.apache.maven.surefire.booter.StartupConfiguration config, int forkNumber) throws org.apache.maven.surefire.booter.SurefireBooterForkException
- Specified by:
createCommandLine
in classForkConfiguration
- Parameters:
config
- The startup configurationforkNumber
- index of forked JVM, to be the replacement in the argLine- Returns:
- CommandLine able to flush entire command going to be sent to forked JVM
- Throws:
org.apache.maven.surefire.booter.SurefireBooterForkException
- when unable to perform the fork
-
toCompleteClasspath
@Nonnull protected java.util.List<java.lang.String> toCompleteClasspath(org.apache.maven.surefire.booter.StartupConfiguration conf) throws org.apache.maven.surefire.booter.SurefireBooterForkException
- Throws:
org.apache.maven.surefire.booter.SurefireBooterForkException
-
getTempDirectory
@Nonnull public java.io.File getTempDirectory()
- Specified by:
getTempDirectory
in classForkConfiguration
-
getDebugLine
@Nullable protected java.lang.String getDebugLine()
- Specified by:
getDebugLine
in classForkConfiguration
-
getWorkingDirectory
@Nonnull protected java.io.File getWorkingDirectory()
- Specified by:
getWorkingDirectory
in classForkConfiguration
-
getModelProperties
@Nonnull protected java.util.Properties getModelProperties()
- Specified by:
getModelProperties
in classForkConfiguration
-
getArgLine
@Nullable protected java.lang.String getArgLine()
- Specified by:
getArgLine
in classForkConfiguration
-
getEnvironmentVariables
@Nonnull protected java.util.Map<java.lang.String,java.lang.String> getEnvironmentVariables()
- Specified by:
getEnvironmentVariables
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
@Nonnull protected Platform getPluginPlatform()
- Specified by:
getPluginPlatform
in classForkConfiguration
-
getJdkForTests
@Nonnull protected JdkAttributes getJdkForTests()
- Specified by:
getJdkForTests
in classForkConfiguration
-
getBooterClasspath
@Nonnull protected org.apache.maven.surefire.booter.Classpath getBooterClasspath()
- Specified by:
getBooterClasspath
in classForkConfiguration
-
-