001package org.apache.maven.plugin;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 *  http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022import org.apache.maven.artifact.repository.ArtifactRepository;
023import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
024import org.apache.maven.artifact.resolver.ArtifactResolutionException;
025import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
026import org.apache.maven.execution.MavenSession;
027import org.apache.maven.model.Plugin;
028import org.apache.maven.plugin.descriptor.PluginDescriptor;
029import org.apache.maven.plugin.version.PluginVersionNotFoundException;
030import org.apache.maven.plugin.version.PluginVersionResolutionException;
031import org.apache.maven.project.MavenProject;
032import org.apache.maven.project.artifact.InvalidDependencyVersionException;
033import org.apache.maven.settings.Settings;
034import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
035
036import java.util.Map;
037
038/**
039 * @author <a href="mailto:jason@maven.org">Jason van Zyl </a>
040 */
041@Deprecated
042public interface PluginManager
043{
044    String ROLE = PluginManager.class.getName();
045
046    void executeMojo( MavenProject project, MojoExecution execution, MavenSession session )
047        throws MojoExecutionException, ArtifactResolutionException, MojoFailureException, ArtifactNotFoundException,
048        InvalidDependencyVersionException, PluginManagerException, PluginConfigurationException;
049
050    PluginDescriptor getPluginDescriptorForPrefix( String prefix );
051
052    Plugin getPluginDefinitionForPrefix( String prefix, MavenSession session, MavenProject project );
053
054    PluginDescriptor verifyPlugin( Plugin plugin, MavenProject project, Settings settings,
055                                   ArtifactRepository localRepository )
056        throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
057        InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException, PluginNotFoundException,
058        PluginVersionNotFoundException;
059
060    Object getPluginComponent( Plugin plugin, String role, String roleHint )
061        throws PluginManagerException, ComponentLookupException;
062
063    Map<String, Object> getPluginComponents( Plugin plugin, String role )
064        throws ComponentLookupException, PluginManagerException;
065
066    /**
067     * @since 2.2.1
068     */
069    PluginDescriptor loadPluginDescriptor( Plugin plugin, MavenProject project, MavenSession session )
070        throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
071        InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException, PluginNotFoundException,
072        PluginVersionNotFoundException;
073
074    /**
075     * @since 2.2.1
076     */
077    PluginDescriptor loadPluginFully( Plugin plugin, MavenProject project, MavenSession session )
078        throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
079        InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException, PluginNotFoundException,
080        PluginVersionNotFoundException;
081
082}