You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Em...@finantix.com on 2012/10/24 13:06:40 UTC

Problems in overwriting swinggui for junit4osgi

Hello,

I am Emanuele Gesuato from Italy. 

I am trying to override the swing gui of junit4osgi used in package "
org.apache.felix.ipojo.junit4osgi.command" for our own purposes.

In the swingRunner class there is this field:
private OSGiJunitRunner m_runner;

that is never instantiated. I don't understand how to instance it in the 
right way.
The "impl" package of junit4osgi which have an implementation of 
OSGIJunitRunner (org.apache.felix.ipojo.junit4osgi.impl.JunitExtender) is 
not visible so I can't use it directly.

What I have to do to get a correct instance  ?

I think there is some "magic" somewhere that autowire this field but I 
don't understand where is this place :)
Could you help me ?


Thanks,
Emanuele Gesuato

Re: Problems in overwriting swinggui for junit4osgi

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,

It's a service dependency managed by iPOJO. So yes, there is some 'magic' going on to wire the OSGiJunitRunner service to the field.
The description should be either in a metadata.xml file or within the pom file directly.

Regards,

Clement

On 24 oct. 2012, at 13:06, Emanuele.Gesuato@finantix.com wrote:

> Hello,
> 
> I am Emanuele Gesuato from Italy. 
> 
> I am trying to override the swing gui of junit4osgi used in package "
> org.apache.felix.ipojo.junit4osgi.command" for our own purposes.
> 
> In the swingRunner class there is this field:
> private OSGiJunitRunner m_runner;
> 
> that is never instantiated. I don't understand how to instance it in the 
> right way.
> The "impl" package of junit4osgi which have an implementation of 
> OSGIJunitRunner (org.apache.felix.ipojo.junit4osgi.impl.JunitExtender) is 
> not visible so I can't use it directly.
> 
> What I have to do to get a correct instance  ?
> 
> I think there is some "magic" somewhere that autowire this field but I 
> don't understand where is this place :)
> Could you help me ?
> 
> 
> Thanks,
> Emanuele Gesuato