You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To my knowledge (please correct me if I'm wrong) Maven's version picking is based on the distance in the dependency tree (see: http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Transitive_Dependencies). So, if you define a dependency in your pom.xml, its version declaration should win. If the distance of two transitive dependencies is the same, Maven picks the one that is declared first. To overrule this mechanism, add a <dependency> entry under <dependencyManagement> to choose the preferred version or in case of JUnit delegate the version management to a bom file:
The exclusion approach seems a bit drastic here. It is only necessary, if your runtime already ships these libraries.
Reducing the scope to provided, like you've suggested, would force users to explicitly declare direct dependencies to all of them (and manually care for their version management).
Please provide some more information regarding your concrete issue. In the meantime I'll double-check the need for these dependencies. Maybe there are some other options.
I'm trying to use it in my junit 5 based app and getting version conflicts. I had to exclude below to make it work:
The text was updated successfully, but these errors were encountered: