vlsi commented on issue #11391:
URL: https://github.com/apache/maven/issues/11391#issuecomment-3492329212
> Consumer POM transformations should strip `directDependencyStrategy`
attributes during publishing
Ah. I missed the idea is to strip the attribute on publishing.
In that regard, it makes no sense to have `strict`/`reject`/`require`
version types.
If the new attribute was kept when publishing, then transitive dependencies
could bring requirements like `require 1.4 & reject [2.0,)` below.
----
>What would be the behaviour of the reject value ? Act like require, but
fail if the version would change ?
My thought was as follows: sometime later the following cases might be
helpful for both producers and consumers.
* `require 1.4 & reject [2.0,)`
In other words: "I require 1.4", however, if somebody requests 2.1, then
the resolution should fail as I know there are incompatibilities.
* `strict 1.7`
In other words, "this works with 1.7 only"
In that regard, `versionType` could control the way conflicts would be
resolved.
The initial implementation could be just `strict` + `require` (or `fixed` +
`flexible`).
However, users would require a separate knob for "nearest vs highest"
anyways, so their combinations would be as follows:
* strict + nearest: current behavior
* strict + highest: might be helpful for "forced override" of a version. I
hope it should rarely be used
* require + highest: solves NoClassDefFoundError caused by nearest. I hope
this would become a new default one day
* require + nearest: it is probably the same as `strict + nearest`. We could
issue warning and be done with it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]