I am leaving the issue open to check if there are more fundamental solutions available, which does not require recompiling to renaming conflicting classes for the confused classloader. Because it's not always your own code appears as a dependency to add a build plugin to it but could be someone else's jar file.