On 22 March 2011 07:37, Anthony MULLER <[email protected]> wrote:

> Hello,
>
> I'm trying guice 3 in an osgi deployment (with Felix) but the problem is
> "javax.inject.jar" is not a osgi bundle. So guice doesn't find its
> dependencies... Is it "normal"?
>

Yes, because the Guice distribution currently ships with the original
aopalliance and javax.inject JARs that don't contain OSGi metadata.

Guice itself has OSGi metadata, but it is up to the deployer to decide where
the aopalliance and javax.inject packages should come from.

i.e. you could:

   1)  put the original JARs on the system classpath and expose them with
"org.osgi.framework.system.packages.extra"

   2)  or use the bundles from Eclipse Orbit
http://welcome.to.eclipsecon.org/tools/orbit/downloads/drops/R20100519200754/

   3)  or use the bundles from the Spring bundle repository
http://ebr.springsource.com/repository/app/

   4)  or use the "org.sonatype.sisu:sisu-inject" bundle which wraps both
JARs and exports them

   5)  or wrap those JARs into bundles yourself

It's questionable whether Guice should provide bundlized forms of all its
dependencies - for example if we did then the Maven pom would point to the
repackaged artifacts and not the original ones. Given all the different ways
you could choose to deploy these JARs (and the existence of already bundled
forms) even if we did it might not be to everyone's taste.


> Regards,
> Anthony


-- 
Cheers, Stuart

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to