Interface ModelResolver

All Superinterfaces:
org.apache.maven.api.Service
All Known Implementing Classes:
DefaultModelResolver

public interface ModelResolver extends org.apache.maven.api.Service
Resolves a POM from its coordinates.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
     
    static final record 
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    org.apache.maven.api.services.ModelSource
    resolveModel(org.apache.maven.api.Session session, List<org.apache.maven.api.RemoteRepository> repositories, org.apache.maven.api.model.Dependency dependency, AtomicReference<org.apache.maven.api.model.Dependency> modified)
    Tries to resolve the POM for the specified dependency coordinates possibly updating dependency.
    org.apache.maven.api.services.ModelSource
    resolveModel(org.apache.maven.api.Session session, List<org.apache.maven.api.RemoteRepository> repositories, org.apache.maven.api.model.Parent parent, AtomicReference<org.apache.maven.api.model.Parent> modified)
    Tries to resolve the POM for the specified parent coordinates possibly updating parent.
  • Method Details

    • resolveModel

      @Nonnull org.apache.maven.api.services.ModelSource resolveModel(@Nonnull org.apache.maven.api.Session session, @Nullable List<org.apache.maven.api.RemoteRepository> repositories, @Nonnull org.apache.maven.api.model.Parent parent, @Nonnull AtomicReference<org.apache.maven.api.model.Parent> modified) throws ModelResolverException
      Tries to resolve the POM for the specified parent coordinates possibly updating parent.
      Parameters:
      session - The session to use to resolve the model, must not be null.
      repositories - The repositories to use to resolve the model, may be null in which case the Session repositories will be used.
      parent - The parent coordinates to resolve, must not be null.
      modified - a holder for the updated parent, must not be null.
      Returns:
      The source of the requested POM, never null.
      Throws:
      ModelResolverException - If the POM could not be resolved from any configured repository.
    • resolveModel

      @Nonnull org.apache.maven.api.services.ModelSource resolveModel(@Nonnull org.apache.maven.api.Session session, @Nullable List<org.apache.maven.api.RemoteRepository> repositories, @Nonnull org.apache.maven.api.model.Dependency dependency, @Nonnull AtomicReference<org.apache.maven.api.model.Dependency> modified) throws ModelResolverException
      Tries to resolve the POM for the specified dependency coordinates possibly updating dependency.
      Parameters:
      session - The session to use to resolve the model, must not be null.
      repositories - The repositories to use to resolve the model, may be null in which case the Session repositories will be used.
      dependency - The dependency coordinates to resolve, must not be null.
      modified - a holder for the updated dependency, must not be null.
      Returns:
      The source of the requested POM, never null.
      Throws:
      ModelResolverException - If the POM could not be resolved from any configured repository.
    • resolveModel

      Throws:
      ModelResolverException