On 03.06.2013 15:00, Roland wrote: > Hello community, > After I integrated the Felix-Bundle-Repository > (org.apache.felix.bundlerepository 1.6.6) some OSGi 4.3 methods could not be > resolved such as Bundle.adapt () or Bundle.getVersion (). The reason is that > Felix-Bundle-Repository requires OSGi-Core-4.1.0. > As short-term solution I deleted the OSGi Core 4.1 dependency from the build > path. However, that is reversed if i run eclipse:eclipse . Does anyone have > a better idea?
>From your description it sounds like you're using maven with the old-style eclipse plugin (sane good choice btw) and the OBR jar simply pulls in a transitive dependency, which due to classpath flattening & maybe lexicographic sorting ends up in front of the classpath. This has probably nothing to do with OSGi. :) Most likely the problem is that your project does not explicitly depend on a framework version and relies on one or more transitive dependencies; consequently you're getting exactly what you asked for..or more precisely *didn't* ask for. Therefore the solution is probably simply to add the framework version of choice as top-level dependency to your project. This should override the inclusion of the older transitive version via OBR. If it does not, dependency:tree will show you why the old framework is getting pulled in. See [1] for more. Ich hoffe das hilft weiter :) Holger [1] http://blog.sonatype.com/people/2010/05/maven-101-dependency-management/ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

