Class Coordinates
- java.lang.Object
-
- org.apache.maven.plugins.dependency.exclusion.Coordinates
-
- All Implemented Interfaces:
java.lang.Comparable<Coordinates>
class Coordinates extends java.lang.Object implements java.lang.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 Summary
Fields Modifier and Type Field Description private java.lang.String
artifactId
private org.apache.maven.model.Dependency
dependency
private java.lang.String
groupId
private org.apache.maven.model.InputLocation
location
-
Constructor Summary
Constructors Modifier Constructor Description private
Coordinates(java.lang.String groupId, java.lang.String artifactId, org.apache.maven.model.Dependency dependency, org.apache.maven.model.InputLocation location)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Coordinates that)
static Coordinates
coordinates(java.lang.String groupId, java.lang.String artifactId)
static Coordinates
coordinates(org.apache.maven.model.Dependency dependency)
static Coordinates
coordinates(org.apache.maven.model.Exclusion exclusion)
private static java.nio.file.Path
createPathProxy(java.lang.String value)
In order to reuse the glob matcher from the filesystem, we need to create Path instances.boolean
equals(java.lang.Object o)
java.lang.String
getArtifactId()
org.apache.maven.model.Dependency
getDependency()
(package private) java.util.function.Predicate<Coordinates>
getExclusionPattern()
java.lang.String
getGroupId()
int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
coordinates
public static Coordinates coordinates(java.lang.String groupId, java.lang.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 java.lang.String getGroupId()
-
getArtifactId
public java.lang.String getArtifactId()
-
getDependency
public org.apache.maven.model.Dependency getDependency()
-
getExclusionPattern
java.util.function.Predicate<Coordinates> getExclusionPattern()
-
createPathProxy
private static java.nio.file.Path createPathProxy(java.lang.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(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
compareTo
public int compareTo(Coordinates that)
- Specified by:
compareTo
in interfacejava.lang.Comparable<Coordinates>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-