View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.plugin;
20  
21  import java.util.Map;
22  
23  import org.apache.maven.artifact.repository.ArtifactRepository;
24  import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
25  import org.apache.maven.artifact.resolver.ArtifactResolutionException;
26  import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
27  import org.apache.maven.execution.MavenSession;
28  import org.apache.maven.model.Plugin;
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.settings.Settings;
35  import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
36  
37  /**
38   * @author <a href="mailto:jason@maven.org">Jason van Zyl </a>
39   */
40  @Deprecated
41  public interface PluginManager {
42      String ROLE = PluginManager.class.getName();
43  
44      void executeMojo(MavenProject project, MojoExecution execution, MavenSession session)
45              throws MojoExecutionException, ArtifactResolutionException, MojoFailureException, ArtifactNotFoundException,
46                      InvalidDependencyVersionException, PluginManagerException, PluginConfigurationException;
47  
48      PluginDescriptor getPluginDescriptorForPrefix(String prefix);
49  
50      Plugin getPluginDefinitionForPrefix(String prefix, MavenSession session, MavenProject project);
51  
52      PluginDescriptor verifyPlugin(
53              Plugin plugin, MavenProject project, Settings settings, ArtifactRepository localRepository)
54              throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
55                      InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException,
56                      PluginNotFoundException, PluginVersionNotFoundException;
57  
58      Object getPluginComponent(Plugin plugin, String role, String roleHint)
59              throws PluginManagerException, ComponentLookupException;
60  
61      Map<String, Object> getPluginComponents(Plugin plugin, String role)
62              throws ComponentLookupException, PluginManagerException;
63  
64      /**
65       * @since 2.2.1
66       */
67      PluginDescriptor loadPluginDescriptor(Plugin plugin, MavenProject project, MavenSession session)
68              throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
69                      InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException,
70                      PluginNotFoundException, PluginVersionNotFoundException;
71  
72      /**
73       * @since 2.2.1
74       */
75      PluginDescriptor loadPluginFully(Plugin plugin, MavenProject project, MavenSession session)
76              throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
77                      InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException,
78                      PluginNotFoundException, PluginVersionNotFoundException;
79  }