如何在 servicemix 中部署 Apache Camel Spring 引导项目?

How to deploy a Apache Camel Spring boot project in servicemix?

我有一个 Spring Boot Apache Camel 项目。现在我想在 servicemix 中部署相同的东西。有人可以帮助我部署作为 mvn 目标的一部分生成的包的步骤吗?

我从 Camel 的例子中得到了答案。以下是对我有帮助的示例:

https://github.com/apache/camel/tree/master/examples/camel-example-osgi

但是,这种方法的问题是我需要将我的代码发布到 Maven 存储库,然后从那里进行安装。而且我运行服务组合所在的机器没有maven(我们不应该安装maven)

您可以使用 file:// 协议从文件系统部署功能或捆绑包,如本文档所示:Servicemix provisioning

“不使用 Maven 从文件系统部署包:

由于我们可以使用 file:// 作为协议处理程序来部署捆绑包,因此您可以使用以下语法来部署捆绑包 位于使用 Maven 不可用的目录中

<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
   <feature name="spring-web" version="2.5.6.SEC01">
      <bundle>file:base/bundles/spring-web-2.5.6.SEC01.jar</bundle>
   </feature>
</features>