将片段添加到 tycho-surefire-plugin

Add Fragment to tycho-surefire-plugin

我想用 tycho-surefire-plugin 开始片段。简单吧?

<plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>tycho-surefire-plugin</artifactId>
    <version>${tycho-version}</version>
    <configuration>
        <providerHint>junit4</providerHint>
        <dependencies>
            <!-- I want to add my fragment here -->
        </dependencies>
    </configuration>
</plugin>

但是,由于缺少文档(或者它可能被隐藏了),我不知道要输入什么:

<!-- this works for a plug-in -->
<dependency>
    <type>p2-installable-unit</type>
    <artifactId>org.eclipse.equinox.ds</artifactId>
</dependency>
<!-- this works for a feature -->
<dependency>
    <type>eclipse-feature</type>
    <artifactId>org.eclipse.e4.rcp</artifactId>
</dependency>
<!-- but a fragment? IDK -->
<dependency>
    <groupId>myGroup</groupId> <!-- I also tried without group -->
    <type>eclipse-fragment</type> <!-- I also tried the above types -->
    <artifactId>org.acme.module.fragment</artifactId>
    <version>${project.version}</version>  <!-- I also tried without version -->
</dependency>

如何向 Tycho Surefire 插件添加片段?

当然,片段是在完全不同的 Tycho 插件中解析的:

<plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>target-platform-configuration</artifactId>
    <configuration>
        <dependency-resolution>
            <extraRequirements>
                <requirement>
                    <type>eclipse-plugin</type>
                    <id>org.acme.module.fragment</id>
                    <versionRange>0.0.0</versionRange>
                </requirement>
            </extraRequirements>
        </dependency-resolution>
    </configuration>
</plugin>