users@jersey.java.net

[Jersey] Re: OSGi Export-Package: javax.ws.rs

From: Jakub Podlesak <jakub.podlesak_at_oracle.com>
Date: Mon, 30 May 2011 13:52:14 +0200

Hi Ryan,

We have added the javax.ws.rs.* stuff to the jersey-core bundle in order
to be able to support
running multiple Jersey versions in parallel (still need to get rid of
the DynamicImport-Package:*
header). The main issue here is that the RuntimeDelegate class from JAX-RS
only allows you to register a single implementation instance.
Bundling JAX-RS classes with jersey-core should help us overcome this issue.

Regarding your issue with using other bundles, which import
javax.ws.rs;version="1.1.1",
i think we can fix that by including proper version in the jersey-core's
export headers.
I actually think, that we got to fix that anyway.

~Jakub

On 05/27/2011 10:48 PM, Ryan Stewart wrote:
> Why is it that jersey-core includes the javax.ws.rs.* packages and
> exports them as, for example, javax.ws.rs
> <http://javax.ws.rs>;version="0.0.0"? Whether using OSGi or not, isn't
> it more correct to indicate that jersey-core has a transitive
> dependency on jsr311-api-1.1.1? And specifically in OSGi, I've been
> encountering trouble trying to use other bundles that specifically
> import javax.ws.rs <http://javax.ws.rs>;version="1.1.1". Since
> everything in jersey explicitly depends on this bogus "0.0.0" version,
> there's no way to resolve the jersey bundles in the same container as
> the others in a way that they'll play together nicely. Can we remove
> javax.ws.rs.* from the jersey jars please?