Class DefaultModelResolver

  • All Implemented Interfaces:
    org.apache.maven.model.resolution.ModelResolver

    public class DefaultModelResolver
    extends Object
    implements org.apache.maven.model.resolution.ModelResolver
    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.
    Author:
    Benjamin Bentmann
    See Also:
    DefaultArtifactDescriptorReader
    • Constructor Summary

      Constructors 
      Constructor Description
      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)  
    • Constructor Detail

      • DefaultModelResolver

        public 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)
    • Method Detail

      • addRepository

        public void addRepository​(org.apache.maven.model.Repository repository)
                           throws org.apache.maven.model.resolution.InvalidRepositoryException
        Specified by:
        addRepository in interface org.apache.maven.model.resolution.ModelResolver
        Throws:
        org.apache.maven.model.resolution.InvalidRepositoryException
      • addRepository

        public void addRepository​(org.apache.maven.model.Repository repository,
                                  boolean replace)
                           throws org.apache.maven.model.resolution.InvalidRepositoryException
        Specified by:
        addRepository in interface org.apache.maven.model.resolution.ModelResolver
        Throws:
        org.apache.maven.model.resolution.InvalidRepositoryException
      • newCopy

        public org.apache.maven.model.resolution.ModelResolver newCopy()
        Specified by:
        newCopy in interface org.apache.maven.model.resolution.ModelResolver
      • resolveModel

        public org.apache.maven.model.building.ModelSource resolveModel​(String groupId,
                                                                        String artifactId,
                                                                        String version)
                                                                 throws org.apache.maven.model.resolution.UnresolvableModelException
        Specified by:
        resolveModel in interface org.apache.maven.model.resolution.ModelResolver
        Throws:
        org.apache.maven.model.resolution.UnresolvableModelException
      • resolveModel

        public org.apache.maven.model.building.ModelSource resolveModel​(org.apache.maven.model.Parent parent)
                                                                 throws org.apache.maven.model.resolution.UnresolvableModelException
        Specified by:
        resolveModel in interface org.apache.maven.model.resolution.ModelResolver
        Throws:
        org.apache.maven.model.resolution.UnresolvableModelException
      • resolveModel

        public org.apache.maven.model.building.ModelSource resolveModel​(org.apache.maven.model.Dependency dependency)
                                                                 throws org.apache.maven.model.resolution.UnresolvableModelException
        Specified by:
        resolveModel in interface org.apache.maven.model.resolution.ModelResolver
        Throws:
        org.apache.maven.model.resolution.UnresolvableModelException