o Removed unused exception

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@807237 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-08-24 14:29:47 +00:00
parent 29b30a3249
commit 855ae11f28
5 changed files with 20 additions and 30 deletions

View File

@ -39,7 +39,6 @@ import org.apache.maven.lifecycle.mapping.LifecycleMapping;
import org.apache.maven.model.Dependency;
import org.apache.maven.model.Plugin;
import org.apache.maven.model.PluginExecution;
import org.apache.maven.plugin.CycleDetectedInPluginGraphException;
import org.apache.maven.plugin.InvalidPluginDescriptorException;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.plugin.MojoExecutionException;
@ -381,9 +380,9 @@ public class DefaultLifecycleExecutor
public MavenExecutionPlan calculateExecutionPlan( MavenSession session, String... tasks )
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
CycleDetectedInPluginGraphException, MojoNotFoundException, NoPluginFoundForPrefixException,
InvalidPluginDescriptorException, PluginManagerException, LifecyclePhaseNotFoundException,
LifecycleNotFoundException, PluginVersionResolutionException
MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
PluginManagerException, LifecyclePhaseNotFoundException, LifecycleNotFoundException,
PluginVersionResolutionException
{
MavenProject project = session.getCurrentProject();
@ -467,8 +466,11 @@ public class DefaultLifecycleExecutor
}
}
private void calculateExecutionForIndividualGoal( MavenSession session, List<MojoExecution> lifecyclePlan, String goal )
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, CycleDetectedInPluginGraphException, MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, PluginVersionResolutionException
private void calculateExecutionForIndividualGoal( MavenSession session, List<MojoExecution> lifecyclePlan,
String goal )
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
PluginVersionResolutionException
{
// If this is a goal like "mvn modello:java" and the POM looks like the following:
//
@ -515,8 +517,8 @@ public class DefaultLifecycleExecutor
private void calculateExecutionForLifecyclePhase( MavenSession session, List<MojoExecution> lifecyclePlan,
String lifecyclePhase )
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
CycleDetectedInPluginGraphException, MojoNotFoundException, NoPluginFoundForPrefixException,
InvalidPluginDescriptorException, LifecyclePhaseNotFoundException
MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
LifecyclePhaseNotFoundException
{
Map<String, List<MojoExecution>> phaseToMojoMapping = calculateLifecycleMappings( session, lifecyclePhase );
@ -528,8 +530,7 @@ public class DefaultLifecycleExecutor
private Map<String, List<MojoExecution>> calculateLifecycleMappings( MavenSession session, String lifecyclePhase )
throws LifecyclePhaseNotFoundException, PluginNotFoundException, PluginResolutionException,
PluginDescriptorParsingException, CycleDetectedInPluginGraphException, MojoNotFoundException,
InvalidPluginDescriptorException
PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException
{
/*
* Determine the lifecycle that corresponds to the given phase.
@ -616,8 +617,8 @@ public class DefaultLifecycleExecutor
private void calculateForkedExecutions( MojoExecution mojoExecution, MavenSession session, MavenProject project,
Collection<MojoDescriptor> alreadyForkedExecutions )
throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException,
PluginDescriptorParsingException, CycleDetectedInPluginGraphException, NoPluginFoundForPrefixException,
InvalidPluginDescriptorException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
{
MojoDescriptor mojoDescriptor = mojoExecution.getMojoDescriptor();
@ -883,7 +884,7 @@ public class DefaultLifecycleExecutor
// org.apache.maven.plugins:maven-remote-resources-plugin:1.0:process
MojoDescriptor getMojoDescriptor( String task, MavenSession session )
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, CycleDetectedInPluginGraphException, MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, PluginVersionResolutionException
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, PluginVersionResolutionException
{
MavenProject project = session.getCurrentProject();
@ -1176,10 +1177,6 @@ public class DefaultLifecycleExecutor
{
throw new LifecycleExecutionException( "Error getting default plugin information for " + plugin.getId(), e );
}
catch ( CycleDetectedInPluginGraphException e )
{
throw new LifecycleExecutionException( "Error getting default plugin information for " + plugin.getId(), e );
}
catch ( MojoNotFoundException e )
{
throw new LifecycleExecutionException( "Error getting default plugin information for " + plugin.getId(), e );

View File

@ -25,7 +25,6 @@ import java.util.Set;
import org.apache.maven.artifact.repository.RepositoryRequest;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.model.Plugin;
import org.apache.maven.plugin.CycleDetectedInPluginGraphException;
import org.apache.maven.plugin.InvalidPluginDescriptorException;
import org.apache.maven.plugin.MojoNotFoundException;
import org.apache.maven.plugin.PluginDescriptorParsingException;
@ -51,7 +50,7 @@ public interface LifecycleExecutor
*/
MavenExecutionPlan calculateExecutionPlan( MavenSession session, String... tasks )
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
CycleDetectedInPluginGraphException, MojoNotFoundException, NoPluginFoundForPrefixException,
MojoNotFoundException, NoPluginFoundForPrefixException,
InvalidPluginDescriptorException, PluginManagerException, LifecyclePhaseNotFoundException,
LifecycleNotFoundException, PluginVersionResolutionException;

View File

@ -28,11 +28,11 @@ public interface BuildPluginManager
{
// igorf: Way too many declared exceptions!
PluginDescriptor loadPlugin( Plugin plugin, RepositoryRequest repositoryRequest )
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, CycleDetectedInPluginGraphException, InvalidPluginDescriptorException;
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, InvalidPluginDescriptorException;
// igorf: Way too many declared exceptions!
MojoDescriptor getMojoDescriptor( Plugin plugin, String goal, RepositoryRequest repositoryRequest )
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, CycleDetectedInPluginGraphException, MojoNotFoundException, InvalidPluginDescriptorException;
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException;
void executeMojo( MavenSession session, MojoExecution execution )
throws MojoFailureException, MojoExecutionException, PluginConfigurationException, PluginManagerException;

View File

@ -32,8 +32,6 @@ import org.codehaus.plexus.PlexusContainer;
import org.codehaus.plexus.classworlds.realm.ClassRealm;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import org.codehaus.plexus.component.composition.CycleDetectedInComponentGraphException;
import org.codehaus.plexus.configuration.PlexusConfigurationException;
// TODO: the antrun plugin has its own configurator, the only plugin that does. might need to think about how that works
// TODO: remove the coreArtifactFilterManager
@ -63,12 +61,9 @@ public class DefaultBuildPluginManager
* @throws PluginNotFoundException The plugin could not be found in any repositories.
* @throws PluginResolutionException The plugin could be found but could not be resolved.
* @throws InvalidPluginDescriptorException
* @throws PlexusConfigurationException A discovered component descriptor cannot be read, or or can't be parsed correctly. Shouldn't
* happen but if someone has made a descriptor by hand it's possible.
* @throws CycleDetectedInComponentGraphException A cycle has been detected in the component graph for a plugin that has been dynamically loaded.
*/
public synchronized PluginDescriptor loadPlugin( Plugin plugin, RepositoryRequest repositoryRequest )
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, CycleDetectedInPluginGraphException, InvalidPluginDescriptorException
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, InvalidPluginDescriptorException
{
return mavenPluginManager.getPluginDescriptor( plugin, repositoryRequest );
}
@ -183,7 +178,7 @@ public class DefaultBuildPluginManager
public MojoDescriptor getMojoDescriptor( Plugin plugin, String goal, RepositoryRequest repositoryRequest )
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
CycleDetectedInPluginGraphException, MojoNotFoundException, InvalidPluginDescriptorException
MojoNotFoundException, InvalidPluginDescriptorException
{
return mavenPluginManager.getMojoDescriptor( plugin, goal, repositoryRequest );
}

View File

@ -32,7 +32,6 @@ import org.apache.maven.lifecycle.LifecycleExecutionException;
import org.apache.maven.lifecycle.LifecycleExecutor;
import org.apache.maven.lifecycle.MavenExecutionPlan;
import org.apache.maven.model.Plugin;
import org.apache.maven.plugin.CycleDetectedInPluginGraphException;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.plugin.MojoNotFoundException;
import org.apache.maven.plugin.PluginDescriptorParsingException;
@ -52,7 +51,7 @@ public class EmptyLifecycleExecutor
public MavenExecutionPlan calculateExecutionPlan( MavenSession session, String... tasks )
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
CycleDetectedInPluginGraphException, MojoNotFoundException
MojoNotFoundException
{
return new MavenExecutionPlan( Collections.<MojoExecution> emptyList(), null );
}