Class RawMavenResolver


  • public class RawMavenResolver
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      RawMavenResolver​(MavenDownloader downloader, boolean forParent, java.util.Collection<java.lang.String> activeProfiles, MavenSettings mavenSettings, boolean resolveOptional, boolean continueOnError, java.util.function.Consumer<java.lang.Throwable> onError)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.openrewrite.xml.tree.Xml.Document resolve​(RawMaven rawMaven)  
      Pom resolve​(RawMaven rawMaven, Scope scope, java.lang.String requestedVersion, java.util.List<RawRepositories.Repository> repositories)
      Resolution is performed breadth-first because the default conflict resolution algorithm for Maven prefers nearer versions.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RawMavenResolver

        public RawMavenResolver​(MavenDownloader downloader,
                                boolean forParent,
                                java.util.Collection<java.lang.String> activeProfiles,
                                @Nullable
                                MavenSettings mavenSettings,
                                boolean resolveOptional,
                                boolean continueOnError,
                                @Nullable
                                java.util.function.Consumer<java.lang.Throwable> onError)
    • Method Detail

      • resolve

        @Nullable
        public org.openrewrite.xml.tree.Xml.Document resolve​(RawMaven rawMaven)
      • resolve

        @Nullable
        public Pom resolve​(RawMaven rawMaven,
                           Scope scope,
                           @Nullable
                           java.lang.String requestedVersion,
                           java.util.List<RawRepositories.Repository> repositories)
        Resolution is performed breadth-first because the default conflict resolution algorithm for Maven prefers nearer versions. By proceeding breadth-first we can avoid even attempting to resolve subtrees that have no chance of being selected by conflict resolution in the end.
        Parameters:
        rawMaven - The shell of the POM to resolve.
        repositories - The set of repositories to resolve with.
        Returns:
        A transitively resolved POM model.