代码之家  ›  专栏  ›  技术社区  ›  Stefan S.

向tycho surefire插件添加片段

  •  1
  • Stefan S.  · 技术社区  · 7 年前

    我想从 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插件添加片段?

    1 回复  |  直到 7 年前
        1
  •  2
  •   Stefan S.    5 年前

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