You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Richard Wallace <rw...@thewallacepack.net> on 2009/08/01 01:25:13 UTC
Export-Package versioning
Hello,
So I've run into this a few times in my own development but also in
using bundles supplied by other people. I seem to be having a problem
where a packaging that I'm importing with a version can't be resolved
even though a bundle supplying that package with that version is
available and active. Digging further I find that my Import-Package
is
Import-Package: org.apache.http;version="4.0"
but that the bundle that supplies it is exporting the package using
Export-Package: org.apache.http
Bundle-Version: 4.0
I had originally thought that if the package being exported didn't
have an explicit version set for it, that the bundle version would be
used. But this doesn't seem to be the case as my import fails. So is
it really necessary to specify the version explicitly on each package
being exported? Or is this maybe a bug in the version of Felix I'm
using, 1.2?
Thanks,
Rich
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Export-Package versioning
Posted by Marcel Offermans <ma...@luminis.nl>.
Hello Richard,
On Aug 1, 2009, at 1:25 , Richard Wallace wrote:
> So is it really necessary to specify the version explicitly on each
> package
> being exported?
The short answer is YES. You need to version each package you export.
The bundle version really has nothing to do with this.
Greetings, Marcel
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Export-Package versioning
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Well, I definitely recommend that you upgrade to a newer version of
Felix, since many bug fixes and new features have been added since 1.2;
however, this behavior is not a bug.
If you do not specify a version on an exported package, then it defaults
to 0.0.0, not to the bundle version. The bundle version is associated
automatically with export, but to use it you would do something like this:
Import-Package: org.apache.http; bundle-version="4.0"
However, the better approach is to version your packages. If you are
using maven-bundle-plugin/BND, it can make this task a little easier.
-> richard
On 7/31/09 19:25, Richard Wallace wrote:
> Hello,
>
> So I've run into this a few times in my own development but also in
> using bundles supplied by other people. I seem to be having a problem
> where a packaging that I'm importing with a version can't be resolved
> even though a bundle supplying that package with that version is
> available and active. Digging further I find that my Import-Package
> is
>
> Import-Package: org.apache.http;version="4.0"
>
> but that the bundle that supplies it is exporting the package using
>
> Export-Package: org.apache.http
> Bundle-Version: 4.0
>
> I had originally thought that if the package being exported didn't
> have an explicit version set for it, that the bundle version would be
> used. But this doesn't seem to be the case as my import fails. So is
> it really necessary to specify the version explicitly on each package
> being exported? Or is this maybe a bug in the version of Felix I'm
> using, 1.2?
>
> Thanks,
> Rich
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org