|Classpath duplication on plug-in project [message #1297652]
||Tue, 15 April 2014 20:55
| Andrew Stoneberg
Registered: April 2014
I stumbled across a stack overflow issue [Third party jars appearing twice in runtime classpath] that I am currently running into.|
I am working on some code that leverages some third-party libraries which are not bundles. Corporate/legal requires we use these specific, unmodified jars - so converting them to a bundle or getting a new version is not really an option at this time.
Since we require these libraries to compile - and also need them available on the bundle classpath - we have been including the lib/XXX.jar entries on the build path, as well as adding the relative paths to the Bundle-Classpath in MANIFEST.MF.
However, it appears that these two classpaths get merged for plug-in projects somehow, which can sometimes result in warnings depending on the library.
For the sake of illustration, if I include slf4j-1.5.11.jar in the build path and bundle-classpath of a plugin project, I see the following warning:
SLF4J: Found binding in [bundleresource://61.fwk852452283:1/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [bundleresource://61.fwk852452283:4/org/slf4j/impl/StaticLoggerBinder.class]
I thought that maybe the 'Extra Classpath Entries' section of the PDE 'Build' tab would resolve this issue, but only including the libraries there (and not on the build path) results in compilation errors when building in Eclipse.
What is the proper way to do this and maintain a 'lean' runtime bundle classpath?
Powered by FUDForum
. Page generated in 0.01435 seconds