java.lang.Object
org.apache.maven.plugins.dependency.exclusion.Coordinates
All Implemented Interfaces:
Comparable<Coordinates>

class Coordinates extends Object implements Comparable<Coordinates>
Simple "record" to hold the coordinates of the dependency which is excluded.

When dealing with exclusions the version is not important. Only groupId and artifactId is used.

  • Field Details

    • groupId

      private final String groupId
    • artifactId

      private final String artifactId
    • dependency

      private final org.apache.maven.model.Dependency dependency
    • location

      private final org.apache.maven.model.InputLocation location
  • Constructor Details

    • Coordinates

      private Coordinates(String groupId, String artifactId, org.apache.maven.model.Dependency dependency, org.apache.maven.model.InputLocation location)
  • Method Details

    • coordinates

      public static Coordinates coordinates(String groupId, String artifactId)
    • coordinates

      public static Coordinates coordinates(org.apache.maven.model.Dependency dependency)
    • coordinates

      public static Coordinates coordinates(org.apache.maven.model.Exclusion exclusion)
    • getGroupId

      public String getGroupId()
    • getArtifactId

      public String getArtifactId()
    • getDependency

      public org.apache.maven.model.Dependency getDependency()
    • getExclusionPattern

      Predicate<Coordinates> getExclusionPattern()
    • createPathProxy

      private static Path createPathProxy(String value)
      In order to reuse the glob matcher from the filesystem, we need to create Path instances. Those are only used with the toString method. This hack works because the only system-dependent thing is the path separator which should not be part of the groupId or artifactId.
    • equals

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

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

      public int compareTo(Coordinates that)
      Specified by:
      compareTo in interface Comparable<Coordinates>
    • toString

      public String toString()
      Overrides:
      toString in class Object