Class DefaultModelResolver
java.lang.Object
org.apache.maven.repository.internal.DefaultModelResolver
- All Implemented Interfaces:
ModelResolver
Deprecated.
A model resolver to assist building of dependency POMs. This resolver gives priority to those repositories that have
been initially specified and repositories discovered in dependency POMs are recessively merged into the search chain.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
Deprecated.private final List
<org.eclipse.aether.repository.RemoteRepository> Deprecated.private final org.eclipse.aether.impl.RemoteRepositoryManager
Deprecated.private List
<org.eclipse.aether.repository.RemoteRepository> Deprecated.Deprecated.private final org.eclipse.aether.impl.ArtifactResolver
Deprecated.private final org.eclipse.aether.RepositorySystemSession
Deprecated.private final org.eclipse.aether.RequestTrace
Deprecated.private final org.eclipse.aether.impl.VersionRangeResolver
Deprecated. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
DefaultModelResolver
(DefaultModelResolver original) Deprecated.(package private)
DefaultModelResolver
(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.RequestTrace trace, String context, org.eclipse.aether.impl.ArtifactResolver resolver, org.eclipse.aether.impl.VersionRangeResolver versionRangeResolver, org.eclipse.aether.impl.RemoteRepositoryManager remoteRepositoryManager, List<org.eclipse.aether.repository.RemoteRepository> repositories) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRepository
(Repository repository) Deprecated.void
addRepository
(Repository repository, boolean replace) Deprecated.void
addRepository
(Repository repository) Deprecated.Adds a repository to use for subsequent resolution requests.void
addRepository
(Repository repository, boolean replace) Deprecated.Adds a repository to use for subsequent resolution requests.newCopy()
Deprecated.Clones this resolver for usage in a forked resolution process.private static void
removeMatchingRepository
(Iterable<org.eclipse.aether.repository.RemoteRepository> repositories, String id) Deprecated.resolveModel
(String groupId, String artifactId, String version) Deprecated.Tries to resolve the POM for the specified coordinates.resolveModel
(Dependency dependency, AtomicReference<Dependency> modified) Deprecated.resolveModel
(Parent parent, AtomicReference<Parent> modified) Deprecated.resolveModel
(Dependency dependency) Deprecated.Tries to resolve the POM for the specified dependency coordinates possibly updatingdependency
.resolveModel
(Parent parent) Deprecated.Tries to resolve the POM for the specified parent coordinates possibly updatingparent
.
-
Field Details
-
session
private final org.eclipse.aether.RepositorySystemSession sessionDeprecated. -
trace
private final org.eclipse.aether.RequestTrace traceDeprecated. -
context
Deprecated. -
repositories
Deprecated. -
externalRepositories
Deprecated. -
resolver
private final org.eclipse.aether.impl.ArtifactResolver resolverDeprecated. -
versionRangeResolver
private final org.eclipse.aether.impl.VersionRangeResolver versionRangeResolverDeprecated. -
remoteRepositoryManager
private final org.eclipse.aether.impl.RemoteRepositoryManager remoteRepositoryManagerDeprecated. -
repositoryIds
Deprecated.
-
-
Constructor Details
-
DefaultModelResolver
DefaultModelResolver(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.RequestTrace trace, String context, org.eclipse.aether.impl.ArtifactResolver resolver, org.eclipse.aether.impl.VersionRangeResolver versionRangeResolver, org.eclipse.aether.impl.RemoteRepositoryManager remoteRepositoryManager, List<org.eclipse.aether.repository.RemoteRepository> repositories) Deprecated. -
DefaultModelResolver
Deprecated.
-
-
Method Details
-
addRepository
Deprecated.- Specified by:
addRepository
in interfaceModelResolver
- Throws:
InvalidRepositoryException
-
addRepository
Deprecated.- Specified by:
addRepository
in interfaceModelResolver
- Throws:
InvalidRepositoryException
-
removeMatchingRepository
private static void removeMatchingRepository(Iterable<org.eclipse.aether.repository.RemoteRepository> repositories, String id) Deprecated. -
newCopy
Deprecated.Description copied from interface:ModelResolver
Clones this resolver for usage in a forked resolution process. In general, implementors need not provide a deep clone. The only requirement is that invocations ofModelResolver.addRepository(Repository)
on the clone do not affect the state of the original resolver and vice versa.- Specified by:
newCopy
in interfaceModelResolver
- Returns:
- The cloned resolver, never
null
.
-
resolveModel
public ModelSource resolveModel(String groupId, String artifactId, String version) throws UnresolvableModelException Deprecated.Description copied from interface:ModelResolver
Tries to resolve the POM for the specified coordinates.- Specified by:
resolveModel
in interfaceModelResolver
- Parameters:
groupId
- The group identifier of the POM, must not benull
.artifactId
- The artifact identifier of the POM, must not benull
.version
- The version of the POM, must not benull
.- Returns:
- The source of the requested POM, never
null
. - Throws:
UnresolvableModelException
- If the POM could not be resolved from any configured repository.
-
resolveModel
public ModelSource resolveModel(Parent parent, AtomicReference<Parent> modified) throws UnresolvableModelException Deprecated.- Specified by:
resolveModel
in interfaceModelResolver
- Throws:
UnresolvableModelException
-
resolveModel
public ModelSource resolveModel(Dependency dependency, AtomicReference<Dependency> modified) throws UnresolvableModelException Deprecated.- Specified by:
resolveModel
in interfaceModelResolver
- Throws:
UnresolvableModelException
-
resolveModel
Deprecated.Description copied from interface:ModelResolver
Tries to resolve the POM for the specified parent coordinates possibly updatingparent
.Unlike the
ModelResolver.resolveModel(java.lang.String, java.lang.String, java.lang.String)
method, this method supports version ranges and updates the givenparent
instance to match the returnedModelSource
. Ifparent
declares a version range, the version corresponding to the returnedModelSource
will be set on the givenparent
.- Specified by:
resolveModel
in interfaceModelResolver
- Parameters:
parent
- The parent coordinates to resolve, must not benull
.- Returns:
- The source of the requested POM, never
null
. - Throws:
UnresolvableModelException
- If the POM could not be resolved from any configured repository.- See Also:
-
resolveModel
Deprecated.Description copied from interface:ModelResolver
Tries to resolve the POM for the specified dependency coordinates possibly updatingdependency
.Unlike the
ModelResolver.resolveModel(java.lang.String, java.lang.String, java.lang.String)
method, this method supports version ranges and updates the givendependency
instance to match the returnedModelSource
. Ifdependency
declares a version range, the version corresponding to the returnedModelSource
will be set on the givendependency
.- Specified by:
resolveModel
in interfaceModelResolver
- Parameters:
dependency
- The dependency coordinates to resolve, must not benull
.- Returns:
- The source of the requested POM, never
null
. - Throws:
UnresolvableModelException
- If the POM could not be resolved from any configured repository.- See Also:
-
addRepository
Deprecated.Description copied from interface:ModelResolver
Adds a repository to use for subsequent resolution requests. The order in which repositories are added matters, repositories that were added first should also be searched first. When multiple repositories with the same identifier are added, only the first repository being added will be used.- Specified by:
addRepository
in interfaceModelResolver
- Parameters:
repository
- The repository to add to the internal search chain, must not benull
.- Throws:
InvalidRepositoryException
- If the repository could not be added (e.g. due to invalid URL or layout).
-
addRepository
Deprecated.Description copied from interface:ModelResolver
Adds a repository to use for subsequent resolution requests. The order in which repositories are added matters, repositories that were added first should also be searched first. When multiple repositories with the same identifier are added, then the value of the replace argument determines the behaviour. If replace is false then any existing repository with the same Id will remain in use. If replace is true the new repository replaces the original.- Specified by:
addRepository
in interfaceModelResolver
- Parameters:
repository
- The repository to add to the internal search chain, must not benull
.- Throws:
InvalidRepositoryException
- If the repository could not be added (e.g. due to invalid URL or layout).
-
maven-api-impl
jar instead