Package org.apache.maven.project
Class DefaultProjectBuilder.ModelResolverWrapper
java.lang.Object
org.apache.maven.project.DefaultProjectBuilder.ModelResolverWrapper
- All Implemented Interfaces:
Service
,ModelResolver
- Enclosing class:
DefaultProjectBuilder
protected abstract class DefaultProjectBuilder.ModelResolverWrapper
extends Object
implements ModelResolver
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ModelResolver
getResolver
(List<org.eclipse.aether.repository.RemoteRepository> repositories) resolveModel
(Session session, String groupId, String artifactId, String version, Consumer<String> resolved) resolveModel
(Session session, Dependency dependency, AtomicReference<Dependency> modified) Tries to resolve the POM for the specified dependency coordinates possibly updatingdependency
.resolveModel
(Session session, Parent parent, AtomicReference<Parent> modified) Tries to resolve the POM for the specified parent coordinates possibly updatingparent
.
-
Constructor Details
-
ModelResolverWrapper
protected ModelResolverWrapper()
-
-
Method Details
-
getResolver
protected abstract ModelResolver getResolver(List<org.eclipse.aether.repository.RemoteRepository> repositories) -
resolveModel
public ModelSource resolveModel(Session session, String groupId, String artifactId, String version, Consumer<String> resolved) throws ModelResolverException - Specified by:
resolveModel
in interfaceModelResolver
- Throws:
ModelResolverException
-
resolveModel
public ModelSource resolveModel(Session session, Parent parent, AtomicReference<Parent> modified) throws ModelResolverException Description copied from interface:ModelResolver
Tries to resolve the POM for the specified parent coordinates possibly updatingparent
.- Specified by:
resolveModel
in interfaceModelResolver
- Parameters:
session
- The session to use to resolve the model, must not benull
.parent
- The parent coordinates to resolve, must not benull
.modified
- a holder for the updated parent, must not benull
.- Returns:
- The source of the requested POM, never
null
. - Throws:
ModelResolverException
- If the POM could not be resolved from any configured repository.
-
resolveModel
public ModelSource resolveModel(Session session, Dependency dependency, AtomicReference<Dependency> modified) throws ModelResolverException Description copied from interface:ModelResolver
Tries to resolve the POM for the specified dependency coordinates possibly updatingdependency
.- Specified by:
resolveModel
in interfaceModelResolver
- Parameters:
session
- The session to use to resolve the model, must not benull
.dependency
- The dependency coordinates to resolve, must not benull
.modified
- a holder for the updated dependency, must not benull
.- Returns:
- The source of the requested POM, never
null
. - Throws:
ModelResolverException
- If the POM could not be resolved from any configured repository.
-