OSGI Bundle Build failure only when exporting for deployment [message #65563] |
Thu, 25 June 2009 02:29  |
Eclipse User |
|
|
|
I have a plain vanilla OSGI bundle with a bunch of import-packages on
other packages. The dependencies are fairly simple:
Bundle D
|________ import package A[1.0.0, 2.0.0)
|________ import package B[2.0.0, 3.0.0)
|____________________ import package
X[3.0.0, 4.0.0)
|________ import package X[2.0.0, 3.0.0)
As you can see D directly uses X(2.0.0) and indirectly via B uses X(3.0.0)
All this is good, I can build locally and run the OSGI bundle. But when I
hit Export->Plug-in Development ->Deployable Plugins and Fragments it
complaints of a build error.
The build error shows that its trying to build Bundle D using X(3.0.0) and
not X(2.0.0)
Is this a known problem / should I file a bug or are there subtle details
that I m missing.
Regards
banks
|
|
|
|
|
Re: OSGI Bundle Build failure only when exporting for deployment [message #598571 is a reply to message #65563] |
Thu, 25 June 2009 10:42  |
Eclipse User |
|
|
|
You should raise a bug on PDE/Build for this.
You are going to end up with both providers of X on your build-time
classpath (the compiler may need X_3.0.0 due to references from B).
Build is going to generate access rules for each classpath entry telling
the compiler what D can use.
However, when we build the list of packages you are allowed to see, we
map the exporter's symbolic name to provided packages without
considering the version. So in the context of D, when we look up
packages provided by X_3.0.0 we get the list that would have been
provided by X_2.0.0 instead of the expected empty list of packages.
-Andrew
bank kus wrote:
> I have a plain vanilla OSGI bundle with a bunch of import-packages on
> other packages. The dependencies are fairly simple:
>
> Bundle D
> |________ import package A[1.0.0, 2.0.0)
> |________ import package B[2.0.0, 3.0.0)
> |____________________ import
> package X[3.0.0, 4.0.0)
>
> |________ import package X[2.0.0, 3.0.0)
>
> As you can see D directly uses X(2.0.0) and indirectly via B uses X(3.0.0)
>
> All this is good, I can build locally and run the OSGI bundle. But when
> I hit Export->Plug-in Development ->Deployable Plugins and Fragments it
> complaints of a build error.
>
> The build error shows that its trying to build Bundle D using X(3.0.0)
> and not X(2.0.0)
>
> Is this a known problem / should I file a bug or are there subtle
> details that I m missing.
>
> Regards
> banks
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03065 seconds