public final class RepositoryUtility extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.eclipse.aether.repository.RemoteRepository |
CENTRAL |
| Modifier and Type | Method and Description |
|---|---|
static String |
findLatestCoordinates(org.eclipse.aether.RepositorySystem repositorySystem,
String groupId,
String artifactId)
Returns the latest Maven coordinates for
groupId:artifactId in repositorySystem. |
static com.google.common.collect.ImmutableList<String> |
findVersions(org.eclipse.aether.RepositorySystem repositorySystem,
String groupId,
String artifactId)
Returns list of versions available for
groupId:artifactId in repositorySystem. |
static org.eclipse.aether.repository.RemoteRepository |
mavenRepositoryFromUrl(String mavenRepositoryUrl)
Returns Maven repository specified as
mavenRepositoryUrl, after validating the syntax
of the URL. |
static org.eclipse.aether.RepositorySystem |
newRepositorySystem()
Creates a new system configured for file and HTTP repository resolution.
|
static org.eclipse.aether.DefaultRepositorySystemSession |
newSession(org.eclipse.aether.RepositorySystem system)
Opens a new Maven repository session that looks for the local repository in the
customary ~/.m2 directory.
|
static org.eclipse.aether.DefaultRepositorySystemSession |
newSessionForMaven(org.eclipse.aether.RepositorySystem system)
Opens a new Maven repository session that generates the same dependency graph as
ProjectDependenciesResolver generates when it compiles a Maven
project. |
public static org.eclipse.aether.RepositorySystem newRepositorySystem()
public static org.eclipse.aether.DefaultRepositorySystemSession newSession(org.eclipse.aether.RepositorySystem system)
public static org.eclipse.aether.DefaultRepositorySystemSession newSessionForMaven(org.eclipse.aether.RepositorySystem system)
ProjectDependenciesResolver generates when it compiles a Maven
project. The dependency graph has the following attributes:
public static org.eclipse.aether.repository.RemoteRepository mavenRepositoryFromUrl(String mavenRepositoryUrl)
mavenRepositoryUrl, after validating the syntax
of the URL.IllegalArgumentException - if the URL is malformed for a Maven repositorypublic static com.google.common.collect.ImmutableList<String> findVersions(org.eclipse.aether.RepositorySystem repositorySystem, String groupId, String artifactId) throws MavenRepositoryException
groupId:artifactId in repositorySystem.
The returned list is in ascending order with regard to GenericVersionScheme; the highest version comes at last.MavenRepositoryExceptionpublic static String findLatestCoordinates(org.eclipse.aether.RepositorySystem repositorySystem, String groupId, String artifactId) throws MavenRepositoryException
groupId:artifactId in repositorySystem.MavenRepositoryExceptionCopyright © 2018–2021 Google LLC.. All rights reserved.