Simple case for me: I'm using 2 very popular but conflicting scala libraries: Spark SQL & JSON4s. Each depends on different versions of the Jackson XML parser.
Since nobody except my own program is using JSON4s, a simple solution is to migrate the packages org.json4s.jackson
and com.fasterxml.jackson
to new locations.
However, the maven-shade plugin can only do this in the packaging process, since all tests and IDE runs happen before that. This still cause all tests to fail, regardless of whether to be run in mvn-test or scala test in the IDE.
Is there a plugin that can collectively manage package relocation policies for all three cases: JAR-packaging/mvn-test/IDE-run? I've been searching the Internet all day and can't find an answer.