Record Class RepositoryKey
- Record Components:
url- the canonicalhttps://host/owner/repoform of the SCM URL
<scm> URL (IKE-Network/ike-issues#496 part C).
A release node is a repository, not a coordinate. A single
reactor produces many coordinates (ike-tooling alone
produces ike-maven-plugin,
ike-build-standards, ike-workspace-model, and
more) but the cascade releases the repository as one unit. The
join key that collapses many coordinates onto one node is the
<scm> URL each coordinate inherits from its reactor-root
POM. RepositoryKey is that join key.
SCM URLs arrive in many syntactic forms — scm:git:https://
prefixed, plain https://, git@host:owner/repo
SSH shorthand, ssh:// explicit, with or without a trailing
.git. RepositoryKey canonicalises every form to a
single normalised https://host/owner/repo string, so two
keys derived from different syntactic variants of the same URL
compare equal.
-
Constructor Summary
ConstructorsConstructorDescriptionRepositoryKey(String url) Canonical constructor — validates and normalises the URL. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static RepositoryKeyfromScm(org.apache.maven.api.model.Scm scm) Builds a key from a MavenScmblock, preferring<url>over<connection>when both are declared.final inthashCode()Returns a hash code value for this object.static RepositoryKeyBuilds a key from any syntactic form of an SCM URL.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
RepositoryKey
Canonical constructor — validates and normalises the URL.
-
-
Method Details
-
fromScm
Builds a key from a MavenScmblock, preferring<url>over<connection>when both are declared.- Parameters:
scm- the SCM block; may benull- Returns:
- the key, or
nullwhenscmisnullor declares neither a URL nor a connection
-
of
Builds a key from any syntactic form of an SCM URL.- Parameters:
scmUrl- the SCM URL or connection string; must not benullor blank- Returns:
- the canonicalised key
- Throws:
IllegalArgumentException- ifscmUrlis null or blank
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
url
-