org.apache.maven.plugin

## Class DefaultPluginManager

- java.lang.Object
- - AbstractLogEnabled
  - - org.apache.maven.plugin.DefaultPluginManager

- All Implemented Interfaces:
    PluginManager

      public class DefaultPluginManager
      extends AbstractLogEnabled
      implements PluginManager

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ArtifactFactory` | `artifactFactory`
    `protected ArtifactFilter` | `artifactFilter`
    `protected ArtifactMetadataSource` | `artifactMetadataSource`
    `protected ArtifactResolver` | `artifactResolver`
    `protected 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

    Constructors
    Constructor and Description
    `DefaultPluginManager()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addPlugin(Plugin plugin, Artifact pluginArtifact, MavenProject project, ArtifactRepository localRepository)`
    `static java.util.Set` | `checkPlexusUtils(java.util.Set dependencyArtifacts, ArtifactFactory artifactFactory)`
    `void` | `contextualize(Context context)`
    `static PlexusConfiguration` | `copyConfiguration(PlexusConfiguration src)`
    `static java.lang.String` | `createPluginParameterRequiredMessage(MojoDescriptor mojo, Parameter parameter, java.lang.String expression)`
    `void` | `executeMojo(MavenProject project, MojoExecution mojoExecution, MavenSession session)`
    `java.lang.Object` | `getPluginComponent(Plugin plugin, java.lang.String role, java.lang.String roleHint)`
    `java.util.Map` | `getPluginComponents(Plugin plugin, java.lang.String role)`
    `Plugin` | `getPluginDefinitionForPrefix(java.lang.String prefix, MavenSession session, MavenProject project)`
    `PluginDescriptor` | `getPluginDescriptorForPrefix(java.lang.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 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### container

          protected 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(java.lang.String prefix)

      Specified by:
        `getPluginDescriptorForPrefix` in interface `PluginManager`

    - #### getPluginDefinitionForPrefix

          public Plugin getPluginDefinitionForPrefix(java.lang.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 java.util.Set checkPlexusUtils(java.util.Set dependencyArtifacts,
                                       ArtifactFactory artifactFactory)

    - #### copyConfiguration

          public static PlexusConfiguration copyConfiguration(PlexusConfiguration src)

    - #### createPluginParameterRequiredMessage

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

    - #### contextualize

          public void contextualize(Context context)
                             throws ContextException

      Throws:
        `ContextException`

    - #### initialize

          public void initialize()

    - #### getPluginComponent

          public java.lang.Object getPluginComponent(Plugin plugin,
                                            java.lang.String role,
                                            java.lang.String roleHint)
                                              throws PluginManagerException,
                                                     ComponentLookupException

      Specified by:
        `getPluginComponent` in interface `PluginManager`
      Throws:
        `PluginManagerException`
        `ComponentLookupException`

    - #### getPluginComponents

          public java.util.Map getPluginComponents(Plugin plugin,
                                          java.lang.String role)
                                            throws ComponentLookupException,
                                                   PluginManagerException

      Specified by:
        `getPluginComponents` in interface `PluginManager`
      Throws:
        `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`