Class ResolvedArtifact


  • public final class ResolvedArtifact
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      ResolvedArtifact​(java.nio.file.Path path, java.lang.String groupId, java.lang.String artifactId, java.lang.String version)  
    • Constructor Detail

      • ResolvedArtifact

        public ResolvedArtifact​(java.nio.file.Path path,
                                java.lang.String groupId,
                                java.lang.String artifactId,
                                java.lang.String version)
    • Method Detail

      • fromCoordinates

        public static ResolvedArtifact fromCoordinates​(java.nio.file.Path location,
                                                       java.lang.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 java.nio.file.Path getPath()
        Get the path to the artifact on disk.
        Returns:
        Returns the location of the downloaded artifact.
      • getCoordinates

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

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

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

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

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

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object