How to enforce consistent dependency versions in a multi-project setup?

(Stephen Friedrich) #1

We are developing a set of in-house libraries that can be picked by projects in combination or independently.
All these libraries are built in a single multi-project setup (one sub-project for each jar).

I had hoped that I can configure a ResolutionStrategy on the main project with “failOnVersionConflict”.
But that does not work, because the individual jars (mostly) have no dependencies in between them.

However it is a valid concern that we want to avoid offering libraries to client projects that bring along version conflicts if used in combination.

So: How can we make sure that all our libraries use a consistent set of (transitive) dependencies?