【发布时间】:2012-10-16 02:37:02
【问题描述】:
我是 OSGi 新手,只编写了几个包并手动部署它们。 我的一些朋友向我介绍了 Virgo 和 Virgo 工具,它们允许您自动部署使用 eclipse 管理的包。
我目前正在尝试设置所有这些。我有 virgo-tomcat-server-3.5.0.RELEASE,以及 virgo 工具 1.0.0,所有这些都安装在 Spring Tool Suite 3.1.0.RELEASE 上(如果你不知道,最后一个包括m2eclipse 插件)。
我的包是一个 Maven 项目。它使用 bnd 插件,这是它的配置
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>fr.tpepio.mtg.model</Export-Package>
</instructions>
</configuration>
<executions>
<execution>
<id>build-manifest</id>
<phase>compile</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
你可以看到我只导出了一个包。我还尝试让 m2eclipse 在 eclipse 编译我的类时动态生成我的 manifest.mf 文件。
我终于解决了我面临的问题。
-
由于我将我的包作为 maven 项目导入 STS,因此我必须将 Virgo 方面添加到其中。一旦我更新了我的 maven 配置,它就会搞砸我的项目,我会收到以下错误:
Java compiler level does not match the version of the installed Java project facet. -
Appart from my (shitty) maven configuration,我发现自己无法将我的项目添加到 virgo 服务器中,这无休止地告诉我
null reason : null
有人知道吗?
【问题讨论】:
-
刚刚用我的命令行启动了“mvn clean install”,发现“Manifest-Version”是1.0。这很糟糕,因为 Virgo 带有 R4 OSGi 的实现,它只接受 V2.0 版本的清单文件。继续搜索。
标签: osgi m2eclipse facet eclipse-virgo bnd