从 IDEA 启动 OSGi

发布于 2024-10-08 21:31:16 字数 288 浏览 0 评论 0原文

我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

毁虫ゝ 2024-10-15 21:31:16

不是确切的答案,但一种可能是:

(这一切都归功于 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)

思慕 2024-10-15 21:31:16

所有 OSGi 框架都可以作为标准 Java 进程启动。例如启动 Felix:

java -jar path/to/felix.jar

启动 Equinox:

java -jar path/to/org.eclipse.osgi_version.jar

等等。

不幸的是,框架实现之间的初始配置有很大不同。对于 Felix,您需要一个 config.properties 文件,该文件通常位于 Felix 安装目录的 conf 目录中(或者您可以设置 felix.config.properties 系统属性将其指向其他地方)。

All the OSGi frameworks can be launched as standard Java processes. For example to launch Felix:

java -jar path/to/felix.jar

To launch Equinox:

java -jar path/to/org.eclipse.osgi_version.jar

And so on.

Unfortunately the initial configuration differs substantially between framework implementations. For Felix you need a config.properties file, which is typically in the conf directory of the Felix installation directory (or you can set the felix.config.properties system property to point it elsewhere).

冬天旳寂寞 2024-10-15 21:31:16

我正在使用 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...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文