public class ProjectModelResolver extends java.lang.Object implements ModelResolver
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
context |
private java.util.List<org.eclipse.aether.repository.RemoteRepository> |
externalRepositories |
private ReactorModelPool |
modelPool |
private java.util.List<org.eclipse.aether.repository.RemoteRepository> |
pomRepositories |
private org.eclipse.aether.impl.RemoteRepositoryManager |
remoteRepositoryManager |
private java.util.List<org.eclipse.aether.repository.RemoteRepository> |
repositories |
private java.util.Set<java.lang.String> |
repositoryIds |
private ProjectBuildingRequest.RepositoryMerging |
repositoryMerging |
private org.eclipse.aether.RepositorySystem |
resolver |
private org.eclipse.aether.RepositorySystemSession |
session |
private org.eclipse.aether.RequestTrace |
trace |
| Modifier | Constructor and Description |
|---|---|
private |
ProjectModelResolver(ProjectModelResolver original) |
|
ProjectModelResolver(org.eclipse.aether.RepositorySystemSession session,
org.eclipse.aether.RequestTrace trace,
org.eclipse.aether.RepositorySystem resolver,
org.eclipse.aether.impl.RemoteRepositoryManager remoteRepositoryManager,
java.util.List<org.eclipse.aether.repository.RemoteRepository> repositories,
ProjectBuildingRequest.RepositoryMerging repositoryMerging,
ReactorModelPool modelPool) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRepository(Repository repository)
Adds a repository to use for subsequent resolution requests.
|
void |
addRepository(Repository repository,
boolean replace)
Adds a repository to use for subsequent resolution requests.
|
ModelResolver |
newCopy()
Clones this resolver for usage in a forked resolution process.
|
private static void |
removeMatchingRepository(java.lang.Iterable<org.eclipse.aether.repository.RemoteRepository> repositories,
java.lang.String id) |
ModelSource |
resolveModel(Dependency dependency)
Tries to resolve the POM for the specified dependency coordinates possibly updating
dependency. |
ModelSource |
resolveModel(Parent parent)
Tries to resolve the POM for the specified parent coordinates possibly updating
parent. |
ModelSource |
resolveModel(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version)
Tries to resolve the POM for the specified coordinates.
|
private final org.eclipse.aether.RepositorySystemSession session
private final org.eclipse.aether.RequestTrace trace
private final java.lang.String context
private java.util.List<org.eclipse.aether.repository.RemoteRepository> repositories
private java.util.List<org.eclipse.aether.repository.RemoteRepository> pomRepositories
private final java.util.List<org.eclipse.aether.repository.RemoteRepository> externalRepositories
private final org.eclipse.aether.RepositorySystem resolver
private final org.eclipse.aether.impl.RemoteRepositoryManager remoteRepositoryManager
private final java.util.Set<java.lang.String> repositoryIds
private final ReactorModelPool modelPool
private final ProjectBuildingRequest.RepositoryMerging repositoryMerging
public ProjectModelResolver(org.eclipse.aether.RepositorySystemSession session,
org.eclipse.aether.RequestTrace trace,
org.eclipse.aether.RepositorySystem resolver,
org.eclipse.aether.impl.RemoteRepositoryManager remoteRepositoryManager,
java.util.List<org.eclipse.aether.repository.RemoteRepository> repositories,
ProjectBuildingRequest.RepositoryMerging repositoryMerging,
ReactorModelPool modelPool)
private ProjectModelResolver(ProjectModelResolver original)
public void addRepository(Repository repository) throws InvalidRepositoryException
ModelResolveraddRepository in interface ModelResolverrepository - The repository to add to the internal search chain, must not be null.InvalidRepositoryException - If the repository could not be added (e.g. due to invalid URL or layout).public void addRepository(Repository repository, boolean replace) throws InvalidRepositoryException
ModelResolveraddRepository in interface ModelResolverrepository - The repository to add to the internal search chain, must not be null.InvalidRepositoryException - If the repository could not be added (e.g. due to invalid URL or layout).private static void removeMatchingRepository(java.lang.Iterable<org.eclipse.aether.repository.RemoteRepository> repositories,
java.lang.String id)
public ModelResolver newCopy()
ModelResolverModelResolver.addRepository(Repository) on the clone do not affect
the state of the original resolver and vice versa.newCopy in interface ModelResolvernull.public ModelSource resolveModel(java.lang.String groupId, java.lang.String artifactId, java.lang.String version) throws UnresolvableModelException
ModelResolverresolveModel in interface ModelResolvergroupId - The group identifier of the POM, must not be null.artifactId - The artifact identifier of the POM, must not be null.version - The version of the POM, must not be null.null.UnresolvableModelException - If the POM could not be resolved from any configured repository.public ModelSource resolveModel(Parent parent) throws UnresolvableModelException
ModelResolverparent.
Unlike the ModelResolver.resolveModel(java.lang.String, java.lang.String, java.lang.String) method, this method
supports version ranges and updates the given parent instance to match the returned ModelSource.
If parent declares a version range, the version corresponding to the returned ModelSource will
be set on the given parent.
resolveModel in interface ModelResolverparent - The parent coordinates to resolve, must not be null.null.UnresolvableModelException - If the POM could not be resolved from any configured repository.Parent.clone()public ModelSource resolveModel(Dependency dependency) throws UnresolvableModelException
ModelResolverdependency.
Unlike the ModelResolver.resolveModel(java.lang.String, java.lang.String, java.lang.String) method, this method
supports version ranges and updates the given dependency instance to match the returned
ModelSource. If dependency declares a version range, the version corresponding to the returned
ModelSource will be set on the given dependency.
resolveModel in interface ModelResolverdependency - The dependency coordinates to resolve, must not be null.null.UnresolvableModelException - If the POM could not be resolved from any configured repository.Dependency.clone()