Class GAV


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

      • 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 Detail

      • getGroupId

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

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

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

        public void setGroupId​(String groupId)
      • setArtifactId

        public void setArtifactId​(String artifactId)
      • setVersion

        public void setVersion​(String version)
      • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object