org.apache.maven.plugin
Class PluginManagerTest

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
                  extended by org.apache.maven.plugin.PluginManagerTest
All Implemented Interfaces:
junit.framework.Test

public class PluginManagerTest
extends AbstractCoreMavenComponentTestCase


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.maven.AbstractCoreMavenComponentTestCase
AbstractCoreMavenComponentTestCase.PluginBuilder, AbstractCoreMavenComponentTestCase.ProjectBuilder
 
Field Summary
 
Fields inherited from class org.apache.maven.AbstractCoreMavenComponentTestCase
projectBuilder, repositorySystem
 
Constructor Summary
PluginManagerTest()
           
 
Method Summary
protected  void assertPluginDescriptor(MojoDescriptor mojoDescriptor, String groupId, String artifactId, String version)
           
protected  String getProjectsDirectory()
           
protected  void setUp()
           
protected  void tearDown()
           
 void testAggregatorMojo()
          This is the case where the Mojo wants to execute on every project and then do something at the end with the results of each project.
 void testMojoConfigurationIsMergedCorrectly()
           
 void testMojoDescriptorRetrieval()
           
 void testMojoThatIsPresentInTheCurrentBuild()
          The case where you have a plugin in the current build that you want to be used on projects in the current build.
 void testMojoThatRequiresExecutionToAGivenPhaseBeforeExecutingItself()
          This is the case where a Mojo needs the lifecycle run to a certain phase before it can do anything useful.
 void testMojoWhereInternallyStatedDependencyIsOverriddenByProject()
          The case where the user wants to specify an alternate version of the underlying tool.
 void testPluginLoading()
           
 void testPluginRealmCache()
           
 void testRemoteResourcesPlugin()
           
 void testSurefirePlugin()
           
 void testThatPluginDependencyThatHasSystemScopeIsResolved()
           
 
Methods inherited from class org.apache.maven.AbstractCoreMavenComponentTestCase
createMavenExecutionRequest, createMavenSession, createMavenSession, createStubMavenProject, customizeContainerConfiguration, getLocalRepository, getPluginArtifactRepositories, getProject, getRemoteRepositories, initRepoSession
 
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
 

Constructor Detail

PluginManagerTest

public PluginManagerTest()
Method Detail

setUp

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

tearDown

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

getProjectsDirectory

protected String getProjectsDirectory()
Specified by:
getProjectsDirectory in class AbstractCoreMavenComponentTestCase

testPluginLoading

public void testPluginLoading()
                       throws Exception
Throws:
Exception

testMojoDescriptorRetrieval

public void testMojoDescriptorRetrieval()
                                 throws Exception
Throws:
Exception

testRemoteResourcesPlugin

public void testRemoteResourcesPlugin()
                               throws Exception
Throws:
Exception

testSurefirePlugin

public void testSurefirePlugin()
                        throws Exception
Throws:
Exception

testMojoConfigurationIsMergedCorrectly

public void testMojoConfigurationIsMergedCorrectly()
                                            throws Exception
Throws:
Exception

testMojoWhereInternallyStatedDependencyIsOverriddenByProject

public void testMojoWhereInternallyStatedDependencyIsOverriddenByProject()
                                                                  throws Exception
The case where the user wants to specify an alternate version of the underlying tool. Common case is in the Antlr plugin which comes bundled with a version of Antlr but the user often times needs to use a specific version. We need to make sure the version that they specify takes precedence.

Throws:
Exception

testMojoThatIsPresentInTheCurrentBuild

public void testMojoThatIsPresentInTheCurrentBuild()
                                            throws Exception
The case where you have a plugin in the current build that you want to be used on projects in the current build.

Throws:
Exception

testAggregatorMojo

public void testAggregatorMojo()
                        throws Exception
This is the case where the Mojo wants to execute on every project and then do something at the end with the results of each project.

Throws:
Exception

testMojoThatRequiresExecutionToAGivenPhaseBeforeExecutingItself

public void testMojoThatRequiresExecutionToAGivenPhaseBeforeExecutingItself()
                                                                     throws Exception
This is the case where a Mojo needs the lifecycle run to a certain phase before it can do anything useful.

Throws:
Exception

testThatPluginDependencyThatHasSystemScopeIsResolved

public void testThatPluginDependencyThatHasSystemScopeIsResolved()
                                                          throws Exception
Throws:
Exception

assertPluginDescriptor

protected void assertPluginDescriptor(MojoDescriptor mojoDescriptor,
                                      String groupId,
                                      String artifactId,
                                      String version)

testPluginRealmCache

public void testPluginRealmCache()
                          throws Exception
Throws:
Exception


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