wei cai created MRESOLVER-247: --------------------------------- Summary: Avoid unnecessary dependency resolution Key: MRESOLVER-247 URL: https://issues.apache.org/jira/browse/MRESOLVER-247 Project: Maven Resolver Issue Type: Improvement Components: Resolver Affects Versions: 1.7.3 Reporter: wei cai
This Jira is related with https://issues.apache.org/jira/browse/MRESOLVER-240 and https://issues.apache.org/jira/browse/MRESOLVER-228 There was discussions about the DFS or BFS algorithm for maven resolver in MRESOLVER-228, Changing to BFS would make MRESOLVER-228 & MRESOLVER-7 much easier to implement. Here is the plan for multiple changes requested recently: * DFS > BFS - preparation for parallel download * Skip - avoid unnecessary version resolution (Covered in this JIRA) * Download descriptors in parallel (MRESOLVER-7) When comes to resolve the huge amount of dependencies of an enterprise level project, the maven resolver is very slow to resolve the dependency graph/tree. Take one of our app as example, it could take *10minutes+ and 16G memory* to print out the result of {*}mvn dependency:tree{*}. This is because there are many dependencies declared in the project, and some of the dependencies would introduce *600+* transitive dependencies, and exclusions are widely used to solve dependency conflicts. By checking the [code|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L500], we know the exclusion is also part of the cache key. This means when the exclusions up the tree differs, the cached resolution result for the same GAV won't be picked up and need s to be recalculated. -- This message was sent by Atlassian Jira (v8.20.1#820001)