Package org.apache.maven.plugin
Class DefaultBuildPluginManager
java.lang.Object
org.apache.maven.plugin.DefaultBuildPluginManager
- All Implemented Interfaces:
BuildPluginManager
@Named
@Singleton
public class DefaultBuildPluginManager
extends Object
implements BuildPluginManager
DefaultBuildPluginManager
-
Constructor Summary
ConstructorDescriptionDefaultBuildPluginManager
(MavenPluginManager mavenPluginManager, LegacySupport legacySupport, MojoExecutionScope scope, List<MojoExecutionListener> mojoExecutionListeners) -
Method Summary
Modifier and TypeMethodDescriptionvoid
executeMojo
(MavenSession session, MojoExecution mojoExecution) getMojoDescriptor
(Plugin plugin, String goal, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) org.codehaus.plexus.classworlds.realm.ClassRealm
getPluginRealm
(MavenSession session, PluginDescriptor pluginDescriptor) TODO pluginDescriptor classRealm and artifacts are set as a side effect of this call, which is not nice.loadPlugin
(Plugin plugin, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session)
-
Constructor Details
-
DefaultBuildPluginManager
@Inject public DefaultBuildPluginManager(MavenPluginManager mavenPluginManager, LegacySupport legacySupport, MojoExecutionScope scope, List<MojoExecutionListener> mojoExecutionListeners)
-
-
Method Details
-
loadPlugin
public PluginDescriptor loadPlugin(Plugin plugin, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, InvalidPluginDescriptorException - Specified by:
loadPlugin
in 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.InvalidPluginDescriptorException
PluginDescriptorParsingException
-
executeMojo
public void executeMojo(MavenSession session, MojoExecution mojoExecution) throws MojoFailureException, MojoExecutionException, PluginConfigurationException, PluginManagerException - Specified by:
executeMojo
in interfaceBuildPluginManager
- Throws:
MojoFailureException
MojoExecutionException
PluginConfigurationException
PluginManagerException
-
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:
getPluginRealm
in interfaceBuildPluginManager
- Throws:
PluginResolutionException
PluginManagerException
-
getMojoDescriptor
public MojoDescriptor getMojoDescriptor(Plugin plugin, String goal, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException
-