01: package org.apache.maven.plugin;
02:
03: /*
04: * Licensed to the Apache Software Foundation (ASF) under one
05: * or more contributor license agreements. See the NOTICE file
06: * distributed with this work for additional information
07: * regarding copyright ownership. The ASF licenses this file
08: * to you under the Apache License, Version 2.0 (the
09: * "License"); you may not use this file except in compliance
10: * with the License. You may obtain a copy of the License at
11: *
12: * http://www.apache.org/licenses/LICENSE-2.0
13: *
14: * Unless required by applicable law or agreed to in writing,
15: * software distributed under the License is distributed on an
16: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17: * KIND, either express or implied. See the License for the
18: * specific language governing permissions and limitations
19: * under the License.
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: * @author <a href="mailto:jason@maven.org">Jason van Zyl </a>
42: * @version $Id: PluginManager.java 572872 2007-09-05 04:38:49Z jvanzyl $
43: */
44: public interface PluginManager {
45: String ROLE = PluginManager.class.getName();
46:
47: void executeMojo(MavenProject project, MojoExecution execution,
48: MavenSession session) throws MojoExecutionException,
49: ArtifactResolutionException, MojoFailureException,
50: ArtifactNotFoundException,
51: InvalidDependencyVersionException, PluginManagerException,
52: PluginConfigurationException;
53:
54: MavenReport getReport(MavenProject project,
55: MojoExecution mojoExecution, MavenSession session)
56: throws ArtifactNotFoundException,
57: PluginConfigurationException, PluginManagerException,
58: ArtifactResolutionException;
59:
60: PluginDescriptor getPluginDescriptorForPrefix(String prefix);
61:
62: Plugin getPluginDefinitionForPrefix(String prefix,
63: MavenSession session, MavenProject project);
64:
65: PluginDescriptor verifyPlugin(Plugin plugin, MavenProject project,
66: MavenSession session) throws ArtifactResolutionException,
67: PluginVersionResolutionException,
68: ArtifactNotFoundException,
69: InvalidVersionSpecificationException,
70: InvalidPluginException, PluginManagerException,
71: PluginNotFoundException, PluginVersionNotFoundException;
72:
73: PluginDescriptor verifyReportPlugin(ReportPlugin reportPlugin,
74: MavenProject project, MavenSession session)
75: throws PluginVersionResolutionException,
76: ArtifactResolutionException, ArtifactNotFoundException,
77: InvalidVersionSpecificationException,
78: InvalidPluginException, PluginManagerException,
79: PluginNotFoundException, PluginVersionNotFoundException;
80:
81: Object getPluginComponent(Plugin plugin, String role,
82: String roleHint) throws PluginManagerException,
83: ComponentLookupException;
84:
85: Map getPluginComponents(Plugin plugin, String role)
86: throws ComponentLookupException, PluginManagerException;
87:
88: }
|