o collapse signature of the executeMojo

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@760719 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2009-03-31 23:04:43 +00:00
parent 46c8c09a91
commit a8d2eee331
5 changed files with 8 additions and 7 deletions

View File

@ -27,7 +27,6 @@ import org.apache.maven.execution.ReactorManager;
/**
* @author Jason van Zyl
* @version $Id$
*/
public interface Maven
{

View File

@ -353,9 +353,11 @@ public class DefaultPluginManager
// We should assume that We've already loaded the plugin in question.
public void executeMojo( MavenProject project, MojoExecution mojoExecution, MavenSession session )
public void executeMojo( MojoExecution mojoExecution, MavenSession session )
throws MojoFailureException, PluginExecutionException, PluginConfigurationException
{
MavenProject project = session.getCurrentProject();
MojoDescriptor mojoDescriptor = mojoExecution.getMojoDescriptor();
if ( mojoDescriptor.isProjectRequired() && !session.isUsingPOMsFromFilesystem() )

View File

@ -28,10 +28,11 @@ import org.codehaus.plexus.configuration.PlexusConfigurationException;
import java.io.Reader;
//TODO: collapse this into the plugin manager
/**
* @author Jason van Zyl
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
* @version $Id$
*/
@Component( role=ComponentDiscoverer.class)
public class MavenPluginDiscoverer

View File

@ -39,7 +39,6 @@ public interface PluginManager
MojoDescriptor getMojoDescriptor( Plugin plugin, String goal, MavenSession session )
throws PluginLoaderException;
//!!jvz The current project is contained in the session
void executeMojo( MavenProject project, MojoExecution execution, MavenSession session )
void executeMojo( MojoExecution execution, MavenSession session )
throws MojoFailureException, PluginExecutionException, PluginConfigurationException;
}

View File

@ -87,7 +87,7 @@ public class PluginManagerTest
MojoDescriptor mojoDescriptor = pluginManager.getMojoDescriptor( plugin, goal, session );
assertPluginDescriptor( mojoDescriptor, "org.apache.maven.plugins", "maven-remote-resources-plugin", "1.1" );
MojoExecution mojoExecution = new MojoExecution( mojoDescriptor );
pluginManager.executeMojo( session.getCurrentProject(), mojoExecution, session );
pluginManager.executeMojo( mojoExecution, session );
}
public void testSurefirePlugin()
@ -104,7 +104,7 @@ public class PluginManagerTest
MojoDescriptor mojoDescriptor = pluginManager.getMojoDescriptor( plugin, goal, session );
assertPluginDescriptor( mojoDescriptor, "org.apache.maven.plugins", "maven-surefire-plugin", "2.4.2" );
MojoExecution mojoExecution = new MojoExecution( mojoDescriptor );
pluginManager.executeMojo( session.getCurrentProject(), mojoExecution, session );
pluginManager.executeMojo( mojoExecution, session );
}
// -----------------------------------------------------------------------------------------------