View Javadoc

1   package org.apache.maven.plugin;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "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.plugin.descriptor.PluginDescriptor;
29  import org.apache.maven.plugin.version.PluginVersionNotFoundException;
30  import org.apache.maven.plugin.version.PluginVersionResolutionException;
31  import org.apache.maven.project.MavenProject;
32  import org.apache.maven.project.artifact.InvalidDependencyVersionException;
33  import org.apache.maven.settings.Settings;
34  import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
35  
36  import java.util.Map;
37  
38  /**
39   * @author <a href="mailto:jason@maven.org">Jason van Zyl </a>
40   * @version $Id: PluginManager.java 805962 2009-08-19 20:24:35Z bentmann $
41   */
42  @Deprecated
43  public interface PluginManager
44  {
45      String ROLE = PluginManager.class.getName();
46  
47      void executeMojo( MavenProject project, MojoExecution execution, MavenSession session )
48          throws MojoExecutionException, ArtifactResolutionException, MojoFailureException, ArtifactNotFoundException,
49          InvalidDependencyVersionException, PluginManagerException, PluginConfigurationException;
50  
51      PluginDescriptor getPluginDescriptorForPrefix( String prefix );
52  
53      Plugin getPluginDefinitionForPrefix( String prefix, MavenSession session, MavenProject project );
54  
55      PluginDescriptor verifyPlugin( Plugin plugin, MavenProject project, Settings settings,
56                                     ArtifactRepository localRepository )
57          throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
58          InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException, PluginNotFoundException,
59          PluginVersionNotFoundException;
60  
61      Object getPluginComponent( Plugin plugin, String role, String roleHint )
62          throws PluginManagerException, ComponentLookupException;
63  
64      Map getPluginComponents( Plugin plugin, String role )
65          throws ComponentLookupException, PluginManagerException;
66      
67      /**
68       * @since 2.2.1
69       */
70      PluginDescriptor loadPluginDescriptor( Plugin plugin, MavenProject project, MavenSession session )
71          throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
72          InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException, PluginNotFoundException,
73          PluginVersionNotFoundException;
74      
75      /**
76       * @since 2.2.1
77       */
78      PluginDescriptor loadPluginFully( Plugin plugin, MavenProject project, MavenSession session )
79          throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
80          InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException, PluginNotFoundException,
81          PluginVersionNotFoundException;
82  
83  }