简体   繁体   English

以编程方式验证 OSGi 捆绑依赖项(导入包)

[英]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.

相关问题 为什么此OSGi导入包不起作用? - Why does this OSGi Import-Package not work? 从OSGI命令提示符运行OSGI捆绑包:导入包缺少约束 - Running OSGI bundle from OSGI command prompt :Import-package missing constraint OSGI未解决的要求:Import-Package:com.pi4j.io.gpio - OSGI Unresolved requirement: Import-Package: com.pi4j.io.gpio OSGI Gradle未解决的要求:Import-Package:com.opencsv; version =“[3.8.0,4.0.0)”Liferay IDE 3 - OSGI Gradle Unresolved requirement: Import-Package: com.opencsv; version=“[3.8.0,4.0.0)” Liferay IDE 3 如何解决要求:导入包: - How to resolve requirement: Import-Package: Eclipse Oxygen插件缺少约束:Import-Package - Eclipse Oxygen plug-in Missing Constraint: Import-Package 无法解决导入包部署Flex UI项目中的错误 - An Import-Package could not be resolved Error in Deploying Flex UI project 我是否误解了OSGI Bundle中Export-Package的用法? - Am I misunderstanding the usage of Export-Package in OSGI Bundles? 未解决的要求:在Kura Emulator中启动捆绑包时,导入包:org.slf4j - Unresolved requirement: Import-Package: org.slf4j when starting bundle in Kura Emulator 如何修复 Eclipse RCP 中的“缺少约束:Import-Package:”和“Require-Bundle” - How to fix "Missing Constraint: Import-Package:" and "Require-Bundle" in Eclipse RCP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM