Package org.apache.maven.plugin
Class DefaultBuildPluginManager
- java.lang.Object
-
- org.apache.maven.plugin.DefaultBuildPluginManager
-
- All Implemented Interfaces:
BuildPluginManager
@Component(role=BuildPluginManager.class) public class DefaultBuildPluginManager extends java.lang.Object implements BuildPluginManager
DefaultBuildPluginManager
-
-
Field Summary
Fields Modifier and Type Field Description private LegacySupportlegacySupportprivate MavenPluginManagermavenPluginManagerprivate MojoExecutionListenermojoExecutionListenerprivate java.util.List<MojoExecutionListener>mojoExecutionListenersprivate MojoExecutionScopescope
-
Constructor Summary
Constructors Constructor Description DefaultBuildPluginManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecuteMojo(MavenSession session, MojoExecution mojoExecution)MojoDescriptorgetMojoDescriptor(Plugin plugin, java.lang.String goal, java.util.List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session)org.codehaus.plexus.classworlds.realm.ClassRealmgetPluginRealm(MavenSession session, PluginDescriptor pluginDescriptor)TODO pluginDescriptor classRealm and artifacts are set as a side effect of this call, which is not nice.PluginDescriptorloadPlugin(Plugin plugin, java.util.List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session)voidsetMojoExecutionListeners(java.util.List<MojoExecutionListener> listeners)
-
-
-
Field Detail
-
mavenPluginManager
@Requirement private MavenPluginManager mavenPluginManager
-
legacySupport
@Requirement private LegacySupport legacySupport
-
scope
@Requirement private MojoExecutionScope scope
-
mojoExecutionListener
private MojoExecutionListener mojoExecutionListener
-
mojoExecutionListeners
@Requirement(role=MojoExecutionListener.class) private java.util.List<MojoExecutionListener> mojoExecutionListeners
-
-
Method Detail
-
setMojoExecutionListeners
public void setMojoExecutionListeners(java.util.List<MojoExecutionListener> listeners)
-
loadPlugin
public PluginDescriptor loadPlugin(Plugin plugin, java.util.List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, InvalidPluginDescriptorException
- Specified by:
loadPluginin interfaceBuildPluginManager- Parameters:
plugin-repositories-session-- Returns:
- PluginDescriptor The component descriptor for the Maven plugin.
- Throws:
PluginNotFoundException- The plugin could not be found in any repositories.PluginResolutionException- The plugin could be found but could not be resolved.InvalidPluginDescriptorExceptionPluginDescriptorParsingException
-
executeMojo
public void executeMojo(MavenSession session, MojoExecution mojoExecution) throws MojoFailureException, MojoExecutionException, PluginConfigurationException, PluginManagerException
- Specified by:
executeMojoin interfaceBuildPluginManager- Throws:
MojoFailureExceptionMojoExecutionExceptionPluginConfigurationExceptionPluginManagerException
-
getPluginRealm
public org.codehaus.plexus.classworlds.realm.ClassRealm getPluginRealm(MavenSession session, PluginDescriptor pluginDescriptor) throws PluginResolutionException, PluginManagerException
TODO pluginDescriptor classRealm and artifacts are set as a side effect of this call, which is not nice.- Specified by:
getPluginRealmin interfaceBuildPluginManager- Throws:
PluginResolutionExceptionPluginManagerException
-
getMojoDescriptor
public MojoDescriptor getMojoDescriptor(Plugin plugin, java.lang.String goal, java.util.List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException
-
-