[ https://issues.apache.org/jira/browse/MRESOLVER-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17287888#comment-17287888 ]
Michael Osipov commented on MRESOLVER-164: ------------------------------------------ [~xiangli1996], can you bundle up your problem into a Maven IT? We'd need to evaluate [~cstamas]'s changes againt Maven master. [~cstamas], WDYT was this just an oversight during programming? With a range I see no reason to download versions in between which aren't used anyway. > DefaultDependencyCollector filterVersions seems always return full version > range > -------------------------------------------------------------------------------- > > Key: MRESOLVER-164 > URL: https://issues.apache.org/jira/browse/MRESOLVER-164 > Project: Maven Resolver > Issue Type: Bug > Affects Versions: 1.4.2, 1.6.1 > Reporter: Xiang Li > Priority: Major > > Related to MNG-7049 but I think the root cause is in maven-resolver so I > opened a new issue. Correct me if it is better to still use the old ticket. > During using version ranges, I notice that maven will download all poms from > a version range, which happen in that > [loop|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404], > the reason is that > [verFilter|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155] > here seems return null. Since by default, versionFilter is set to null by > DefaultRepositorySystemSession, and I do not see many examples that > setVersionFilter get used for some reason. > Another thing that confuses me is that version range is resolved by > DefaultVersionRangeResolver in maven rather than maven-resolver here. > > I wonder if it possible to set HighestVersionFilter > [here|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155] > instead of return all version range results. I am happy to contribute a PR > with some guidance. -- This message was sent by Atlassian Jira (v8.3.4#803005)