org.apache.maven.surefire.booter
Class ForkConfiguration

java.lang.Object
  extended by org.apache.maven.surefire.booter.ForkConfiguration

public class ForkConfiguration
extends java.lang.Object

Configuration for forking tests.

Author:
Brett Porter, Kenney Westerhof

Field Summary
private  java.lang.String argLine
           
private  boolean debug
           
private  java.util.Map environmentVariables
           
static java.lang.String FORK_ALWAYS
           
static java.lang.String FORK_NEVER
           
static java.lang.String FORK_ONCE
           
private  java.lang.String forkMode
           
private  java.lang.String jvmExecutable
           
private  java.util.Properties systemProperties
           
private  java.io.File workingDirectory
           
 
Constructor Summary
ForkConfiguration()
           
 
Method Summary
 org.codehaus.plexus.util.cli.Commandline createCommandLine(java.util.List classPath)
          Deprecated. use the 2-arg alternative.
 org.codehaus.plexus.util.cli.Commandline createCommandLine(java.util.List classPath, boolean useJar)
           
private static java.io.File createJar(java.util.List classPath)
          Create a jar with just a manifest containing a Main-Class entry for SurefireBooter and a Class-Path entry for all classpath elements.
 java.lang.String getForkMode()
           
 java.util.Properties getSystemProperties()
           
 boolean isDebug()
           
 boolean isForking()
           
 void setArgLine(java.lang.String argLine)
           
 void setDebug(boolean debug)
           
 void setEnvironmentVariables(java.util.Map environmentVariables)
           
 void setForkMode(java.lang.String forkMode)
           
 void setJvmExecutable(java.lang.String jvmExecutable)
           
 void setSystemProperties(java.util.Properties systemProperties)
           
 void setWorkingDirectory(java.io.File workingDirectory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORK_ONCE

public static final java.lang.String FORK_ONCE
See Also:
Constant Field Values

FORK_ALWAYS

public static final java.lang.String FORK_ALWAYS
See Also:
Constant Field Values

FORK_NEVER

public static final java.lang.String FORK_NEVER
See Also:
Constant Field Values

forkMode

private java.lang.String forkMode

systemProperties

private java.util.Properties systemProperties

jvmExecutable

private java.lang.String jvmExecutable

argLine

private java.lang.String argLine

environmentVariables

private java.util.Map environmentVariables

workingDirectory

private java.io.File workingDirectory

debug

private boolean debug
Constructor Detail

ForkConfiguration

public ForkConfiguration()
Method Detail

setForkMode

public void setForkMode(java.lang.String forkMode)

isForking

public boolean isForking()

setSystemProperties

public void setSystemProperties(java.util.Properties systemProperties)

setJvmExecutable

public void setJvmExecutable(java.lang.String jvmExecutable)

setArgLine

public void setArgLine(java.lang.String argLine)

setEnvironmentVariables

public void setEnvironmentVariables(java.util.Map environmentVariables)

setWorkingDirectory

public void setWorkingDirectory(java.io.File workingDirectory)

getForkMode

public java.lang.String getForkMode()

getSystemProperties

public java.util.Properties getSystemProperties()

createCommandLine

public org.codehaus.plexus.util.cli.Commandline createCommandLine(java.util.List classPath)
                                                           throws SurefireBooterForkException
Deprecated. use the 2-arg alternative.

Throws:
SurefireBooterForkException

createCommandLine

public org.codehaus.plexus.util.cli.Commandline createCommandLine(java.util.List classPath,
                                                                  boolean useJar)
                                                           throws SurefireBooterForkException
Throws:
SurefireBooterForkException

createJar

private static java.io.File createJar(java.util.List classPath)
                               throws java.io.IOException,
                                      org.codehaus.plexus.archiver.jar.ManifestException,
                                      org.codehaus.plexus.archiver.ArchiverException
Create a jar with just a manifest containing a Main-Class entry for SurefireBooter and a Class-Path entry for all classpath elements.

Parameters:
classPath - List<String> of all classpath elements.
Returns:
Throws:
java.io.IOException
org.codehaus.plexus.archiver.jar.ManifestException
org.codehaus.plexus.archiver.ArchiverException

setDebug

public void setDebug(boolean debug)

isDebug

public boolean isDebug()