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
(org.apache.maven.surefire.booter.Classpath booterClasspath, File tempDirectory, String debugLine, File workingDirectory, Properties modelProperties, String argLine, Map<String, String> environmentVariables, boolean debug, int forkCount, boolean reuseForks, Platform pluginPlatform, org.apache.maven.plugin.surefire.log.api.ConsoleLogger log) -
Method Summary
Modifier and TypeMethodDescriptioncreateCommandLine
(org.apache.maven.surefire.booter.StartupConfiguration config, int forkNumber) protected String
extendJvmArgLine
(String jvmArgLine) protected String
protected org.apache.maven.surefire.booter.Classpath
protected String
protected int
protected JdkAttributes
protected Properties
protected Platform
protected File
protected boolean
isDebug()
protected boolean
protected abstract void
resolveClasspath
(OutputStreamFlushableCommandline cli, String booterThatHasMainMethod, org.apache.maven.surefire.booter.StartupConfiguration config) toCompleteClasspath
(org.apache.maven.surefire.booter.StartupConfiguration conf)
-
Constructor Details
-
DefaultForkConfiguration
protected DefaultForkConfiguration(@Nonnull org.apache.maven.surefire.booter.Classpath booterClasspath, @Nonnull File tempDirectory, @Nullable String debugLine, @Nonnull File workingDirectory, @Nonnull Properties modelProperties, @Nullable String argLine, @Nonnull Map<String, String> environmentVariables, boolean debug, int forkCount, boolean reuseForks, @Nonnull Platform pluginPlatform, @Nonnull org.apache.maven.plugin.surefire.log.api.ConsoleLogger log)
-
-
Method Details
-
resolveClasspath
protected abstract void resolveClasspath(@Nonnull OutputStreamFlushableCommandline cli, @Nonnull 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
-
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 List<String> toCompleteClasspath(org.apache.maven.surefire.booter.StartupConfiguration conf) throws org.apache.maven.surefire.booter.SurefireBooterForkException - Throws:
org.apache.maven.surefire.booter.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
-
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
-