如何将 Elasticsearch Java API 客户端转换为 OSGI 包?
我想将 Elasticsearch Java API 客户端转换为 OSGI 捆绑包,因为它在任何地方都不容易获得。我尝试了以下命令来自己创建一个,但它不起作用。我也尝试过 Maven 捆绑插件,但它导致了同样的错误。我做错了什么?
jar cvfm osgi-elasticsearch-java-8.0.1.jar ./MANIFEST.txt elasticsearch-java-8.0.1.jar
MANIFEST 使用如下:
Manifest-Version: 1.0
Bundle-Category: OSGI ELK
Bundle-Description: Elastic Search Client Bundle
Bundle-ManifestVersion: 2
Bundle-Name: OSGI ELK - HG
Bundle-SymbolicName: osgi-elk.hg
Bundle-Version: 1.7.0
Bundle-ClassPath: .,elasticsearch-java-8.0.1.jar
Export-Package: co.elastic.clients.elasticsearch, co.elastic.clients.elasticsearch.indices, co.elastic.clients.json, co.elastic.clients.json.jackson, co.elastic.clients.transport, co.elastic.clients.transport.rest_client
将手动创建的 Elasticsearch Java API 客户端 OSGI 捆绑包安装到 OSGI 容器后,以下类不可用。
co.elastic.clients.elasticsearch -- Cannot be resolved
co.elastic.clients.elasticsearch.indices -- Cannot be resolved
co.elastic.clients.json -- Cannot be resolved
co.elastic.clients.json.jackson -- Cannot be resolved
co.elastic.clients.transport -- Cannot be resolved
co.elastic.clients.transport.rest_client -- Cannot be resolved
I want to convert Elasticsearch Java API Client into an OSGI bundle as it is not readily available anywhere. I tried the following command to create one on my own but it not work. I also tried maven bundle plugins but it resulted in the same error. What am I doing wrong?
jar cvfm osgi-elasticsearch-java-8.0.1.jar ./MANIFEST.txt elasticsearch-java-8.0.1.jar
The MANIFEST use is as follows:
Manifest-Version: 1.0
Bundle-Category: OSGI ELK
Bundle-Description: Elastic Search Client Bundle
Bundle-ManifestVersion: 2
Bundle-Name: OSGI ELK - HG
Bundle-SymbolicName: osgi-elk.hg
Bundle-Version: 1.7.0
Bundle-ClassPath: .,elasticsearch-java-8.0.1.jar
Export-Package: co.elastic.clients.elasticsearch, co.elastic.clients.elasticsearch.indices, co.elastic.clients.json, co.elastic.clients.json.jackson, co.elastic.clients.transport, co.elastic.clients.transport.rest_client
The following classes are not available after installing the manually created Elasticsearch Java API Client OSGI bundle to a OSGI container.
co.elastic.clients.elasticsearch -- Cannot be resolved
co.elastic.clients.elasticsearch.indices -- Cannot be resolved
co.elastic.clients.json -- Cannot be resolved
co.elastic.clients.json.jackson -- Cannot be resolved
co.elastic.clients.transport -- Cannot be resolved
co.elastic.clients.transport.rest_client -- Cannot be resolved
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论