Build path access to jar inside bundle [message #270142] |
Thu, 09 April 2009 02:22  |
Eclipse User |
|
|
|
Hello
I want to add an OSGi bundle in the build path, so that I can develop
with the libs which will be available when the app will be deployed on
OSGi. The bundle in question is servlet.jar as prepared by the Oscar
team (http://oscar-osgi.sf.net/repo/servlet/servlet.jar).
The structure of this bundle is, that it contains a manifest and a
javax.servlet.jar. The manifest, exports the relevant packages and the
internal classpath points to the jar.
<manifest>
(...)
Bundle-ClassPath: javax.servlet.jar
Export-Package: javax.servlet;specification-version=2.3.0,javax.servle
t.http;specification-version=2.3.0,javax.servlet.jsp;specifi cation-ve
rsion=2.3.0
</manifest>
When I add this bundle to the build path in eclipse, it can't resolve
the classes (for example javax.servlet.http.HttpServletRequest).
How can I make Eclipse find those classes which are in a jar in an OSGi
bundle?
Best regards
Philipp
|
|
|
|
Re: Build path access to jar inside bundle [message #659622 is a reply to message #270153] |
Mon, 14 March 2011 16:12  |
Eclipse User |
|
|
|
Surely Philipp must have figured this out by now. But, I ran into the same problem recently. A class was required, which was hosted in a jar-file in a lib folder in an OSGi bundle-file. The appropriate namespaces were exported in the bundle's MANIFEST.MF. The only way for eclipse to resolve the classes from the jar nested in the bundle, was to explode the bundle file into a directory where the PDE is looking for plugins... err bundles. In other words, the exploded directory needs to be a subdirectory to some target-platform location.
gd
|
|
|
Powered by
FUDForum. Page generated in 0.10069 seconds