[Commented] (MRESOLVER-164) DefaultDependencyCollector filterVersions seems always return full version range

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Commented] (MRESOLVER-164) DefaultDependencyCollector filterVersions seems always return full version range

Tibor Digana (Jira)

    [ https://issues.apache.org/jira/browse/MRESOLVER-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17288819#comment-17288819 ]

Xiang Li commented on MRESOLVER-164:
------------------------------------

I have commented on the same issue which open under MNG-7049, we could use that issue if it needs to move to MNG. 

I can help get a maven IT, since I have no experience with maven IT, I wonder if that is the right place for [maven IT|https://github.com/apache/maven-integration-testing] (which seems apply to maven core)? 

> 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)