Class DefaultModelResolver
java.lang.Object
org.apache.maven.internal.impl.resolver.DefaultModelResolver
- All Implemented Interfaces:
Service,ModelResolver
A model resolver to assist building of dependency POMs.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PathgetPath(Session session, List<RemoteRepository> repositories, String groupId, String artifactId, String version, String classifier) resolveModel(Session session, List<RemoteRepository> repositories, String groupId, String artifactId, String version, String type, String classifier, InputLocation location, Consumer<String> resolvedVersion) resolveModel(Session session, List<RemoteRepository> repositories, String groupId, String artifactId, String version, String classifier, Consumer<String> resolvedVersion) resolveModel(Session session, List<RemoteRepository> repositories, Dependency dependency, AtomicReference<Dependency> modified) Tries to resolve the POM for the specified dependency coordinates possibly updatingdependency.resolveModel(Session session, List<RemoteRepository> repositories, Parent parent, AtomicReference<Parent> modified) Tries to resolve the POM for the specified parent coordinates possibly updatingparent.
-
Constructor Details
-
DefaultModelResolver
public DefaultModelResolver()
-
-
Method Details
-
resolveModel
@Nonnull public ModelSource resolveModel(@Nonnull Session session, @Nullable List<RemoteRepository> repositories, @Nonnull Parent parent, @Nonnull AtomicReference<Parent> modified) throws ModelResolverException Description copied from interface:ModelResolverTries to resolve the POM for the specified parent coordinates possibly updatingparent.- Specified by:
resolveModelin interfaceModelResolver- Parameters:
session- The session to use to resolve the model, must not benull.repositories- The repositories to use to resolve the model, may benullin which case theSessionrepositories will be used.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
@Nonnull public ModelSource resolveModel(@Nonnull Session session, @Nullable List<RemoteRepository> repositories, @Nonnull Dependency dependency, @Nonnull AtomicReference<Dependency> modified) throws ModelResolverException Description copied from interface:ModelResolverTries to resolve the POM for the specified dependency coordinates possibly updatingdependency.- Specified by:
resolveModelin interfaceModelResolver- Parameters:
session- The session to use to resolve the model, must not benull.repositories- The repositories to use to resolve the model, may benullin which case theSessionrepositories will be used.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.
-
resolveModel
public ModelSource resolveModel(@Nonnull Session session, @Nullable List<RemoteRepository> repositories, @Nonnull String groupId, @Nonnull String artifactId, @Nonnull String version, @Nullable String classifier, @Nonnull Consumer<String> resolvedVersion) throws ModelResolverException - Specified by:
resolveModelin interfaceModelResolver- Throws:
ModelResolverException
-
resolveModel
public ModelSource resolveModel(Session session, List<RemoteRepository> repositories, String groupId, String artifactId, String version, String type, String classifier, InputLocation location, Consumer<String> resolvedVersion) throws ModelResolverException - Throws:
ModelResolverException
-
getPath
-