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: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to