从 IDEA 启动 OSGi
我使用 IntelliJ IDEA 开发 scala 应用程序。我希望我的应用程序模块是 OSGi 包。 在 Eclipse 中,可以创建一个既是 scala 项目又是插件项目的项目。 Eclipse 还支持启动 Equinox 平台,并提供了强大的配置工具来启动哪些捆绑包以及如何启动。但由于 scala 插件又差又慢,我无法使用 Eclipse,所以我需要使用 IntelliJ IDEA。 在 IDEA 中,我尝试使用 Osmorc 来运行 OSGi,但这个解决方案非常不成熟,并且效果不佳。从 IDEA 启动和配置 OSGi 应用程序的其他方法是什么?
I develop scala application using IntelliJ IDEA. I'd like my application modules to be OSGi bundles.
In Eclipse it is possible to create a project which is both scala project and plug-in project. Eclipse also supports launching of Equinox platform and provides great configuration tool of which bundles to start and how. But I can't use Eclipse because of poor and slow scala plugin, so I need to use IntelliJ IDEA.
In IDEA I tried Osmorc for running OSGi but this solution is very immature and doesn't work well. What are the other ways of launching and configuring an OSGi application from IDEA?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不是确切的答案,但一种可能是:
(这一切都归功于 WeigleWilczek 的工作,包括 Heiko Seeberger 在这里做出贡献)
Not an exact answer, but one possibility would be to:
(All thanks to the work of WeigleWilczek, including Heiko Seeberger who contributes here)
所有 OSGi 框架都可以作为标准 Java 进程启动。例如启动 Felix:
启动 Equinox:
等等。
不幸的是,框架实现之间的初始配置有很大不同。对于 Felix,您需要一个
config.properties
文件,该文件通常位于 Felix 安装目录的conf
目录中(或者您可以设置felix.config.properties
系统属性将其指向其他地方)。All the OSGi frameworks can be launched as standard Java processes. For example to launch Felix:
To launch Equinox:
And so on.
Unfortunately the initial configuration differs substantially between framework implementations. For Felix you need a
config.properties
file, which is typically in theconf
directory of the Felix installation directory (or you can set thefelix.config.properties
system property to point it elsewhere).我正在使用 Intellij IDEA 内部的 PAX 运行程序将 OSGI 包配置(部署)到 Apache Felix 并运行框架,但这非常烦人:我必须先运行“mvn install”,然后停止正在运行的 pax 配置会话,然后重新启动它 - 对于我在捆绑包中所做的每一个更改。一定有更好的办法...
I'm using PAX runner from inside Intellij IDEA to provision (deploy) OSGI bundles to Apache Felix and run the framework, but this is very annoying: I have to run "mvn install" first, then stop the running pax provisioning session, then restart it - for every change I make in the bundle. There got to be be a better way...