繁体   English   中英

如果我必须手动安装包中的features.xml,那有什么意义呢?

[英]What is the point of a features.xml if I have to install the bundles in it manually?

我有一个features.xml,列出了一些包。 但它们都需要显然安装。 所以features.xml所做的就是在一个地方收集依赖项....

除非我非常错误。 在这种情况下,如何解决我在features.xml中有很多依赖项的情况,它们都不是任何顺序。 现在我正在练习安装每个捆绑包并逐个启动它们......

告诉我我做错了什么 - 可能有几件事

编辑:功能由maven插件生成。 当我安装功能时,我得到了未解决的错误

Error executing command: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=myBundleApp; type=karaf.feature; version="[1.0.0.RC1,1.0.0.RC1]"; filter:="(&(osgi.identity=myBundleApp)(type=karaf.feature)(version>=1.0.0.RC1)(version<=1.0.0.RC1))" [caused by: Unable to resolve myBundleApp/1.0.0.RC1: missing requirement [myBundleApp/1.0.0.RC1] osgi.identity; osgi.identity=org.eclipse.jetty.websocket.server; type=osgi.bundle; version="[9.3.6.v20151106,9.3.6.v20151106]"; resolution:=mandatory [caused by: Unable to resolve org.eclipse.jetty.websocket.server/9.3.6.v20151106: missing requirement [org.eclipse.jetty.websocket.server/9.3.6.v20151106] osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"]]

但是feature.xml已经有<bundle>mvn:org.eclipse.jetty.websocket/websocket-server/9.3.6.v20151106</bundle>

features.xml的要点是定义可用于在Apache Karaf中配置OSGi应用程序的功能存储库。 换句话说,它的目的就是不必手动安装捆绑包 正如文件所述:

安装功能时,Apache Karaf会安装该功能中描述的所有资源。 这意味着它将自动解析并安装该功能中描述的所有捆绑包,配置和依赖项功能。

也就是说,请记住:

  • 这是Karaf特有的功能。 它不适用于其他OSGi容器
  • 在安装功能之前,您需要让Karaf知道包含它的存储库。 您可以使用feature:repo-list命令来检查Karaf知道哪些repos,并feature:repo-add命令来添加存储库。 有关更多详细信息,请参阅此文档
  • 指向捆绑包,功能,配置,...内部features.xml网址必须指向卡拉夫理解并可以访问的重新设置
  • 功能(很像捆绑)需要在激活之前解决。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM