public class ProjectModelResolver extends Object implements ModelResolver
Constructor and Description |
---|
ProjectModelResolver(org.eclipse.aether.RepositorySystemSession session,
org.eclipse.aether.RequestTrace trace,
org.eclipse.aether.RepositorySystem resolver,
org.eclipse.aether.impl.RemoteRepositoryManager remoteRepositoryManager,
List<org.eclipse.aether.repository.RemoteRepository> repositories,
ProjectBuildingRequest.RepositoryMerging repositoryMerging,
org.apache.maven.project.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.
|
ModelSource |
resolveModel(Parent parent)
Tries to resolve the POM for the specified parent coordinates possibly updating
parent . |
ModelSource |
resolveModel(String groupId,
String artifactId,
String version)
Tries to resolve the POM for the specified coordinates.
|
public ProjectModelResolver(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.RequestTrace trace, org.eclipse.aether.RepositorySystem resolver, org.eclipse.aether.impl.RemoteRepositoryManager remoteRepositoryManager, List<org.eclipse.aether.repository.RemoteRepository> repositories, ProjectBuildingRequest.RepositoryMerging repositoryMerging, org.apache.maven.project.ReactorModelPool modelPool)
public void addRepository(Repository repository) throws InvalidRepositoryException
ModelResolver
addRepository
in interface ModelResolver
repository
- 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
ModelResolver
addRepository
in interface ModelResolver
repository
- 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 ModelResolver newCopy()
ModelResolver
ModelResolver.addRepository(Repository)
on the clone do not affect
the state of the original resolver and vice versa.newCopy
in interface ModelResolver
null
.public ModelSource resolveModel(String groupId, String artifactId, String version) throws UnresolvableModelException
ModelResolver
resolveModel
in interface ModelResolver
groupId
- 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
ModelResolver
parent
.resolveModel
in interface ModelResolver
parent
- The parent coordinates to resolve, must not be null
.null
.UnresolvableModelException
- If the POM could not be resolved from any configured repository.Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.