Class MavenDependencyResolver

All Implemented Interfaces:

public final class MavenDependencyResolver extends Object implements DependencyResolver
Resolves Maven dependencies for the Smithy CLI using Maven resolvers.
  • Constructor Details

    • MavenDependencyResolver

      public MavenDependencyResolver()
    • MavenDependencyResolver

      public MavenDependencyResolver(String cacheLocation)
      cacheLocation - Maven local cache location.
  • Method Details

    • addRepository

      public void addRepository(MavenRepository repository)
      Description copied from interface: DependencyResolver
      Add a Maven repository.
      Specified by:
      addRepository in interface DependencyResolver
      repository - Repository to add.
    • addDependency

      public void addDependency(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 interface DependencyResolver
      coordinates - Dependency coordinates to add.
    • resolve

      public List<ResolvedArtifact> resolve()
      Description copied from interface: DependencyResolver
      Resolves artifacts for the configured dependencies.
      Specified by:
      resolve in interface DependencyResolver
      Returns the resolved artifacts, including file on disk and coordinates.