vlsi commented on issue #11391:
URL: https://github.com/apache/maven/issues/11391#issuecomment-3531551317
> but does not allow to tune a given dependency explicitly
How about the following:
1) A new resolver goes with highest and treats default version declaration
like `require` (even directly declared ones)
2) We add a new tag to `<dependency>` so user could fine-tune if they really
need to enforce a specific version (e.g. for testing or whatever purposes)
```xml
<dependency>
<groupId>com.example</groupId>
<artifactId>lib-a</artifactId>
<version>1.0</version>
<versionType>strict</versionType> <!-- or "require" which could be a
default for "highest" resolver -->
</dependency>
```
---
> The question is whether the added complexity (to configure for a given
strategy) actually solves a real use case or not
It would solve the typical pain-points with `NoClassDefFoundError` which are
quite common for Maven users.
A single configuration switch like "use highest dependencies" would have
**better chances** of producing **workable classpath** than the current
"nearest".
--
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]