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   */
39  @Deprecated
40  public interface PluginManager {
41      String ROLE = PluginManager.class.getName();
42  
43      void executeMojo(MavenProject project, MojoExecution execution, MavenSession session)
44              throws MojoExecutionException, ArtifactResolutionException, MojoFailureException, ArtifactNotFoundException,
45                      InvalidDependencyVersionException, PluginManagerException, PluginConfigurationException;
46  
47      PluginDescriptor getPluginDescriptorForPrefix(String prefix);
48  
49      Plugin getPluginDefinitionForPrefix(String prefix, MavenSession session, MavenProject project);
50  
51      PluginDescriptor verifyPlugin(
52              Plugin plugin, MavenProject project, Settings settings, ArtifactRepository localRepository)
53              throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
54                      InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException,
55                      PluginNotFoundException, PluginVersionNotFoundException;
56  
57      Object getPluginComponent(Plugin plugin, String role, String roleHint)
58              throws PluginManagerException, ComponentLookupException;
59  
60      Map<String, Object> getPluginComponents(Plugin plugin, String role)
61              throws ComponentLookupException, PluginManagerException;
62  
63      /**
64       * @since 2.2.1
65       */
66      PluginDescriptor loadPluginDescriptor(Plugin plugin, MavenProject project, MavenSession session)
67              throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
68                      InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException,
69                      PluginNotFoundException, PluginVersionNotFoundException;
70  
71      /**
72       * @since 2.2.1
73       */
74      PluginDescriptor loadPluginFully(Plugin plugin, MavenProject project, MavenSession session)
75              throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
76                      InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException,
77                      PluginNotFoundException, PluginVersionNotFoundException;
78  }