org.apache.maven.plugin
Class DefaultPluginManager

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.plugin.DefaultPluginManager
All Implemented Interfaces:
PluginManager, org.codehaus.plexus.logging.LogEnabled, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable

public class DefaultPluginManager
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements PluginManager, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable


Field Summary
protected  ArtifactFactory artifactFactory
           
protected  ArtifactFilter artifactFilter
           
protected  ArtifactMetadataSource artifactMetadataSource
           
protected  ArtifactResolver artifactResolver
           
protected  org.codehaus.plexus.PlexusContainer container
           
protected  MavenProjectBuilder mavenProjectBuilder
           
protected  PathTranslator pathTranslator
           
protected  MavenPluginCollector pluginCollector
           
protected  PluginDescriptorBuilder pluginDescriptorBuilder
           
protected  PluginMappingManager pluginMappingManager
           
protected  PluginVersionManager pluginVersionManager
           
protected  RuntimeInformation runtimeInformation
           
 
Fields inherited from interface org.apache.maven.plugin.PluginManager
ROLE
 
Constructor Summary
DefaultPluginManager()
           
 
Method Summary
protected  void addPlugin(Plugin plugin, Artifact pluginArtifact, MavenProject project, ArtifactRepository localRepository)
           
static Set checkPlexusUtils(Set dependencyArtifacts, ArtifactFactory artifactFactory)
           
 void contextualize(org.codehaus.plexus.context.Context context)
           
static org.codehaus.plexus.configuration.PlexusConfiguration copyConfiguration(org.codehaus.plexus.configuration.PlexusConfiguration src)
           
static String createPluginParameterRequiredMessage(MojoDescriptor mojo, Parameter parameter, String expression)
           
 void executeMojo(MavenProject project, MojoExecution mojoExecution, MavenSession session)
           
 Object getPluginComponent(Plugin plugin, String role, String roleHint)
           
 Map getPluginComponents(Plugin plugin, String role)
           
 Plugin getPluginDefinitionForPrefix(String prefix, MavenSession session, MavenProject project)
           
 PluginDescriptor getPluginDescriptorForPrefix(String prefix)
           
 MavenReport getReport(MavenProject project, MojoExecution mojoExecution, MavenSession session)
           
 void initialize()
           
 PluginDescriptor loadPluginDescriptor(Plugin plugin, MavenProject project, MavenSession session)
          
 PluginDescriptor loadPluginFully(Plugin plugin, MavenProject project, MavenSession session)
          
 PluginDescriptor verifyPlugin(Plugin plugin, MavenProject project, Settings settings, ArtifactRepository localRepository)
          
 PluginDescriptor verifyReportPlugin(ReportPlugin reportPlugin, MavenProject project, MavenSession session)
           
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

container

protected org.codehaus.plexus.PlexusContainer container

pluginDescriptorBuilder

protected PluginDescriptorBuilder pluginDescriptorBuilder

artifactFilter

protected ArtifactFilter artifactFilter

pathTranslator

protected PathTranslator pathTranslator

pluginCollector

protected MavenPluginCollector pluginCollector

pluginVersionManager

protected PluginVersionManager pluginVersionManager

artifactFactory

protected ArtifactFactory artifactFactory

artifactResolver

protected ArtifactResolver artifactResolver

artifactMetadataSource

protected ArtifactMetadataSource artifactMetadataSource

runtimeInformation

protected RuntimeInformation runtimeInformation

mavenProjectBuilder

protected MavenProjectBuilder mavenProjectBuilder

pluginMappingManager

protected PluginMappingManager pluginMappingManager
Constructor Detail

DefaultPluginManager

public DefaultPluginManager()
Method Detail

getPluginDescriptorForPrefix

public PluginDescriptor getPluginDescriptorForPrefix(String prefix)
Specified by:
getPluginDescriptorForPrefix in interface PluginManager

getPluginDefinitionForPrefix

public Plugin getPluginDefinitionForPrefix(String prefix,
                                           MavenSession session,
                                           MavenProject project)
Specified by:
getPluginDefinitionForPrefix in interface PluginManager

verifyPlugin

public PluginDescriptor verifyPlugin(Plugin plugin,
                                     MavenProject project,
                                     Settings settings,
                                     ArtifactRepository localRepository)
                              throws ArtifactResolutionException,
                                     PluginVersionResolutionException,
                                     ArtifactNotFoundException,
                                     InvalidVersionSpecificationException,
                                     InvalidPluginException,
                                     PluginManagerException,
                                     PluginNotFoundException,
                                     PluginVersionNotFoundException

Specified by:
verifyPlugin in interface PluginManager
Throws:
ArtifactResolutionException
PluginVersionResolutionException
ArtifactNotFoundException
InvalidVersionSpecificationException
InvalidPluginException
PluginManagerException
PluginNotFoundException
PluginVersionNotFoundException

addPlugin

