Re: A proper way to retrieve RepositoryAdmin service?

2014-10-26 Thread Artem Zhirkov
Can it be that I'm getting ClassCastException because of I'm using bundlerepository as a maven dependency and loading a bundle from a separate jar file? (but of the same version) On 26.10.2014 19:51, Artem Zhirkov wrote: Seems like I figured out a way to receive a service from host application

Re: A proper way to retrieve RepositoryAdmin service?

2014-10-26 Thread Artem Zhirkov
Here is my osgi study project https://github.com/ArtemZ/osgi-study The entry point is com.artemz.demo.Main, the easiest way to launch it is to build a jar by doing mvn package. There are some confusing / boilerplate code, I was just trying different ways to get a working reference to Reposito

Re: A proper way to retrieve RepositoryAdmin service?

2014-10-26 Thread Neil Bartlett
Artem, It sounds like you have done something very strange. Are you able to share the code and structure of your example project, eg on GitHub? Regards, Neil -- Neil Bartlett Sent from a phone On Sunday, 26 October 2014 at 16:51, Artem Zhirkov wrote: > Seems like I figured out a way to re

Re: managing OSGi Dependencies

2014-10-26 Thread Neil Bartlett
Sorry I don't know anything about this error. The example I gave you didn't really have anything to do with gradle; that is just the default for bndtools projects. If you really want to use the maven plugin then I recommend taking the instructions from the bnd.bnd and using them in your pom.

Re: A proper way to retrieve RepositoryAdmin service?

2014-10-26 Thread Artem Zhirkov
Seems like I figured out a way to receive a service from host application (I'm now getting ServiceReference from the BundleContext of just installed Bundle, there is no ServiceReference to RepositoryAdmin in Framework's BundleContext after bundle installation), but now I'm stuck with: java.la

Re: managing OSGi Dependencies

2014-10-26 Thread Pedro Domingues
Hello again Neil! I was trying to learn from your example in gradle, which I've never used before, to try to map your configurations in maven (maven-bundle-plugin). However when I import the project to eclipse as a gradle project and hit the Build Model button, eclipse crashes without any mercy

Re: A proper way to retrieve RepositoryAdmin service?

2014-10-26 Thread Artem Zhirkov
Ok, so now I'm installing bundlerepository bundle from a jar file and then creating ServiceTracker using this code: adminTracker = new ServiceTracker(adminConsumer.getContext(), RepositoryAdmin.class.getName(), null); adminTracker.open(); in order to retrieve RepositoryAdmin service, but adm