在IntelliJ IDEA 11中运行Apache Felix 4.0.2 [英] Run Apache Felix 4.0.2 in IntelliJ IDEA 11

查看:811
本文介绍了在IntelliJ IDEA 11中运行Apache Felix 4.0.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据此发布,IDEA使用 Osmorc 来运行OSGi框架。反过来,它使用 Pax Runner 来启动不同的框架实现。

According to this post, IDEA uses Osmorc to run OSGi frameworks. It, in turn, uses Pax Runner to launch different framework implementations.

IDEA 11中的工具链只能运行Apache Felix 3.0.2,但我必须运行4.0.2版本。可能吗?是否存在IDEA的其他OSGi框架启动程序?

The toolchain in IDEA 11 can only run Apache Felix up to 3.0.2, but I have to run version 4.0.2. Is it possible? Do other OSGi framework launchers exist for IDEA?

推荐答案

您可以从插件+项目设置配置Osmorc使用的OSGI框架。
我使用IntelliJ IDEA 11.1.2和Osmorc 1.4.2。

You can configure the OSGI frameworks that Osmorc uses from the plugin+ project settings. I use IntelliJ IDEA 11.1.2 and Osmorc 1.4.2.

这是我配置OSGI容器的屏幕截图(在IDE设置 - > OSGi )到Apache Felix 4.0.1的一些本地
安装。

Here is a screenshot where I configure the OSGI container (at IDE Settings-->OSGi) to some local installation of Apache Felix 4.0.1.

您还可以定义自定义框架/容器,然后选择要在项目设置 - > OSGI中使用的所需
OSGI框架,如下所示:

You can also define your custom framework/container and then select the desired OSGI framework to use at Project Settings-->OSGI as seen below:

要创建运行配置,首先需要创建一些OSGi方面。
希望你也使用maven和maven-bundle-plugin,这将大大减少
你需要做的配置量(因为OSmorc自动与你的pom.xml同步),但即使你不要,你可以手动编辑创建包的信息。

In order to create Run configurations, you first need to create some OSGi facets. Hopefully, you are also using maven and the maven-bundle-plugin which will greatly reduce the amount of configuration you need to do(since OSmorc automatically syncs with your pom.xml), but even if you do not, you can manually edit the information for creating the bundles.

所以,接下来你需要做的是创建一些OSGi方面。转到ProjectStructure - > Facets
并为您要创建的每个包添加一个新的OSGi构面。你打开了自动检测,然后可能已经存在方面。如果没有,则手动添加它们,然后根据需要配置它们,如下例所示。

So, what you need to do next is create some OSGi facets. Go to Project "Structure-->Facets" and add a new OSGi facet for each bundle you wish to create. It you have automatic detection turned on, then the facets maybe already there. If not, then add them manually and then configure them as you see appropriate, like in the following example.

最后编辑运行配置并添加新的OSGi运行配置。
选择您想要使用的框架以及您希望启动的捆绑包以及
其他参数,如下例所示:

Finally edit your "Run Configurations" and add a new OSGi run configuration. Select the framework you wish to use and the bundles you wish to start as well as other parameters, like in the following example:

< img src =https://i.stack.imgur.com/k0jdq.pngalt =Intellij IDEA OSGi运行配置>

这篇关于在IntelliJ IDEA 11中运行Apache Felix 4.0.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