public abstract class AbstractMojoTestCase
extends org.codehaus.plexus.PlexusTestCase
Constructor and Description |
---|
AbstractMojoTestCase() |
Modifier and Type | Method and Description |
---|---|
protected void |
addGuiceModules(List<com.google.inject.Module> modules) |
protected Mojo |
configureMojo(Mojo mojo,
org.codehaus.plexus.configuration.PlexusConfiguration pluginConfiguration)
Configure the mojo with the given plexus configuration
|
protected Mojo |
configureMojo(Mojo mojo,
String artifactId,
File pom)
Configure the mojo
|
protected org.codehaus.plexus.configuration.PlexusConfiguration |
extractPluginConfiguration(String artifactId,
File pom) |
protected org.codehaus.plexus.configuration.PlexusConfiguration |
extractPluginConfiguration(String artifactId,
Xpp3Dom pomDom) |
protected org.codehaus.plexus.PlexusContainer |
getContainer() |
protected String |
getPluginDescriptorLocation() |
protected String |
getPluginDescriptorPath() |
protected InputStream |
getPublicDescriptorStream() |
protected Map<String,Object> |
getVariablesAndValuesFromObject(Class<?> clazz,
Object object)
Convenience method to obtain all variables and values from the mojo (including its superclasses)
Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
|
protected Map<String,Object> |
getVariablesAndValuesFromObject(Object object)
Convenience method to obtain all variables and values from the mojo (including its superclasses)
Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
|
protected Object |
getVariableValueFromObject(Object object,
String variable)
Convenience method to obtain the value of a variable on a mojo that might not have a getter.
|
protected Mojo |
lookupConfiguredMojo(MavenProject project,
String goal) |
protected Mojo |
lookupConfiguredMojo(MavenSession session,
MojoExecution execution) |
protected Mojo |
lookupEmptyMojo(String goal,
File pom)
Lookup the mojo leveraging the actual subprojects pom
|
protected Mojo |
lookupEmptyMojo(String goal,
String pluginPom)
Lookup an empty mojo
|
protected Mojo |
lookupMojo(String goal,
File pom)
Lookup the mojo leveraging the actual subprojects pom
|
protected Mojo |
lookupMojo(String goal,
String pluginPom)
Lookup the mojo leveraging the subproject pom
|
protected Mojo |
lookupMojo(String groupId,
String artifactId,
String version,
String goal,
org.codehaus.plexus.configuration.PlexusConfiguration pluginConfiguration)
lookup the mojo while we have all of the relavent information
|
protected MavenSession |
newMavenSession(MavenProject project) |
protected MojoExecution |
newMojoExecution(String goal) |
protected void |
setUp() |
protected void |
setupContainer() |
protected org.codehaus.plexus.ContainerConfiguration |
setupContainerConfiguration() |
protected void |
setVariableValueToObject(Object object,
String variable,
Object value)
Convenience method to set values to variables in objects that don't have setters
|
createContainerInstance, customizeContext, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getCustomConfiguration, getResourceAsStream, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, release, tearDown
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
protected void setUp() throws Exception
setUp
in class org.codehaus.plexus.PlexusTestCase
Exception
protected InputStream getPublicDescriptorStream() throws Exception
Exception
protected String getPluginDescriptorPath()
protected String getPluginDescriptorLocation()
protected void setupContainer()
protected void addGuiceModules(List<com.google.inject.Module> modules)
protected org.codehaus.plexus.ContainerConfiguration setupContainerConfiguration()
protected org.codehaus.plexus.PlexusContainer getContainer()
getContainer
in class org.codehaus.plexus.PlexusTestCase
protected Mojo lookupMojo(String goal, String pluginPom) throws Exception
goal
- pluginPom
- Exception
protected Mojo lookupEmptyMojo(String goal, String pluginPom) throws Exception
goal
- pluginPom
- Exception
protected Mojo lookupMojo(String goal, File pom) throws Exception
goal
- pom
- Exception
protected Mojo lookupEmptyMojo(String goal, File pom) throws Exception
goal
- pom
- Exception
protected Mojo lookupMojo(String groupId, String artifactId, String version, String goal, org.codehaus.plexus.configuration.PlexusConfiguration pluginConfiguration) throws Exception
groupId
- artifactId
- version
- goal
- pluginConfiguration
- Exception
protected Mojo lookupConfiguredMojo(MavenProject project, String goal) throws Exception
project
- goal
- Exception
protected Mojo lookupConfiguredMojo(MavenSession session, MojoExecution execution) throws Exception, org.codehaus.plexus.component.configurator.ComponentConfigurationException
session
- execution
- Exception
org.codehaus.plexus.component.configurator.ComponentConfigurationException
protected MavenSession newMavenSession(MavenProject project)
project
- protected MojoExecution newMojoExecution(String goal)
goal
- protected org.codehaus.plexus.configuration.PlexusConfiguration extractPluginConfiguration(String artifactId, File pom) throws Exception
artifactId
- pom
- Exception
protected org.codehaus.plexus.configuration.PlexusConfiguration extractPluginConfiguration(String artifactId, Xpp3Dom pomDom) throws Exception
artifactId
- pomDom
- Exception
protected Mojo configureMojo(Mojo mojo, String artifactId, File pom) throws Exception
mojo
- artifactId
- pom
- Exception
protected Mojo configureMojo(Mojo mojo, org.codehaus.plexus.configuration.PlexusConfiguration pluginConfiguration) throws Exception
mojo
- pluginConfiguration
- Exception
protected Object getVariableValueFromObject(Object object, String variable) throws IllegalAccessException
object
- variable
- IllegalArgumentException
IllegalAccessException
protected Map<String,Object> getVariablesAndValuesFromObject(Object object) throws IllegalAccessException
object
- IllegalAccessException
protected Map<String,Object> getVariablesAndValuesFromObject(Class<?> clazz, Object object) throws IllegalAccessException
clazz
- object
- IllegalAccessException
protected void setVariableValueToObject(Object object, String variable, Object value) throws IllegalAccessException
object
- variable
- value
- IllegalAccessException
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.