1 package org.apache.maven.plugin;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.artifact.repository.ArtifactRepository;
23 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
24 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
25 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
26 import org.apache.maven.execution.MavenSession;
27 import org.apache.maven.model.Plugin;
28 import org.apache.maven.model.ReportPlugin;
29 import org.apache.maven.plugin.descriptor.PluginDescriptor;
30 import org.apache.maven.plugin.version.PluginVersionNotFoundException;
31 import org.apache.maven.plugin.version.PluginVersionResolutionException;
32 import org.apache.maven.project.MavenProject;
33 import org.apache.maven.project.artifact.InvalidDependencyVersionException;
34 import org.apache.maven.reporting.MavenReport;
35 import org.apache.maven.settings.Settings;
36 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
37
38 import java.util.Map;
39
40
41
42
43
44 public interface PluginManager
45 {
46 String ROLE = PluginManager.class.getName();
47
48 void executeMojo( MavenProject project, MojoExecution execution, MavenSession session )
49 throws MojoExecutionException, ArtifactResolutionException, MojoFailureException, ArtifactNotFoundException,
50 InvalidDependencyVersionException, PluginManagerException, PluginConfigurationException;
51
52 MavenReport getReport( MavenProject project, MojoExecution mojoExecution, MavenSession session )
53 throws ArtifactNotFoundException, PluginConfigurationException, PluginManagerException,
54 ArtifactResolutionException;
55
56 PluginDescriptor getPluginDescriptorForPrefix( String prefix );
57
58 Plugin getPluginDefinitionForPrefix( String prefix, MavenSession session, MavenProject project );
59
60
61
62
63 PluginDescriptor verifyPlugin( Plugin plugin, MavenProject project, Settings settings,
64 ArtifactRepository localRepository )
65 throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
66 InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException, PluginNotFoundException,
67 PluginVersionNotFoundException;
68
69 PluginDescriptor verifyReportPlugin( ReportPlugin reportPlugin, MavenProject project, MavenSession session )
70 throws PluginVersionResolutionException, ArtifactResolutionException, ArtifactNotFoundException,
71 InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException, PluginNotFoundException,
72 PluginVersionNotFoundException;
73
74 Object getPluginComponent( Plugin plugin, String role, String roleHint )
75 throws PluginManagerException, ComponentLookupException;
76
77 Map getPluginComponents( Plugin plugin, String role )
78 throws ComponentLookupException, PluginManagerException;
79
80
81
82
83 PluginDescriptor loadPluginDescriptor( Plugin plugin, MavenProject project, MavenSession session )
84 throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
85 InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException, PluginNotFoundException,
86 PluginVersionNotFoundException;
87
88
89
90
91 PluginDescriptor loadPluginFully( Plugin plugin, MavenProject project, MavenSession session )
92 throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
93 InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException, PluginNotFoundException,
94 PluginVersionNotFoundException;
95
96 }