public class AetherUtil extends Object
Modifier and Type | Field and Description |
---|---|
protected File |
localRepository |
protected org.apache.maven.plugin.logging.Log |
log |
Constructor and Description |
---|
AetherUtil(org.eclipse.aether.RepositorySystem repoSystem,
org.eclipse.aether.RepositorySystemSession repoSession,
List<org.eclipse.aether.repository.RemoteRepository> remoteRepos,
File localRepository,
org.apache.maven.plugin.logging.Log log)
Create an instance for the given repositories.
|
Modifier and Type | Method and Description |
---|---|
void |
installArtifacts(Set<org.eclipse.aether.artifact.Artifact> artifacts)
Installs the given artifacts.
|
org.eclipse.aether.artifact.Artifact |
resolveArtifact(org.eclipse.aether.artifact.Artifact artifact)
Resolves the given artifact.
|
org.eclipse.aether.artifact.Artifact |
resolveArtifact(String coord)
Resolves the given coordinates.
|
Set<org.eclipse.aether.artifact.Artifact> |
resolveArtifacts(Set<String> coords)
Resolves the given coordinates.
|
Set<org.eclipse.aether.artifact.Artifact> |
resolveDependencies(List<org.eclipse.aether.graph.Dependency> dependencies,
org.eclipse.aether.graph.DependencyFilter filter)
Resolves the given dependencies.
|
List<org.eclipse.aether.graph.Dependency> |
toDependencies(List<String> coords)
Converts the given list of artifact coordinates to dependencies.
|
org.eclipse.aether.graph.Dependency |
toDependency(String coord)
Converts the given artifact coordinates to a
Dependency instance. |
protected File localRepository
protected org.apache.maven.plugin.logging.Log log
public AetherUtil(org.eclipse.aether.RepositorySystem repoSystem, org.eclipse.aether.RepositorySystemSession repoSession, List<org.eclipse.aether.repository.RemoteRepository> remoteRepos, File localRepository, org.apache.maven.plugin.logging.Log log)
repoSystem
- The repository system.repoSession
- The repository session.remoteRepos
- The remote repositories.localRepository
- The local repository.log
- The log.public Set<org.eclipse.aether.artifact.Artifact> resolveDependencies(List<org.eclipse.aether.graph.Dependency> dependencies, org.eclipse.aether.graph.DependencyFilter filter) throws org.eclipse.aether.resolution.DependencyResolutionException
dependencies
- The dependencies.filter
- The dependency filter.org.eclipse.aether.resolution.DependencyResolutionException
- if an error occurs.public org.eclipse.aether.artifact.Artifact resolveArtifact(org.eclipse.aether.artifact.Artifact artifact)
artifact
- The artifact.null
if it can't be resolved.public org.eclipse.aether.artifact.Artifact resolveArtifact(String coord)
coord
- The coordinates to resolve.null
if the coordinates can't be resolved.public Set<org.eclipse.aether.artifact.Artifact> resolveArtifacts(Set<String> coords)
coords
- The set of coordinates to resolve.public org.eclipse.aether.graph.Dependency toDependency(String coord)
Dependency
instance.coord
- The coordinates.public List<org.eclipse.aether.graph.Dependency> toDependencies(List<String> coords)
coords
- The list of coordinates.public void installArtifacts(Set<org.eclipse.aether.artifact.Artifact> artifacts) throws org.eclipse.aether.installation.InstallationException
artifacts
- The artifacts to install.org.eclipse.aether.installation.InstallationException
- if an error occurs.Copyright © 2017 OpenDaylight. All rights reserved.