首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将片段添加到tycho-surefire-plugin

将片段添加到tycho-surefire-plugin
EN

Stack Overflow用户
提问于 2017-07-19 20:06:25
回答 1查看 363关注 0票数 1

我想从tycho-surefire-plugin开始一个片段。很简单,对吧?

代码语言:javascript
复制
<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>

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

代码语言:javascript
复制
<!-- 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插件添加片段?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-07-19 20:28:36

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

代码语言:javascript
复制
<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>
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45190063

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档