我在Karaf中安装了我的包,我是OSGi和Karaf的新手,所以我可以使用一些帮助来解释这个错误。
Error executing command: Could not start bundle mvn:com.myexample/foobar/0.1.0.SNAPSHOT
in feature(s) com.myexample.foobar-0.6.0.SNAPSHOT: Unresolved constraint in bundle
com.myexample.foobar [102]: Unable to resolve 102.0: missing requirement [102.0]
osgi.wiring.package; (&(osgi.wiring.package=org.apache.commons.fileupload)
(version>=1.3.0)(!(version>=2.0.0)))这在我的feature.xml里
<bundle>mvn:commons-fileupload/commons-fileupload/1.3</bundle>在我的POM里
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3</version>
</dependency>Maven存储库显示的是1.3的最新版本,但如果有OSGi版本的话,它可能不是Maven版本,有人知道我在哪里可以找到它吗?我也尝试过wrap:mvn,但这也不起作用。
发布于 2013-08-22 06:33:19
1.3有一个OSGi清单,并且应该作为一个包工作:
$ bnd print -i http://repo1.maven.org/maven2/commons-fileupload/commons-fileupload/1.3/commons-fileupload-1.3.jar
[IMPEXP]
Import-Package
javax.servlet
javax.servlet.http
org.apache.commons.io
org.apache.commons.io.output
Export-Package
org.apache.commons.fileupload {version=1.3}
org.apache.commons.fileupload.disk {version=1.3}
org.apache.commons.fileupload.portlet {version=1.3}
org.apache.commons.fileupload.servlet {version=1.3}
org.apache.commons.fileupload.util {version=1.3}https://stackoverflow.com/questions/18370884
复制相似问题