Class ResolvedArtifact

java.lang.Object
software.amazon.smithy.cli.dependencies.ResolvedArtifact

public final class ResolvedArtifact extends Object
An artifact resolved from a repository that provides the path on disk where the artifact was downloaded, and the coordinates of the artifact.
  • Constructor Details

  • Method Details

    • fromCoordinates

      public static ResolvedArtifact fromCoordinates(Path location, String coordinates)
      Creates a resolved artifact from a file path and Maven coordinates string.
      Parameters:
      location - Location of the artifact.
      coordinates - Maven coordinates (e.g., group:artifact:version).
      Returns:
      Returns the created artifact.
      Throws:
      DependencyResolverException - if the provided coordinates are invalid.
    • getPath

      public Path getPath()
      Get the path to the artifact on disk.
      Returns:
      Returns the location of the downloaded artifact.
    • getCoordinates

      public String getCoordinates()
      Get the resolved coordinates (e.g., group:artifact:version).
      Returns:
      Returns the resolved coordinates.
    • getGroupId

      public String getGroupId()
      Returns:
      Get the group ID of the artifact.
    • getArtifactId

      public String getArtifactId()
      Returns:
      Get the artifact ID of the artifact.
    • getVersion

      public String getVersion()
      Returns:
      Get the version of the artifact.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object