On Thu, Nov 23, 2023 at 3:10 PM sebb <[email protected]> wrote:
>
> On Thu, 23 Nov 2023 at 13:05, Gary Gregory <[email protected]> wrote:
>
> Generally a user can override the default version stated in the component pom.
> Indeed this happens automatically in Maven if another jar declares a
> dependency on a later version with the same Maven coordinates.


Um, no, though this is a common misconception. Gradle, I think, works
like that but Maven does not. In Maven the chosen dependency version
is the first one encountered in a breadth-first search of the
dependency tree. Older versions can and often are picked in preference
to newer versions.

It is possible for a client project to override transitive
dependencies, but you need to be careful. Using a BOM is one of the
easier ways to manage these problems: https://jlbp.dev/JLBP-15


-- 
Elliotte Rusty Harold
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to