[英]Verify OSGi bundles dependencies (import-package) programmatically
I need to validate whether the imported packages of a bundle are fulfilled by a set of other bundles' export packages.我需要验证一个包的导入包是否由一组其他包的导出包完成。 This should not be very hard to implement but I know all the OSGi containers plus eclipse (when you do "validate bundles" in PDE) do this.
这应该不难实现,但我知道所有 OSGi 容器和 eclipse(当您在 PDE 中执行“验证包”时)都会这样做。 I just don't know how to find that code.
我只是不知道如何找到该代码。 Does anyone know what classes/libraries I could use that already implement all this logic?
有谁知道我可以使用哪些类/库已经实现了所有这些逻辑?
My goal is to give a list of files (bundles) in the file system and do an analysis whether the set of bundles is self-contained and if not to show all the missing external imports/requires.我的目标是给出文件系统中的文件(包)列表,并分析包集是否是自包含的,如果不是,则显示所有缺少的外部导入/要求。 all this without actually having to run the bundles in a real container
所有这一切,实际上不必在真正的容器中运行包
You should look at the Resolver API in the OSGi spec.您应该查看 OSGi 规范中的 Resolver API。 Apache Felix has a resolver implementation that is also used by the Equinox framework .
Apache Felix 有一个解析器实现,它也被 Equinox 框架使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.