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
ConstructorsModifierConstructorDescriptionprotectedDefaultForkConfiguration(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 StringextendJvmArgLine(String jvmArgLine) protected Stringprotected Classpathprotected Stringprotected String[]protected intfinal ForkNodeFactoryprotected JdkAttributesprotected ConsoleLoggerprotected Propertiesprotected Platformprotected Fileprotected booleanisDebug()protected booleanprotected abstract voidresolveClasspath(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:
getForkNodeFactoryin classForkConfiguration
-
createCommandLine
@Nonnull public Commandline createCommandLine(@Nonnull StartupConfiguration config, int forkNumber, @Nonnull File dumpLogDirectory) throws SurefireBooterForkException - Specified by:
createCommandLinein 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:
getTempDirectoryin classForkConfiguration
-
getDebugLine
- Specified by:
getDebugLinein classForkConfiguration
-
getWorkingDirectory
- Specified by:
getWorkingDirectoryin classForkConfiguration
-
getModelProperties
- Specified by:
getModelPropertiesin classForkConfiguration
-
getArgLine
- Specified by:
getArgLinein classForkConfiguration
-
getEnvironmentVariables
- Specified by:
getEnvironmentVariablesin classForkConfiguration
-
getExcludedEnvironmentVariables
- Specified by:
getExcludedEnvironmentVariablesin classForkConfiguration
-
isDebug
protected boolean isDebug()- Specified by:
isDebugin classForkConfiguration
-
getForkCount
protected int getForkCount()- Specified by:
getForkCountin classForkConfiguration
-
isReuseForks
protected boolean isReuseForks()- Specified by:
isReuseForksin classForkConfiguration
-
getPluginPlatform
- Specified by:
getPluginPlatformin classForkConfiguration
-
getJdkForTests
- Specified by:
getJdkForTestsin classForkConfiguration
-
getBooterClasspath
- Specified by:
getBooterClasspathin classForkConfiguration
-