Conversation
61e6d23 to
6475b24
Compare
|
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 |
| if ( Objects.equals( versionConstraint.getRange().getLowerBound(), | ||
| versionConstraint.getRange().getUpperBound() ) ) | ||
| { | ||
| result.addVersion( versionConstraint.getRange().getLowerBound().getVersion() ); |
There was a problem hiding this comment.
why is this shortcut allowed for recommended versions (soft-requirements)?
There was a problem hiding this comment.
What happens if the artifact does not exist with the given version ?
There was a problem hiding this comment.
The same as for soft-requirements, i.e. that would lead to an exception subsequently.
I follow this reasoning. |
Agreed, but then I agree with @kwin that it also seems incorrect that for a non range version, no check is performed. I don't really see why the use case would really differ. |
|
@michael-o @cstamas I'm trying to understand how this works. If the |
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 |
|
Some ITs fail with this PR as those also assume same upper/lower bound ranges should be resolved. Are those wrong? |
|
Hm, it fails due NPE? ? |
|
The test fails with an NPE on the modified line: Given the earlier tests, it means Or does that happen so that the maven-resolver can obtain a list of existing versions for a given artifact, if none is provided, as done for plugin resolution ? |
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
60edb5b to
d87710f
Compare
|
Resolve #8890 |
Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[MNG-XXX] SUMMARY, where you replaceMNG-XXXand
SUMMARYwith the appropriate JIRA issue. Best practice is to use the JIRA issuetitle in the pull request title and in the first line of the commit message.
mvn clean verifyto make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.