org.apache.maven.plugin.surefire.booterclient
Class ForkConfiguration
java.lang.Object
org.apache.maven.plugin.surefire.booterclient.ForkConfiguration
public class ForkConfiguration
- extends Object
Configuration for forking tests.
- Author:
- Brett Porter, Kenney Westerhof, Kristian Rosenvold
Constructor Summary |
ForkConfiguration(Classpath bootClasspathConfiguration,
File tmpDir,
String debugLine,
String jvmExecutable,
File workingDirectory,
String argLine,
Map<String,String> environmentVariables,
boolean debugEnabled,
int forkCount,
boolean reuseForks)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FORK_ONCE
public static final String FORK_ONCE
- See Also:
- Constant Field Values
FORK_ALWAYS
public static final String FORK_ALWAYS
- See Also:
- Constant Field Values
FORK_NEVER
public static final String FORK_NEVER
- See Also:
- Constant Field Values
FORK_PERTHREAD
public static final String FORK_PERTHREAD
- See Also:
- Constant Field Values
ForkConfiguration
public ForkConfiguration(Classpath bootClasspathConfiguration,
File tmpDir,
String debugLine,
String jvmExecutable,
File workingDirectory,
String argLine,
Map<String,String> environmentVariables,
boolean debugEnabled,
int forkCount,
boolean reuseForks)
getBootClasspath
public Classpath getBootClasspath()
getEffectiveForkMode
public static String getEffectiveForkMode(String forkMode)
createCommandLine
public OutputStreamFlushableCommandline createCommandLine(List<String> classPath,
ClassLoaderConfiguration classpathConfiguration,
boolean shadefire,
int threadNumber)
throws SurefireBooterForkException
- Parameters:
classPath
- cla the classpath argumentsclasspathConfiguration
- the classpath configurationshadefire
- true if running shadefirethreadNumber
- the thread number, to be the replacement in the argLine
- Returns:
- A commandline
- Throws:
SurefireBooterForkException
- when unable to perform the fork
createCommandLine
public OutputStreamFlushableCommandline createCommandLine(List<String> classPath,
boolean useJar,
boolean shadefire,
int threadNumber)
throws SurefireBooterForkException
- Throws:
SurefireBooterForkException
createJar
public File createJar(List<String> classPath)
throws IOException
- Create 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.
- Returns:
- The file pointint to the jar
- Throws:
IOException
- When a file operation fails.
isDebug
public boolean isDebug()
stripNewLines
public String stripNewLines(String argline)
getDebugLine
public String getDebugLine()
getTempDirectory
public File getTempDirectory()
getForkCount
public int getForkCount()
isReuseForks
public boolean isReuseForks()
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.