Hi Jens,
in your Import-Package, just define an "open" range, for instance
org.osgi.framework without the version of with org.osgi.framework;version=0.
Regards
JB
On 10/08/2014 06:47 PM, Rabe, Jens wrote:
Hi David,
when I remove osgi.core, it borks about BundleActivator and some other
OSGi stuff not being able to be found. When setting org.osgi to
"provided", I get the following:
Error executing command: Could not start bundle
mvn:com.mycompany/myservice/0.0.1-SNAPSHOT in feature(s)
myfeature-0.0.1-SNAPSHOT: Unresolved constraint in bundle
com.mycompany.myservice [463]: Unable to resolve 463.0: missing
requirement [463.0] osgi.wiring.package;
(&(osgi.wiring.package=org.osgi.framework)(version>=1.8.0)(!(version>=2.0.0)))
Regards,
Jens
------------------------------------------------------------------------
*From:* David Jencks [[email protected]]
*Sent:* Wednesday, October 08, 2014 6:42 PM
*To:* [email protected]
*Subject:* Re: Can anybody help me break these two dependency chains?
Don't install osgi core as a bundle, it's supplied by the framework?
david jencks
On Oct 8, 2014, at 9:22 AM, "Rabe, Jens" <[email protected]
<mailto:[email protected]>> wrote:
Hello,
I have the following problem:
Error executing command: Could not start bundle
mvn:com.mycompany/myservice/0.0.1-SNAPSHOT in feature(s)
myfeature-0.0.1-SNAPSHOT: Uses constraint violation. Unable to resolve
bundle revision com.mycompany.myservice [207.0] because it is exposed
to package 'org.osgi.framework' from bundle revisions osgi.core
[254.0] and org.apache.felix.framework [0] via two dependency chains.
Chain 1:
com.mycompany.myservice [207.0]
import:
(&(osgi.wiring.package=org.osgi.framework)(version>=1.8.0)(!(version>=2.0.0)))
|
export: osgi.wiring.package=org.osgi.framework
osgi.core [254.0]
Chain 2:
com.mycompany.myservice [207.0]
import: (osgi.wiring.package=org.springframework.context.annotation)
|
export:
osgi.wiring.package=org.springframework.context.annotation;
uses:=org.springframework.beans
wrap_mvn_org.springframework_spring-context_4.0.7.RELEASE [211.0]
import: (osgi.wiring.package=org.springframework.beans)
|
export: osgi.wiring.package=org.springframework.beans;
uses:=org.springframework.core
wrap_mvn_org.springframework_spring-beans_4.0.7.RELEASE [204.0]
import: (osgi.wiring.package=org.springframework.core)
|
export: osgi.wiring.package=org.springframework.core;
uses:=org.apache.commons.logging
wrap_mvn_org.springframework_spring-core_4.0.7.RELEASE_Bundle-Version_4.0.7.RELEASE_Export-Package_org.springframework.__version__4.0.7.RELEASE___
[195.0]
import: (osgi.wiring.package=org.apache.commons.logging)
|
export: osgi.wiring.package=org.apache.commons.logging;
uses:=org.osgi.framework
org.ops4j.pax.logging.pax-logging-api [3.0]
import:
(&(osgi.wiring.package=org.osgi.framework)(version>=1.0.0)(!(version>=2.0.0)))
|
export: osgi.wiring.package=org.osgi.framework
org.apache.felix.framework [0]
I cannot remove the direct dependency on osgi.core in my myservice bundle.
Can anyone guide me how to specify the chain I want to use? Are there
any options I could try on my feature.xml?
Any help would be greatly appreciated.
Regards,
Jens
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com