Transitive dependency version resolution mechanism seems to be missing

Answered

Imagine the following multi-module project setup fed by Maven/Gradle (don't think it's important for the matter)

main

\-- A

     \-- libX

          \-- libY version 1.2

\-- B

     \-- libY version 1.3

In other words, module main depends on A and B, A depends on external libX which depends on external libY. B depends directly on external libY.

When a main class of module main is run, it's going to have both versions of libY on the classpath, in an unpredictable order.

Both maven and gradle have various version conflict resolution schemes which solve this problem to this or that extent. In IntelliJ however there is a problem.

Is there any workaround / solution to this problem?

Please sign in to leave a comment.