I have project xxxWeb
using project xxxAPI
. Both projects are sub project of a parent project. Project xxxAPI
uses a third-party library jar jar1.jar
, which has a class somepackage.ClassA
. Project xxxAPI itself also has identical somepackage.ClassA
that project xxxWeb
intends to use.
However, Eclipse load somepackage.ClassA
from jar1.jar
instead, resulting in compilation error because jar1/somepackage/ClassA
doesn't have the necessary fields like in xxxAPI/somepackage/ClassA
.
In xxxWeb project classpath, Eclipse place xxxAPI project to the very end, which probably why the compiler pick jar1/somepackage/ClassA
instead of xxxAPI/somepackage/ClassA
.
This is not a problem in IntelliJ however.
Is there a cure for this?
The build script work fine, so I this is a question on Gradle's Eclipse plugin, and how to manipulate the generated classpath?