protected void addPlugin(Plugin plugin,
                         Artifact pluginArtifact,
                         MavenProject project,
                         ArtifactRepository localRepository)
                  throws PluginManagerException,
                         InvalidPluginException
Throws:
PluginManagerException
InvalidPluginException

executeMojo

public void executeMojo(MavenProject project,
                        MojoExecution mojoExecution,
                        MavenSession session)
                 throws ArtifactResolutionException,
                        MojoExecutionException,
                        MojoFailureException,
                        ArtifactNotFoundException,
                        InvalidDependencyVersionException,
                        PluginManagerException,
                        PluginConfigurationException
Specified by:
executeMojo in interface PluginManager
Throws:
ArtifactResolutionException
MojoExecutionException
MojoFailureException
ArtifactNotFoundException
InvalidDependencyVersionException
PluginManagerException
PluginConfigurationException

getReport

public MavenReport getReport(MavenProject project,
                             MojoExecution mojoExecution,
                             MavenSession session)
                      throws ArtifactNotFoundException,
                             PluginConfigurationException,
                             PluginManagerException,
                             ArtifactResolutionException
Specified by:
getReport in interface PluginManager
Throws:
ArtifactNotFoundException
PluginConfigurationException
PluginManagerException
ArtifactResolutionException

verifyReportPlugin

public PluginDescriptor verifyReportPlugin(ReportPlugin reportPlugin,
                                           MavenProject project,
                                           MavenSession session)
                                    throws PluginVersionResolutionException,
                                           ArtifactResolutionException,
                                           ArtifactNotFoundException,
                                           InvalidVersionSpecificationException,
                                           InvalidPluginException,
                                           PluginManagerException,
                                           PluginNotFoundException,
                                           PluginVersionNotFoundException
Specified by:
verifyReportPlugin in interface PluginManager
Throws:
PluginVersionResolutionException
ArtifactResolutionException
ArtifactNotFoundException
InvalidVersionSpecificationException
InvalidPluginException
PluginManagerException
PluginNotFoundException
PluginVersionNotFoundException

checkPlexusUtils

public static Set checkPlexusUtils(Set dependencyArtifacts,
                                   ArtifactFactory artifactFactory)

copyConfiguration

public static org.codehaus.plexus.configuration.PlexusConfiguration copyConfiguration(org.codehaus.plexus.configuration.PlexusConfiguration src)

createPluginParameterRequiredMessage

public static String createPluginParameterRequiredMessage(MojoDescriptor mojo,
                                                          Parameter parameter,
                                                          String expression)

contextualize

public void contextualize(org.codehaus.plexus.context.Context context)
                   throws org.codehaus.plexus.context.ContextException
Specified by:
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Throws:
org.codehaus.plexus.context.ContextException

initialize

public void initialize()
Specified by:
initialize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable

getPluginComponent

public Object getPluginComponent(Plugin plugin,
                                 String role,
                                 String roleHint)
                          throws PluginManagerException,
                                 org.codehaus.plexus.component.repository.exception.ComponentLookupException
Specified by:
getPluginComponent in interface PluginManager
Throws:
PluginManagerException
org.codehaus.plexus.component.repository.exception.ComponentLookupException

getPluginComponents

public Map getPluginComponents(Plugin plugin,
                               String role)
                        throws org.codehaus.plexus.component.repository.exception.ComponentLookupException,
                               PluginManagerException
Specified by:
getPluginComponents in interface PluginManager
Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
PluginManagerException

loadPluginFully

public PluginDescriptor loadPluginFully(Plugin plugin,
                                        MavenProject project,
                                        MavenSession session)
                                 throws ArtifactResolutionException,
                                        PluginVersionResolutionException,
                                        ArtifactNotFoundException,
                                        InvalidVersionSpecificationException,
                                        InvalidPluginException,
                                        PluginManagerException,
                                        PluginNotFoundException,
                                        PluginVersionNotFoundException

Specified by:
loadPluginFully in interface PluginManager
Throws:
ArtifactResolutionException
PluginVersionResolutionException
ArtifactNotFoundException
InvalidVersionSpecificationException
InvalidPluginException
PluginManagerException
PluginNotFoundException
PluginVersionNotFoundException

loadPluginDescriptor

public PluginDescriptor loadPluginDescriptor(Plugin plugin,
                                             MavenProject project,
                                             MavenSession session)
                                      throws ArtifactResolutionException,
                                             PluginVersionResolutionException,
                                             ArtifactNotFoundException,
                                             InvalidVersionSpecificationException,
                                             InvalidPluginException,
                                             PluginManagerException,
                                             PluginNotFoundException,
                                             PluginVersionNotFoundException

Specified by:
loadPluginDescriptor in interface PluginManager
Throws:
ArtifactResolutionException
PluginVersionResolutionException
ArtifactNotFoundException
InvalidVersionSpecificationException
InvalidPluginException
PluginManagerException
PluginNotFoundException
PluginVersionNotFoundException


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.