Class GAV

java.lang.Object
org.stianloader.picoresolve.GAV

public final class GAV extends Object
A GAV stores the group, artifact and version of a resource. A GAV is usually accompanied by a classifier and an file extension/type in order for a complete resource lookup to work, but in most cases a GAV is adequate to resolve things like the "default" jar file of an artifact or to get the POM or to list the snapshot versions.

However because of the decision to separate out MavenVersion and VersionRange in two hierarchically completely different classes, this GAV object is unsuited to define dependencies as dependencies can be defined through version ranges and not a singular, very direct version string.

Most resource lookups will use MavenVersion.getOriginText() for the version part of the lookup, as the actual (corrected and parsed) version string may differ to those actually needed. This means that things such as case-sensitivity is important when performing the inevitable MavenVersion.parse(String) call before invoking the constructor of this class.

  • Constructor Details

    • GAV

      public GAV(@NotNull @NotNull String group, @NotNull @NotNull String artifact, @NotNull @NotNull MavenVersion version)
  • Method Details

    • artifact

      @NotNull @Contract(pure=true) public @NotNull String artifact()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • group

      @NotNull @Contract(pure=true) public @NotNull String group()
    • hashCode

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

      @NotNull @Contract(pure=true) public @NotNull MavenVersion version()
    • toString

      public String toString()
      Overrides:
      toString in class Object