I have two dependencies imported via Maven that both import a common library, but at different versions but the versions are not compatible with each other. Essentially the
As everyone has suggested you can use the maven-shade-plugin. Open source projects handle this by creating one maven sub project for each dependency that needs to be shaded. So in your case you would need 3 maven projects:
Your maven project hierarchy would look like this:
An example of a project which has a maven sub project for shading a dependency is here. Look at the shaded-ning19 folder to see how to create a dedicated maven project for shading a dependency.