Package org.openrewrite.maven.internal
Class RawMavenResolver
- java.lang.Object
-
- org.openrewrite.maven.internal.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.Documentresolve(RawMaven rawMaven)Pomresolve(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.
-
-
-
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.
-
-