1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  package org.apache.maven.plugin;
20  
21  import java.util.List;
22  
23  import org.apache.maven.execution.MavenSession;
24  import org.apache.maven.model.Plugin;
25  import org.apache.maven.plugin.descriptor.MojoDescriptor;
26  import org.apache.maven.plugin.descriptor.PluginDescriptor;
27  import org.codehaus.plexus.classworlds.realm.ClassRealm;
28  import org.eclipse.aether.RepositorySystemSession;
29  import org.eclipse.aether.repository.RemoteRepository;
30  
31  
32  
33  public interface BuildPluginManager {
34      
35      PluginDescriptor loadPlugin(Plugin plugin, List<RemoteRepository> repositories, RepositorySystemSession session)
36              throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
37                      InvalidPluginDescriptorException;
38  
39      
40      MojoDescriptor getMojoDescriptor(
41              Plugin plugin, String goal, List<RemoteRepository> repositories, RepositorySystemSession session)
42              throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
43                      MojoNotFoundException, InvalidPluginDescriptorException;
44  
45      ClassRealm getPluginRealm(MavenSession session, PluginDescriptor pluginDescriptor)
46              throws PluginResolutionException, PluginManagerException;
47  
48      void executeMojo(MavenSession session, MojoExecution execution)
49              throws MojoFailureException, MojoExecutionException, PluginConfigurationException, PluginManagerException;
50  }