Class JarManifestForkConfiguration
- java.lang.Object
-
- org.apache.maven.plugin.surefire.booterclient.ForkConfiguration
-
- org.apache.maven.plugin.surefire.booterclient.DefaultForkConfiguration
-
- org.apache.maven.plugin.surefire.booterclient.AbstractClasspathForkConfiguration
-
- org.apache.maven.plugin.surefire.booterclient.JarManifestForkConfiguration
-
public final class JarManifestForkConfiguration extends AbstractClasspathForkConfiguration
- Since:
- 2.21.0.Jigsaw
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classJarManifestForkConfiguration.ClasspathElementUri
-
Field Summary
-
Fields inherited from class org.apache.maven.plugin.surefire.booterclient.ForkConfiguration
DEFAULT_PROVIDER_CLASS
-
-
Constructor Summary
Constructors Constructor Description JarManifestForkConfiguration(Classpath bootClasspath, 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, java.lang.String[] excludedEnvironmentVariables, boolean debug, int forkCount, boolean reuseForks, Platform pluginPlatform, ConsoleLogger log, ForkNodeFactory forkNodeFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.io.FilecreateJar(java.util.List<java.lang.String> classPath, java.lang.String startClassName, java.io.File dumpLogDirectory)Create a jar with just a manifest containing a Main-Class entry for BooterConfiguration and a Class-Path entry for all classpath elements.(package private) static java.lang.StringescapeUri(java.lang.String input, java.nio.charset.Charset encoding)(package private) static java.lang.Stringrelativize(java.nio.file.Path parent, java.nio.file.Path child)protected voidresolveClasspath(Commandline cli, java.lang.String booterThatHasMainMethod, StartupConfiguration config, java.io.File dumpLogDirectory)(package private) static java.lang.StringtoAbsoluteUri(java.nio.file.Path absolutePath)(package private) static JarManifestForkConfiguration.ClasspathElementUritoClasspathElementUri(java.nio.file.Path parent, java.nio.file.Path classPathElement, java.io.File dumpLogDirectory, boolean dumpError)-
Methods inherited from class org.apache.maven.plugin.surefire.booterclient.AbstractClasspathForkConfiguration
extendJvmArgLine
-
Methods inherited from class org.apache.maven.plugin.surefire.booterclient.DefaultForkConfiguration
createCommandLine, getArgLine, getBooterClasspath, getDebugLine, getEnvironmentVariables, getExcludedEnvironmentVariables, getForkCount, getForkNodeFactory, getJdkForTests, getLogger, getModelProperties, getPluginPlatform, getTempDirectory, getWorkingDirectory, isDebug, isReuseForks, toCompleteClasspath
-
-
-
-
Constructor Detail
-
JarManifestForkConfiguration
public JarManifestForkConfiguration(@Nonnull Classpath bootClasspath, @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, @Nonnull java.lang.String[] excludedEnvironmentVariables, boolean debug, int forkCount, boolean reuseForks, @Nonnull Platform pluginPlatform, @Nonnull ConsoleLogger log, @Nonnull ForkNodeFactory forkNodeFactory)
-
-
Method Detail
-
resolveClasspath
protected void resolveClasspath(@Nonnull Commandline cli, @Nonnull java.lang.String booterThatHasMainMethod, @Nonnull StartupConfiguration config, @Nonnull java.io.File dumpLogDirectory) throws SurefireBooterForkException- Specified by:
resolveClasspathin classDefaultForkConfiguration- Throws:
SurefireBooterForkException
-
createJar
@Nonnull private java.io.File createJar(@Nonnull java.util.List<java.lang.String> classPath, @Nonnull java.lang.String startClassName, @Nonnull java.io.File dumpLogDirectory) throws java.io.IOExceptionCreate a jar with just a manifest containing a Main-Class entry for BooterConfiguration and a Class-Path entry for all classpath elements.- Parameters:
classPath- List<String> of all classpath elements.startClassName- The class name to start (main-class)- Returns:
- file of the jar
- Throws:
java.io.IOException- When a file operation fails.
-
relativize
static java.lang.String relativize(@Nonnull java.nio.file.Path parent, @Nonnull java.nio.file.Path child) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
toAbsoluteUri
static java.lang.String toAbsoluteUri(@Nonnull java.nio.file.Path absolutePath)
-
toClasspathElementUri
static JarManifestForkConfiguration.ClasspathElementUri toClasspathElementUri(@Nonnull java.nio.file.Path parent, @Nonnull java.nio.file.Path classPathElement, @Nonnull java.io.File dumpLogDirectory, boolean dumpError)
-
escapeUri
static java.lang.String escapeUri(java.lang.String input, java.nio.charset.Charset encoding)
-
-