Package org.apache.maven.plugin.internal
Class DefaultPluginDependenciesResolver
java.lang.Object
org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver
- All Implemented Interfaces:
PluginDependenciesResolver
@Named
@Singleton
public class DefaultPluginDependenciesResolver
extends Object
implements PluginDependenciesResolver
Assists in resolving the dependencies of a plugin. Warning: This is an internal utility class that
is only public for technical reasons, it is not part of the public API. In particular, this class can be changed or
deleted without prior notice.
- Since:
- 3.0
-
Constructor Summary
ConstructorDescriptionDefaultPluginDependenciesResolver
(org.eclipse.aether.RepositorySystem repoSystem, List<org.apache.maven.plugin.internal.MavenPluginDependenciesValidator> dependenciesValidators) -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.aether.artifact.Artifact
resolve
(Plugin plugin, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) Resolves the main artifact of the specified plugin.org.eclipse.aether.graph.DependencyNode
resolve
(Plugin plugin, org.eclipse.aether.artifact.Artifact pluginArtifact, org.eclipse.aether.graph.DependencyFilter dependencyFilter, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) Resolves the runtime dependencies of the specified plugin.org.eclipse.aether.resolution.DependencyResult
resolveCoreExtension
(Plugin plugin, org.eclipse.aether.graph.DependencyFilter dependencyFilter, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) org.eclipse.aether.resolution.DependencyResult
resolvePlugin
(Plugin plugin, org.eclipse.aether.artifact.Artifact pluginArtifact, org.eclipse.aether.graph.DependencyFilter dependencyFilter, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session)
-
Constructor Details
-
DefaultPluginDependenciesResolver
@Inject public DefaultPluginDependenciesResolver(org.eclipse.aether.RepositorySystem repoSystem, List<org.apache.maven.plugin.internal.MavenPluginDependenciesValidator> dependenciesValidators)
-
-
Method Details
-
resolve
public org.eclipse.aether.artifact.Artifact resolve(Plugin plugin, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) throws PluginResolutionException Description copied from interface:PluginDependenciesResolver
Resolves the main artifact of the specified plugin.- Specified by:
resolve
in interfacePluginDependenciesResolver
- Parameters:
plugin
- The plugin for which to resolve the main artifact, must not benull
.repositories
- The plugin repositories to use for resolving the plugin's main artifact, must not benull
.session
- The repository session to use for resolving the plugin's main artifact, must not benull
.- Returns:
- The resolved plugin artifact, never
null
. - Throws:
PluginResolutionException
- If the plugin artifact could not be resolved.
-
resolveCoreExtension
public org.eclipse.aether.resolution.DependencyResult resolveCoreExtension(Plugin plugin, org.eclipse.aether.graph.DependencyFilter dependencyFilter, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) throws PluginResolutionException - Throws:
PluginResolutionException
- Since:
- 3.3.0
-
resolvePlugin
public org.eclipse.aether.resolution.DependencyResult resolvePlugin(Plugin plugin, org.eclipse.aether.artifact.Artifact pluginArtifact, org.eclipse.aether.graph.DependencyFilter dependencyFilter, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) throws PluginResolutionException - Specified by:
resolvePlugin
in interfacePluginDependenciesResolver
- Throws:
PluginResolutionException
-
resolve
public org.eclipse.aether.graph.DependencyNode resolve(Plugin plugin, org.eclipse.aether.artifact.Artifact pluginArtifact, org.eclipse.aether.graph.DependencyFilter dependencyFilter, List<org.eclipse.aether.repository.RemoteRepository> repositories, org.eclipse.aether.RepositorySystemSession session) throws PluginResolutionException Description copied from interface:PluginDependenciesResolver
Resolves the runtime dependencies of the specified plugin.- Specified by:
resolve
in interfacePluginDependenciesResolver
- Parameters:
plugin
- The plugin for which to resolve the dependencies, must not benull
.pluginArtifact
- The plugin's main artifact, may benull
.dependencyFilter
- A filter to exclude artifacts from resolution (but not collection), may benull
.repositories
- The plugin repositories to use for resolving the plugin artifacts, must not benull
.session
- The repository session to use for resolving the plugin artifacts, must not benull
.- Returns:
- The dependency tree denoting the resolved plugin class path, never
null
. - Throws:
PluginResolutionException
- If any dependency could not be resolved.
-