Add Fragment to tycho-surefire-plugin

会有一股神秘感。 提交于 2021-02-10 16:39:37

问题


I want to start a fragment with the tycho-surefire-plugin. Simple, right?

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

However, due to the missing documentation (or maybe it's hidden) I can't figure out what to enter:

<!-- 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>

How do I add a fragment to the Tycho Surefire plug-in?


回答1:


Of course, fragments are resolved in an entirely different Tycho plug-in:

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


来源:https://stackoverflow.com/questions/45190063/add-fragment-to-tycho-surefire-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!