【发布时间】:2010-11-27 18:17:52
【问题描述】:
我正在尝试设置 Eclipse 环境来开发捆绑包(使用 maven-bundle-plugin-bnd) 并运行和调试从 Eclipse 捆绑 Equinox
我使用 org.apache.felix maven-bundle-plugin 创建了示例包,并且可以从 eclipse equinox 安装和启动该包,
但每次我需要运行“安装文件:C:\path\bundle1.jar”、“安装文件:C:\path\bundle2.jar”时都会导致疼痛。我搜索了运行配置,但它只在工作区而不是 Maven 项目中安装和启动(插件)项目。
我所做的是创建 maven 项目并添加依赖项(bundle1、bundle2 等)并添加 maven-dependency-plugin 以将所有依赖的包复制到一个文件夹中(另一个问题是Equinox 使用“_”分隔符来确定版本捆绑包,但 maven 使用“-”作为分隔符)如果我不在独立的 Equinox 应用程序中剥离版本,我需要在 config.ini 文件中提供捆绑包的版本,但我不希望这样,这是解决这个问题的正确方法吗?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${bundleDirectory}</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<stripVersion>true</stripVersion>
</configuration>
</execution>
</executions>
</plugin>
总而言之,我在文件夹中有捆绑包,它是使用 org.apache.felix maven-bundle-plugin 创建的,我如何从 eclipse 中运行和调试它们?
【问题讨论】:
标签: eclipse maven-2 bundle equinox