[
https://issues.apache.org/jira/browse/SLING-2192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14988877#comment-14988877
]
Mike Rose commented on SLING-2192:
----------------------------------
I had been working off of trunk/master for a while and have been working off of
launchpad 8 since it was released. Launchpad 8 depends on v 1.2.2 of the Sling
Models api/impl. Here are the relevant excerpts from the manifest of Sling
Model api:
Import-Package:
--------> javax.annotation,javax.inject <--------
Export-Package:
org.apache.sling.models.annotations;version="1.2.0";uses:="javax.inject",
org.apache.sling.models.annotations.injectorspecific;version="1.1.0";uses:="org.apache.sling.models.annotations,org.apache.sling.models.spi.injectorspecific".
-------->
org.apache.sling.models.factory;version="1.1.0";uses:="javax.annotation",
<--------
org.apache.sling.models.spi;version="1.1.1";uses:="javax.annotation,org.apache.sling.models.factory",
org.apache.sling.models.spi.injectorspecific;version="1.1.1";uses:="org.apache.sling.models.annotations.injectorspecific"
I added the following import to the Maven Bundle Plugin configuration in Sling
Models api to resolve this:
<Import-Package>
javax.annotation;version="[0,1)"
</Import-Package>
This directs this bundle to only try to import (and then in turn export) only
the version of the javax.annotation package supplied with the Felix OSGi
Framework bundles. Then I could supply the 1.2 version of that package from my
JAX-RS enabling bundle without conflict.
I will freely admit that I am new to both Sling and OSGi and could be
misinterpreting what I have observed and may be going about resolving this
entirely the wrong way. I will gladly accept any insight or advice you can
offer.
> Support JAX-RS resource classes
> -------------------------------
>
> Key: SLING-2192
> URL: https://issues.apache.org/jira/browse/SLING-2192
> Project: Sling
> Issue Type: New Feature
> Reporter: Reto Gmür
> Attachments: SLING-2192-20110310.patch, SLING-2192-20111004.patch,
> SLING-2192-20111013.patch, SLING-2192-new-jax-rs-bundle.patch,
> SLING-2192-new-jax-rs-bundle.patch,
> SLING-2192-with-sling-style-style-registration.patch,
> SLING-2192-with-tests.patch, jaxrs-in-contrib.patch, slingr-on-wink-osgi.patch
>
>
> It should be possible to register jax resource classes and providers as
> services. As they don't implement a specific interface services that expose
> java.lang.Object should be considered as javx-rs services iff they have the
> service property "javax.ws.rs" set to true.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)