The situation were the problem occurs is this:
A and B are armed, while C is not checked out at all. C provides a JAR of an older version of a library while A has its own - newer version - of the same library.
In this case B gets all of C's public jars as library entries (JavaCore.newLibraryEntry(...)
).
Even if eclipsoid container is not exported single library entries are visible to dependent projects if the library entry is created with export = true
!:
public static IClasspathEntry newLibraryEntry(
IPath path,
IPath sourceAttachmentPath,
IPath sourceAttachmentRootPath,
IAccessRule[] accessRules,
IClasspathAttribute[] extraAttributes,
boolean isExported
)
Which version of the mentioned library A gets depends on the order in which the classpath entries are considered.
However the fix is simple: library entries must be created with export = false
.