java.lang.Object
gg.nils.semanticrelease.maven.plugin.util.GAV

public class GAV extends Object
Wrapper for a maven project/dependency identified by a groupId/artifactId/version.
  • Constructor Details

    • GAV

      public GAV()
    • GAV

      public GAV(String groupId, String artifactId, String version)
      Builds an immutable GAV object.
      Parameters:
      groupId - the groupId of the maven object
      artifactId - the artifactId of the maven object
      version - the version of the maven object
  • Method Details

    • from

      public static GAV from(org.apache.maven.project.MavenProject project)
      Builds a GAV object from the given MavenProject object.
      Parameters:
      project - the project to extract info from
      Returns:
      a new GAV object
    • from

      public static GAV from(org.apache.maven.model.Model model)
      Builds a GAV object from the given Model object.
      Parameters:
      model - the project model to extract info from
      Returns:
      a new GAV object
    • from

      public static GAV from(org.apache.maven.model.Parent parent)
      Builds a GAV object from the given Parent object.
      Parameters:
      parent - the parent to extract info from
      Returns:
      a new GAV object
    • getGroupId

      public String getGroupId()
      Retrieves the groupId.
      Returns:
      the groupId
    • setGroupId

      public void setGroupId(String groupId)
    • getArtifactId

      public String getArtifactId()
      Retrieves the artifactId.
      Returns:
      the artifactId
    • setArtifactId

      public void setArtifactId(String artifactId)
    • getVersion

      public String getVersion()
      Retrieves the version.
      Returns:
      the version
    • setVersion

      public void setVersion(String version)
    • hashCode

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

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

      public String toString()
      Overrides:
      toString in class Object