org.apache.maven
Class AbstractCoreMavenComponentTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.codehaus.plexus.PlexusTestCase
              extended by org.apache.maven.AbstractCoreMavenComponentTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
LifecycleExecutionPlanCalculatorTest, LifecycleExecutorSubModulesTest, LifecycleExecutorTest, MavenLifecycleParticipantTest, MavenTest, PluginManagerTest, PluginParameterExpressionEvaluatorTest, ProjectBuilderTest, ProjectDependenciesResolverTest

public abstract class AbstractCoreMavenComponentTestCase
extends PlexusTestCase


Nested Class Summary
protected  class AbstractCoreMavenComponentTestCase.PluginBuilder
           
protected  class AbstractCoreMavenComponentTestCase.ProjectBuilder
           
 
Field Summary
protected  ProjectBuilder projectBuilder
           
protected  RepositorySystem repositorySystem
           
 
Constructor Summary
AbstractCoreMavenComponentTestCase()
           
 
Method Summary
protected  MavenExecutionRequest createMavenExecutionRequest(File pom)
           
protected  MavenSession createMavenSession(File pom)
           
protected  MavenSession createMavenSession(File pom, Properties executionProperties)
           
protected  MavenProject createStubMavenProject()
           
protected  void customizeContainerConfiguration(ContainerConfiguration containerConfiguration)
          We need to customize the standard Plexus container with the plugin discovery listener which is what looks for the META-INF/maven/plugin.xml resources that enter the system when a Maven plugin is loaded.
protected  ArtifactRepository getLocalRepository()
           
protected  List<ArtifactRepository> getPluginArtifactRepositories()
           
protected  File getProject(String name)
           
protected abstract  String getProjectsDirectory()
           
protected  List<ArtifactRepository> getRemoteRepositories()
           
protected  void initRepoSession(ProjectBuildingRequest request)
           
protected  void setUp()
           
protected  void tearDown()
           
 
Methods inherited from class org.codehaus.plexus.PlexusTestCase
customizeContext, getBasedir, getClassLoader, getConfigurationName, getContainer, getCustomConfigurationName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, release, setupContainer, teardownContainer
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
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, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

repositorySystem

@Requirement
protected RepositorySystem repositorySystem

projectBuilder

@Requirement
protected ProjectBuilder projectBuilder
Constructor Detail

AbstractCoreMavenComponentTestCase

public AbstractCoreMavenComponentTestCase()
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class PlexusTestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class PlexusTestCase
Throws:
Exception

getProjectsDirectory

protected abstract String getProjectsDirectory()

getProject

protected File getProject(String name)
                   throws Exception
Throws:
Exception

customizeContainerConfiguration

protected void customizeContainerConfiguration(ContainerConfiguration containerConfiguration)
We need to customize the standard Plexus container with the plugin discovery listener which is what looks for the META-INF/maven/plugin.xml resources that enter the system when a Maven plugin is loaded. We also need to customize the Plexus container with a standard plugin discovery listener which is the MavenPluginCollector. When a Maven plugin is discovered the MavenPluginCollector collects the plugin descriptors which are found.

Overrides:
customizeContainerConfiguration in class PlexusTestCase

createMavenExecutionRequest

protected MavenExecutionRequest createMavenExecutionRequest(File pom)
                                                     throws Exception
Throws:
Exception

createMavenSession

protected MavenSession createMavenSession(File pom)
                                   throws Exception
Throws:
Exception

createMavenSession

protected MavenSession createMavenSession(File pom,
                                          Properties executionProperties)
                                   throws Exception
Throws:
Exception

initRepoSession

protected void initRepoSession(ProjectBuildingRequest request)
                        throws Exception
Throws:
Exception

createStubMavenProject

protected MavenProject createStubMavenProject()

getRemoteRepositories

protected List<ArtifactRepository> getRemoteRepositories()
                                                  throws InvalidRepositoryException
Throws:
InvalidRepositoryException

getPluginArtifactRepositories

protected List<ArtifactRepository> getPluginArtifactRepositories()
                                                          throws InvalidRepositoryException
Throws:
InvalidRepositoryException

getLocalRepository

protected ArtifactRepository getLocalRepository()
                                         throws InvalidRepositoryException
Throws:
InvalidRepositoryException


Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.