Class ResolvedArtifact
java.lang.Object
software.amazon.smithy.cli.dependencies.ResolvedArtifact
- All Implemented Interfaces:
ToNode
An artifact resolved from a repository that provides the path on disk where the artifact
was downloaded, and the coordinates of the artifact.
-
Constructor Summary
ConstructorDescriptionResolvedArtifact
(Path path, String groupId, String artifactId, String version) -
Method Summary
Modifier and TypeMethodDescriptionboolean
static ResolvedArtifact
fromCoordinateNode
(String coordinates, Node node) Creates a resolved artifact from a Maven coordinates string and Node.static ResolvedArtifact
fromCoordinates
(Path location, String coordinates) Creates a resolved artifact from a file path and Maven coordinates string.Get the resolved coordinates (e.g., group:artifact:version).long
getPath()
Get the path to the artifact on disk.int
hashCode()
toNode()
Converts a value to aNode
.toString()
-
Constructor Details
-
ResolvedArtifact
-
-
Method Details
-
fromCoordinates
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.
-
fromCoordinateNode
Creates a resolved artifact from a Maven coordinates string and Node.- Parameters:
coordinates
- Maven coordinates (e.g., group:artifact:version).node
- Node containing the resolved artifact data.- Returns:
- Returns the created artifact
-
getPath
Get the path to the artifact on disk.- Returns:
- Returns the location of the downloaded artifact.
-
getCoordinates
Get the resolved coordinates (e.g., group:artifact:version).- Returns:
- Returns the resolved coordinates.
-
getGroupId
- Returns:
- Get the group ID of the artifact.
-
getArtifactId
- Returns:
- Get the artifact ID of the artifact.
-
getVersion
- Returns:
- Get the version of the artifact.
-
getShaSum
- Returns:
- Get the sha1 digest of the artifact.
-
getLastModified
public long getLastModified()- Returns:
- Get the last time the artifact was modified.
-
toString
-
hashCode
public int hashCode() -
equals
-
toNode
Description copied from interface:ToNode
Converts a value to aNode
.
-