実装バンドルとそれに依存するフラグメントバンドルがあります(MANIFESTのFragment-Host)。さらに、いくつかのテストがバンドルされています。
次に、実装をテストして、tycho-surefire-pluginを使用します。テスト付きバンドルは、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>
フラグメントバンドルのマニフェスト:
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
リアクターpom.xmlから抽出:
<modules>
<module>../com.example.impl</module>
<module>../com.example.impl.config</module>
<module>../com.example.impl.tests</module>
</module>
ありがとうございました!