org.apache.maven.plugin.surefire
Class AbstractSurefireMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.surefire.AbstractSurefireMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, SurefireExecutionParameters

public abstract class AbstractSurefireMojo
extends org.apache.maven.plugin.AbstractMojo
implements SurefireExecutionParameters

Abstract base class for running tests using Surefire.

Version:
$Id: SurefirePlugin.java 945065 2010-05-17 10:26:22Z stephenc $
Author:
Stephen Connolly

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractSurefireMojo()
           
 
Method Summary
protected  SurefireBooter constructSurefireBooter()
           
protected  void ensureParallelRunningCompatibility()
           
protected  void ensureWorkingDirectoryExists()
           
 java.util.List generateTestClasspath()
          Generate the test classpath.
protected abstract  java.lang.String[] getDefaultIncludes()
           
protected abstract  java.lang.String getPluginName()
           
protected  org.apache.maven.toolchain.Toolchain getToolchain()
           
protected  boolean isAnyConcurrencySelected()
           
protected  boolean isForkModeNever()
           
protected  void processSystemProperties(boolean setInSystem)
           
protected abstract  boolean verifyParameters()
           
protected  void warnIfUselessUseSystemClassLoaderParameter()
           
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.plugin.surefire.SurefireExecutionParameters
getAdditionalClasspathElements, getArgLine, getArtifactFactory, getArtifactResolver, getBasedir, getClassesDirectory, getClasspathDependencyExcludes, getClasspathDependencyScopeExclude, getDebugForkedProcess, getEnvironmentVariables, getExcludedGroups, getExcludes, getFailIfNoTests, getForkedProcessTimeoutInSeconds, getForkMode, getGroups, getIncludes, getInternalSystemProperties, getJunitArtifactName, getJvm, getLocalRepository, getMetadataSource, getObjectFactory, getOriginalSystemProperties, getParallel, getPerCoreThreadCount, getPluginArtifactMap, getProject, getProjectArtifactMap, getProperties, getRemoteRepositories, getReportFormat, getReportsDirectory, getSession, getSuiteXmlFiles, getSystemProperties, getSystemPropertyVariables, getTest, getTestClassesDirectory, getTestNGArtifactName, getTestSourceDirectory, getThreadCount, getToolchainManager, getUseSystemClassLoader, getUseUnlimitedThreads, getWorkingDirectory, isChildDelegation, isDisableXmlReport, isEnableAssertions, isMavenParallel, isPrintSummary, isRedirectTestOutputToFile, isSkip, isSkipExec, isSkipTests, isTrimStackTrace, isUseFile, isUseManifestOnlyJar, setAdditionalClasspathElements, setArgLine, setArtifactFactory, setArtifactResolver, setBasedir, setChildDelegation, setClassesDirectory, setClasspathDependencyExcludes, setClasspathDependencyScopeExclude, setDebugForkedProcess, setDisableXmlReport, setEnableAssertions, setEnvironmentVariables, setExcludedGroups, setExcludes, setFailIfNoTests, setForkedProcessTimeoutInSeconds, setForkMode, setGroups, setIncludes, setInternalSystemProperties, setJunitArtifactName, setJvm, setLocalRepository, setMetadataSource, setObjectFactory, setOriginalSystemProperties, setParallel, setPerCoreThreadCount, setPluginArtifactMap, setPrintSummary, setProject, setProjectArtifactMap, setProperties, setRedirectTestOutputToFile, setRemoteRepositories, setReportFormat, setReportsDirectory, setSession, setSkip, setSkipExec, setSkipTests, setSuiteXmlFiles, setSystemProperties, setSystemPropertyVariables, setTest, setTestClassesDirectory, setTestNGArtifactName, setTestSourceDirectory, setThreadCount, setToolchainManager, setTrimStackTrace, setUseFile, setUseManifestOnlyJar, setUseSystemClassLoader, setUseUnlimitedThreads, setWorkingDirectory
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Constructor Detail

AbstractSurefireMojo

public AbstractSurefireMojo()
Method Detail

getPluginName

protected abstract java.lang.String getPluginName()

verifyParameters

protected abstract boolean verifyParameters()
                                     throws org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoFailureException

getToolchain

protected final org.apache.maven.toolchain.Toolchain getToolchain()

isAnyConcurrencySelected

protected boolean isAnyConcurrencySelected()

isForkModeNever

protected boolean isForkModeNever()

constructSurefireBooter

protected SurefireBooter constructSurefireBooter()
                                          throws org.apache.maven.plugin.MojoExecutionException,
                                                 org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

getDefaultIncludes

protected abstract java.lang.String[] getDefaultIncludes()

generateTestClasspath

public java.util.List generateTestClasspath()
                                     throws org.apache.maven.artifact.DependencyResolutionRequiredException,
                                            org.apache.maven.plugin.MojoExecutionException
Generate the test classpath.

Returns:
List containing the classpath elements
Throws:
org.apache.maven.artifact.DependencyResolutionRequiredException
org.apache.maven.plugin.MojoExecutionException

processSystemProperties

protected void processSystemProperties(boolean setInSystem)

ensureWorkingDirectoryExists

protected void ensureWorkingDirectoryExists()
                                     throws org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoFailureException

ensureParallelRunningCompatibility

protected void ensureParallelRunningCompatibility()
                                           throws org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoFailureException

warnIfUselessUseSystemClassLoaderParameter

protected void warnIfUselessUseSystemClassLoaderParameter()


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.