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

ASF GitHub Bot commented on MNG-7561:
-------------------------------------

cstamas commented on PR #823:
URL: https://github.com/apache/maven/pull/823#issuecomment-1291012549

   > IMHO this PR is wrong, as commented on issue 
https://issues.apache.org/jira/browse/MNG-7561?focusedCommentId=17616329&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17616329
   
   I change my mind here, I believe I am wrong: VersionResolver is NOT 
**ensuring** that version exists, it simply **uses** metadata to **"discover"** 
available versions instead, so I change my mind: the PR seems ok




> DefaultVersionRangeResolver should not try to resolve request with same upper 
> and lower bound
> ---------------------------------------------------------------------------------------------
>
>                 Key: MNG-7561
>                 URL: https://issues.apache.org/jira/browse/MNG-7561
>             Project: Maven
>          Issue Type: Improvement
>          Components: Artifacts and Repositories
>            Reporter: Konrad Windszus
>            Priority: Major
>
> For dependencies having e.g. version {{[1.0]}} the 
> DefaultVersionRangeResolver still tries to resolve versions although only a 
> single version (namely 1.0) is valid here according to 
> https://maven.apache.org/pom.html#Dependency_Version_Requirement_Specification.
>  
> This leads in the worst case to long-running calls against a remote 
> repository for no reason.
> There should be a shortcut in 
> https://github.com/apache/maven/blob/3f90e7028e0338c110aea267b44362653d55273a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java#L108
>  when the range has the same upper and lower bound.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to