|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.plugin.internal.DefaultMavenPluginManager
@Component(role=MavenPluginManager.class) public class DefaultMavenPluginManager
Provides basic services to manage Maven plugins and their mojos. This component is kept general in its design such that the plugins/mojos can be used in arbitrary contexts. In particular, the mojos can be used for ordinary build plugins as well as special purpose plugins like reports.
| Constructor Summary | |
|---|---|
DefaultMavenPluginManager()
|
|
| Method Summary | ||
|---|---|---|
|
getConfiguredMojo(Class<T> mojoInterface,
MavenSession session,
MojoExecution mojoExecution)
Looks up the mojo for the specified mojo execution and populates its parameters from the configuration given by the mojo execution. |
|
MojoDescriptor |
getMojoDescriptor(Plugin plugin,
String goal,
List<org.sonatype.aether.repository.RemoteRepository> repositories,
org.sonatype.aether.RepositorySystemSession session)
Retrieves the descriptor for the specified plugin goal from the plugin's main artifact. |
|
PluginDescriptor |
getPluginDescriptor(Plugin plugin,
List<org.sonatype.aether.repository.RemoteRepository> repositories,
org.sonatype.aether.RepositorySystemSession session)
Retrieves the descriptor for the specified plugin from its main artifact. |
|
void |
releaseMojo(Object mojo,
MojoExecution mojoExecution)
Releases the specified mojo back to the container. |
|
void |
setupPluginRealm(PluginDescriptor pluginDescriptor,
MavenSession session,
ClassLoader parent,
List<String> imports,
org.sonatype.aether.graph.DependencyFilter filter)
Sets up the class realm for the specified plugin. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultMavenPluginManager()
| Method Detail |
|---|
public PluginDescriptor getPluginDescriptor(Plugin plugin,
List<org.sonatype.aether.repository.RemoteRepository> repositories,
org.sonatype.aether.RepositorySystemSession session)
throws PluginResolutionException,
PluginDescriptorParsingException,
InvalidPluginDescriptorException
MavenPluginManager
getPluginDescriptor in interface MavenPluginManagerplugin - The plugin whose descriptor should be retrieved, must not be null.repositories - The plugin repositories to use for resolving the plugin's main artifact, must not be null.session - The repository session to use for resolving the plugin's main artifact, must not be null.
null.
PluginResolutionException
PluginDescriptorParsingException
InvalidPluginDescriptorException
public MojoDescriptor getMojoDescriptor(Plugin plugin,
String goal,
List<org.sonatype.aether.repository.RemoteRepository> repositories,
org.sonatype.aether.RepositorySystemSession session)
throws MojoNotFoundException,
PluginResolutionException,
PluginDescriptorParsingException,
InvalidPluginDescriptorException
MavenPluginManager
getMojoDescriptor in interface MavenPluginManagerplugin - The plugin whose mojo descriptor should be retrieved, must not be null.goal - The simple name of the mojo whose descriptor should be retrieved, must not be null.repositories - The plugin repositories to use for resolving the plugin's main artifact, must not be null.session - The repository session to use for resolving the plugin's main artifact, must not be null.
null.
MojoNotFoundException
PluginResolutionException
PluginDescriptorParsingException
InvalidPluginDescriptorException
public void setupPluginRealm(PluginDescriptor pluginDescriptor,
MavenSession session,
ClassLoader parent,
List<String> imports,
org.sonatype.aether.graph.DependencyFilter filter)
throws PluginResolutionException,
PluginContainerException
MavenPluginManager
setupPluginRealm in interface MavenPluginManagerpluginDescriptor - The plugin descriptor in which to save the class realm and the plugin artifacts, must not
be null.session - The build session from which to pick the current project and repository settings, must not be
null.parent - The parent class realm for the plugin, may be null to use the Maven core realm.imports - The packages/types to import from the parent realm, may be null.filter - The filter used to exclude certain plugin dependencies, may be null.
PluginResolutionException
PluginContainerException
public <T> T getConfiguredMojo(Class<T> mojoInterface,
MavenSession session,
MojoExecution mojoExecution)
throws PluginConfigurationException,
PluginContainerException
MavenPluginManagerMavenPluginManager.releaseMojo(Object, MojoExecution) when the mojo is no longer needed to free any resources allocated for
it.
getConfiguredMojo in interface MavenPluginManagermojoInterface - The component role of the mojo, must not be null.session - The build session in whose context the mojo will be used, must not be null.mojoExecution - The mojo execution to retrieve the mojo for, must not be null.
null.
PluginConfigurationException
PluginContainerException
public void releaseMojo(Object mojo,
MojoExecution mojoExecution)
MavenPluginManager
releaseMojo in interface MavenPluginManagermojo - The mojo to release, may be null.mojoExecution - The mojo execution the mojo was originally retrieved for, must not be null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||