Ann*_*nna 6 osgi tycho osgi-fragment
我有一个依赖于它的实现包和片段包(MANIFEST中的Fragment-Host).此外,还有一些测试包.
现在我想测试我的实现并使用tycho-surefire-plugin.带有测试的bundle通过MANIFEST中的Require-Bundle引用实现包.到现在为止还挺好.问题是如何将片段包放入测试运行时?我在我的eclipse-test-plugin中尝试了tycho-surefire-plugin配置中的依赖.但它不起作用.什么是正确的方法?
编辑:我的测试插件的pom.xml
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<testSuite>com.example.impl.tests</testSuite>
<testClass>com.example.impl.tests.MyTest</testClass>
<dependencies>
<dependency>
<type>eclipse-plugin</type>
<artifactId>com.example.impl.config</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
片段包的清单:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.example.config
Bundle-SymbolicName: com.example.config
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: example
Fragment-Host: com.example.impl;bundle-version="1.0.0.qualifier"
Bundle-ClassPath: resources/
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Run Code Online (Sandbox Code Playgroud)
从反应器pom.xml中提取:
<modules>
<module>../com.example.impl</module>
<module>../com.example.impl.config</module>
<module>../com.example.impl.tests</module>
</module>
Run Code Online (Sandbox Code Playgroud)
谢谢!