How to get Fragment-Bundle in Tycho test time?

I have an implementation package and a fragment depending on it (Fragment-Host in MANIFEST). In addition, there is a kit with some tests.

Now I want to check my implementation and use tycho-surefire-plugin. The test package refers to the implementation package using the Require-Bundle in MANIFEST. So far, so good. The question is how to get the package of fragments in the test runtime? I tried the dependency in the tycho-surefire-plugin module configuration in my eclipse-test-plugin. But that does not work. What is the right way?

EDIT: pom.xml of my test plugin

<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 fragment:

  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 reactor extract:

  <modules> <module>../com.example.impl</module> <module>../com.example.impl.config</module> <module>../com.example.impl.tests</module> </module> 

Thanks!

+6
osgi tycho osgi-fragment
source share
1 answer

These are stitches, I myself found the answer. In case someone has the same problem: the .qualifier version in the Fragment-Host bundle-version is not automatically extended by Tycho.

+7
source share

All Articles