nested jars in OSGi [message #63317] |
Thu, 09 March 2006 00:22 |
Mirko Jahn Messages: 12 Registered: July 2009 |
Junior Member |
|
|
I have a question concerning the discovering of classes located in nested
jar files in pure OSGi bundles. Here the situation:
Bundle A is a kind of library bundle which includes several jar files,
lets say x.jar, y.jar, and so on. Bundle A exports by ?Export-Package? all
included packages. The libraries are located in the lib folder and
explicitly added to the class path with ?Bundle-ClassPath: lib/x.jar,
lib/y.jar,??
Bundle B is trying to use most of these packages, so I defined
?Require-Bundle: A? instead of using the ?Import-Package: ?? method (which
doesn?t change anything in my case or problem).
Up to now, everything works perfect. No problems at all.
But as soon, as I package my bundle A as a jar, copy it in the eclipse
plug-in directory and close the project in the workspace ? the project
couldn?t resolve the desired packages any longer. I found out, that it is
related to the nested jar files. If I unjar everything and put it in the
root of the jar file, like in the OSGi bundle itself, everything works
fine. Even the manifest editor could find the exported packages of bundle
A, but not the compiler (and not the export tool, even if I statically add
the libraries).
I use Eclipse 3.2M5a and all projects/ bundles are standard OSGi. Does
anyone have similar problems? Is this behavior intended?
Thanks,
Mirko
|
|
|
Re: nested jars in OSGi [message #63410 is a reply to message #63317] |
Mon, 13 March 2006 02:11 |
Eclipse User |
|
|
|
Originally posted by: pascal.ibm.canada
This is not normal. Could you please open a bug report against Equinox /
framework and attach examples allowing to reproduce the pb. Thx.
PaScaL
mjahn@us.ibm.com wrote:
> I have a question concerning the discovering of classes located in nested
> jar files in pure OSGi bundles. Here the situation:
>
> Bundle A is a kind of library bundle which includes several jar files,
> lets say x.jar, y.jar, and so on. Bundle A exports by ?Export-Package? all
> included packages. The libraries are located in the lib folder and
> explicitly added to the class path with ?Bundle-ClassPath: lib/x.jar,
> lib/y.jar,??
>
> Bundle B is trying to use most of these packages, so I defined
> ?Require-Bundle: A? instead of using the ?Import-Package: ?? method (which
> doesn?t change anything in my case or problem).
>
> Up to now, everything works perfect. No problems at all.
>
> But as soon, as I package my bundle A as a jar, copy it in the eclipse
> plug-in directory and close the project in the workspace ? the project
> couldn?t resolve the desired packages any longer. I found out, that it is
> related to the nested jar files. If I unjar everything and put it in the
> root of the jar file, like in the OSGi bundle itself, everything works
> fine. Even the manifest editor could find the exported packages of bundle
> A, but not the compiler (and not the export tool, even if I statically add
> the libraries).
>
> I use Eclipse 3.2M5a and all projects/ bundles are standard OSGi. Does
> anyone have similar problems? Is this behavior intended?
>
> Thanks,
> Mirko
|
|
|
Powered by
FUDForum. Page generated in 0.03340 seconds