Class MavenDependencyResolver
- java.lang.Object
-
- software.amazon.smithy.cli.dependencies.MavenDependencyResolver
-
- All Implemented Interfaces:
DependencyResolver
public final class MavenDependencyResolver extends java.lang.Object implements DependencyResolver
Resolves Maven dependencies for the Smithy CLI using Maven resolvers.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface software.amazon.smithy.cli.dependencies.DependencyResolver
DependencyResolver.Factory
-
-
Constructor Summary
Constructors Constructor Description MavenDependencyResolver()
MavenDependencyResolver(java.lang.String cacheLocation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDependency(java.lang.String coordinates)
Add a dependency.void
addRepository(MavenRepository repository)
Add a Maven repository.java.util.List<ResolvedArtifact>
resolve()
Resolves artifacts for the configured dependencies.
-
-
-
Method Detail
-
addRepository
public void addRepository(MavenRepository repository)
Description copied from interface:DependencyResolver
Add a Maven repository.- Specified by:
addRepository
in interfaceDependencyResolver
- Parameters:
repository
- Repository to add.
-
addDependency
public void addDependency(java.lang.String coordinates)
Description copied from interface:DependencyResolver
Add a dependency.Coordinates must be given a group ID, artifact ID, and version in the form of "groupId:artifactId:version". Coordinates support Maven dependency ranges. Coordinates do not support LATEST, SNAPSHOT, latest-release, latest.*, or Gradle style "+" syntax.
- Specified by:
addDependency
in interfaceDependencyResolver
- Parameters:
coordinates
- Dependency coordinates to add.
-
resolve
public java.util.List<ResolvedArtifact> resolve()
Description copied from interface:DependencyResolver
Resolves artifacts for the configured dependencies.- Specified by:
resolve
in interfaceDependencyResolver
- Returns:
- Returns the resolved artifacts, including file on disk and coordinates.
-
-