public class DependencyResolver extends Object
Dependencys resolutions for Maven Artifact based on RepositorySystem and
RepositorySystemSession from Eclipse Aether.| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
DependencyResolver(org.mule.maven.client.api.model.MavenConfiguration mavenConfiguration,
Optional<org.eclipse.aether.repository.WorkspaceReader> workspaceReader)
Creates an instance of the resolver.
|
| Modifier and Type | Method and Description |
|---|---|
List<org.eclipse.aether.graph.Dependency> |
getDirectDependencies(org.eclipse.aether.artifact.Artifact artifact)
Resolves direct dependencies for an
Artifact. |
List<org.eclipse.aether.graph.Dependency> |
getDirectDependencies(org.eclipse.aether.artifact.Artifact artifact,
List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories)
Resolves direct dependencies for an
Artifact. |
org.eclipse.aether.resolution.ArtifactDescriptorResult |
readArtifactDescriptor(org.eclipse.aether.artifact.Artifact artifact)
Gets information about an artifact like its direct dependencies and potential relocations.
|
org.eclipse.aether.resolution.ArtifactDescriptorResult |
readArtifactDescriptor(org.eclipse.aether.artifact.Artifact artifact,
List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories)
Gets information about an artifact like its direct dependencies and potential relocations.
|
org.eclipse.aether.resolution.ArtifactResult |
resolveArtifact(org.eclipse.aether.artifact.Artifact artifact)
Resolves the path for an artifact.
|
org.eclipse.aether.resolution.ArtifactResult |
resolveArtifact(org.eclipse.aether.artifact.Artifact artifact,
List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories)
Resolves the path for an artifact.
|
List<File> |
resolveDependencies(org.eclipse.aether.graph.Dependency root,
List<org.eclipse.aether.graph.Dependency> directDependencies,
List<org.eclipse.aether.graph.Dependency> managedDependencies,
org.eclipse.aether.graph.DependencyFilter dependencyFilter,
List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories)
Resolves and filters transitive dependencies for the root and direct dependencies.
|
public DependencyResolver(org.mule.maven.client.api.model.MavenConfiguration mavenConfiguration,
Optional<org.eclipse.aether.repository.WorkspaceReader> workspaceReader)
mavenConfiguration - MavenConfiguration that defines the configuration to be used by Aether.workspaceReader - WorkspaceReader used to resolve dependencies within the workspace.public org.eclipse.aether.resolution.ArtifactDescriptorResult readArtifactDescriptor(org.eclipse.aether.artifact.Artifact artifact)
throws org.eclipse.aether.resolution.ArtifactDescriptorException
artifact - the Artifact requested, must not be nullArtifactDescriptorResult descriptor result, never null{@link - ArtifactDescriptorException} if the artifact descriptor could not be readorg.eclipse.aether.resolution.ArtifactDescriptorExceptionpublic org.eclipse.aether.resolution.ArtifactDescriptorResult readArtifactDescriptor(org.eclipse.aether.artifact.Artifact artifact,
List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories)
throws org.eclipse.aether.resolution.ArtifactDescriptorException
artifact - the Artifact requested, must not be nullremoteRepositories - to be used for resolving the artifact in addition to the ones already defined in context.ArtifactDescriptorResult descriptor result, never null{@link - ArtifactDescriptorException} if the artifact descriptor could not be readorg.eclipse.aether.resolution.ArtifactDescriptorExceptionpublic org.eclipse.aether.resolution.ArtifactResult resolveArtifact(org.eclipse.aether.artifact.Artifact artifact)
throws org.eclipse.aether.resolution.ArtifactResolutionException
artifact - the Artifact requested, must not be nullnull.{@link - ArtifactResolutionException} if the artifact could not be resolved.org.eclipse.aether.resolution.ArtifactResolutionExceptionpublic org.eclipse.aether.resolution.ArtifactResult resolveArtifact(org.eclipse.aether.artifact.Artifact artifact,
List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories)
throws org.eclipse.aether.resolution.ArtifactResolutionException
artifact - the Artifact requested, must not be nullremoteRepositories - remote repositories to be used in addition to the one in contextnull.{@link - ArtifactResolutionException} if the artifact could not be resolved.org.eclipse.aether.resolution.ArtifactResolutionExceptionpublic List<org.eclipse.aether.graph.Dependency> getDirectDependencies(org.eclipse.aether.artifact.Artifact artifact) throws org.eclipse.aether.resolution.ArtifactDescriptorException
Artifact.artifact - Artifact to collect its direct dependenciesList of Dependency for each direct dependency resolved{@link - ArtifactDescriptorException} if the artifact descriptor could not be readorg.eclipse.aether.resolution.ArtifactDescriptorExceptionpublic List<org.eclipse.aether.graph.Dependency> getDirectDependencies(org.eclipse.aether.artifact.Artifact artifact, List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories) throws org.eclipse.aether.resolution.ArtifactDescriptorException
Artifact.artifact - Artifact to collect its direct dependenciesremoteRepositories - remote repositories to be used in addition to the one in contextList of Dependency for each direct dependency resolved{@link - ArtifactDescriptorException} if the artifact descriptor could not be readorg.eclipse.aether.resolution.ArtifactDescriptorExceptionpublic List<File> resolveDependencies(org.eclipse.aether.graph.Dependency root, List<org.eclipse.aether.graph.Dependency> directDependencies, List<org.eclipse.aether.graph.Dependency> managedDependencies, org.eclipse.aether.graph.DependencyFilter dependencyFilter, List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories) throws org.eclipse.aether.collection.DependencyCollectionException, org.eclipse.aether.resolution.DependencyResolutionException
root - Dependency node from to collect its dependencies, may be nulldirectDependencies - List of direct Dependency to collect its transitive dependencies, may be
nullmanagedDependencies - List of managed Dependencys to be used for resolving the depedency graph, may be
nulldependencyFilter - DependencyFilter to include/exclude dependency nodes during collection and resolve operation.
May be null to no filterremoteRepositories - RemoteRepository to be used when resolving dependencies in addition to the ones already
defined in the context.List of Files for each dependency resolved{@link - DependencyCollectionException} if the dependency tree could not be builtorg.eclipse.aether.collection.DependencyCollectionExceptionorg.eclipse.aether.resolution.DependencyResolutionExceptionCopyright © 2003–2019 MuleSoft, Inc.. All rights reserved.