@Named @Singleton public class ResolverUtil extends Object
Constructor and Description |
---|
ResolverUtil(org.eclipse.aether.RepositorySystem repositorySystem,
javax.inject.Provider<org.apache.maven.execution.MavenSession> mavenSessionProvider) |
Modifier and Type | Method and Description |
---|---|
Collection<org.eclipse.aether.graph.Dependency> |
collectDependencies(org.eclipse.aether.graph.Dependency root)
Collects the transitive dependencies.
|
org.eclipse.aether.artifact.Artifact |
createArtifactFromParams(ParamArtifact paramArtifact)
Create an artifact based on configuration from Mojo.
|
protected org.eclipse.aether.repository.RemoteRepository |
prepareRemoteRepository(String repository) |
List<org.eclipse.aether.repository.RemoteRepository> |
remoteRepositories(List<String> repositories)
Prepare a remote repositories list for given descriptions.
|
org.eclipse.aether.artifact.Artifact |
resolveArtifact(org.eclipse.aether.artifact.Artifact artifact,
List<org.eclipse.aether.repository.RemoteRepository> repositories)
Resolve given artifact
|
List<org.eclipse.aether.artifact.Artifact> |
resolveDependencies(org.eclipse.aether.artifact.Artifact artifact,
List<org.eclipse.aether.repository.RemoteRepository> repositories)
Resolve transitive dependencies for artifact.
|
@Inject public ResolverUtil(org.eclipse.aether.RepositorySystem repositorySystem, javax.inject.Provider<org.apache.maven.execution.MavenSession> mavenSessionProvider)
public Collection<org.eclipse.aether.graph.Dependency> collectDependencies(org.eclipse.aether.graph.Dependency root) throws org.eclipse.aether.collection.DependencyCollectionException
root
- a root dependency for collectionsorg.eclipse.aether.collection.DependencyCollectionException
public org.eclipse.aether.artifact.Artifact resolveArtifact(org.eclipse.aether.artifact.Artifact artifact, List<org.eclipse.aether.repository.RemoteRepository> repositories) throws org.eclipse.aether.resolution.ArtifactResolutionException
artifact
- an artifact to resolverepositories
- remote repositories listorg.eclipse.aether.resolution.ArtifactResolutionException
- If the artifact could not be resolved.public List<org.eclipse.aether.artifact.Artifact> resolveDependencies(org.eclipse.aether.artifact.Artifact artifact, List<org.eclipse.aether.repository.RemoteRepository> repositories) throws org.eclipse.aether.resolution.DependencyResolutionException
artifact
- an artifact to resolverepositories
- remote repositories listorg.eclipse.aether.resolution.DependencyResolutionException
- If the dependency tree could not be built or any dependency artifact could
not be resolved.public List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories(List<String> repositories)
repositories
- remote repositories descriptionsprotected org.eclipse.aether.repository.RemoteRepository prepareRemoteRepository(String repository)
public org.eclipse.aether.artifact.Artifact createArtifactFromParams(ParamArtifact paramArtifact)
paramArtifact
- an artifact configurationCopyright © 2002–2024 The Apache Software Foundation. All rights reserved.