Improve duplicate JAR resolving