Class QualifiedName

java.lang.Object
org.basepom.mojo.dvc.QualifiedName
All Implemented Interfaces:
Comparable<QualifiedName>

public final class QualifiedName extends Object implements Comparable<QualifiedName>
A qualified name for a dependency or artifact. This is everything but a version.
  • Method Details

    • fromDependencyNode

      public static QualifiedName fromDependencyNode(org.eclipse.aether.graph.DependencyNode dependencyNode)
    • fromDependency

      public static QualifiedName fromDependency(org.eclipse.aether.graph.Dependency dependency)
    • fromArtifact

      public static QualifiedName fromArtifact(org.apache.maven.artifact.Artifact artifact)
    • fromProject

      public static QualifiedName fromProject(org.apache.maven.project.MavenProject project)
    • getGroupId

      public String getGroupId()
    • getArtifactId

      public String getArtifactId()
    • getType

      public Optional<String> getType()
    • getClassifier

      public Optional<String> getClassifier()
    • hasTests

      public boolean hasTests()
      Returns:
      True if this qualified name refers to a test artifact.
    • getFullName

      public String getFullName()
      Returns:
      The full name (group, artifact, type, classifier). Normalizes any test jar to be group:artifact:jar:tests.
    • getShortName

      public String getShortName()
      Returns:
      The short name (group, artifact, optional classifier). Skips absent classifiers. Normalizes test jars to `tests` classifier.
    • length

      public int length()
    • getMinimalName

      public String getMinimalName()
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(QualifiedName other)
      Specified by:
      compareTo in interface Comparable<QualifiedName>