public final class JkRepoSet
extends java.lang.Object
JkRepo
Modifier and Type | Method and Description |
---|---|
JkRepoSet |
and(JkRepo other)
Returns a repo identical to this one but with the extra specified repository.
|
JkRepoSet |
and(JkRepoSet other)
Returns a merge of this repository and the specified one.
|
boolean |
contains(java.net.URL url)
Checks if the specified URL is present in the repository set.
|
java.util.List<java.lang.String> |
findVersionsOf(java.lang.String moduleId)
Finds the available versions of a given module identifier from the configured repositories.
|
java.nio.file.Path |
get(JkCoordinate coordinate)
Retrieves directly the file embodying the specified the external dependency.
|
java.nio.file.Path |
get(java.lang.String coordinate)
Retrieves the file associated with the specified dependency coordinate.
|
JkRepo |
getRepoConfigHavingUrl(java.lang.String url)
Return the individual repository from this set having the specified url.
|
java.util.List<JkRepo> |
getRepos()
Returns the list of repositories configured in this repository set.
|
static JkRepoSet |
of(java.lang.Iterable<JkRepo> configs)
Creates a repository set from the specified configurations.
|
static JkRepoSet |
of(JkRepo repo,
JkRepo... others)
Creates a repository set from the specified configurations.
|
static JkRepoSet |
of(java.lang.String... urls)
|
static JkRepoSet |
ofLocal() |
static JkRepoSet |
ofOssrhSnapshotAndRelease(java.lang.String userName,
java.lang.String password,
JkFileSigner signer)
Creates a JkRepoSet for publishing on OSSRH
|
JkRepoSet |
toReadonly()
Returns an immutable copy of this repository set, ensuring that the underlying repositories
are also marked as read-only.
|
java.lang.String |
toString() |
java.lang.String |
toStringMultiline(java.lang.String margin) |
JkRepoSet |
withDefaultSigner(JkFileSigner signer) |
public static JkRepoSet of(java.lang.Iterable<JkRepo> configs)
public static JkRepoSet of(JkRepo repo, JkRepo... others)
public static JkRepoSet of(java.lang.String... urls)
public JkRepoSet and(JkRepo other)
public static JkRepoSet ofLocal()
public static JkRepoSet ofOssrhSnapshotAndRelease(java.lang.String userName, java.lang.String password, JkFileSigner signer)
public JkRepo getRepoConfigHavingUrl(java.lang.String url)
null
if no such repository found.public java.util.List<JkRepo> getRepos()
public boolean contains(java.net.URL url)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline(java.lang.String margin)
public JkRepoSet toReadonly()
public java.nio.file.Path get(JkCoordinate coordinate)
public java.nio.file.Path get(java.lang.String coordinate)
get(JkCoordinate)
by constructing a JkCoordinate
from the given string representation.coordinate
- the string representation of the dependency coordinate to resolvenull
if the dependency cannot be resolvedpublic JkRepoSet withDefaultSigner(JkFileSigner signer)
public java.util.List<java.lang.String> findVersionsOf(java.lang.String moduleId)
moduleId
- the identifier of the module whose versions are to be retrieved