felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hubert Felber" <Hubert.Fel...@abacus.ch>
Subject Re: When two bundles compete to export a package ...
Date Mon, 14 Dec 2015 17:34:01 GMT

Are you importing  org.ops4j.pax.exam.Inject ?
If yes, then try javax.inject.Inject 



>>> Benson Margulies <benson@basistech.com> 07.12.2015 21:32 >>>
I am trying to use @Inject in a pax-exam test.

pax-exam uses <dependency>

    <groupId>org.apache.geronimo.specs</groupId>
    <artifactId>geronimo-atinject_1.0_spec</artifactId>
    <version>${dependency.atinject.version}</version>
</dependency>

Karaf 4 uses the alternative from servicemix.

When I use the karaf container to test, I end up with both. And, as
luck would have it, pax-exam ends up with Inject.class from the
servicemix bundle, while my test ends up with it from the geronimo
bundle.

I don't know how the geronimo bundle gets itself provisioned; but I
assume that pax-exam is arranging this somehow.

anyway, is there any OSGi header i can use to encourage my test bundle
to wire to the servicemix bundle?

---------------------------------------------------------------------
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


Mime
View raw message