第谷Surefire跨平台错误

时间:2018-06-19 09:46:27

标签: tycho tycho-surefire-plugin

我的Tycho Surefire测试适用于Windows用户界面。但是我在Linux Jenkins服务器上运行它。结果,我收到了错误:

Caused by: java.lang.NoClassDefFoundError: org/eclipse/swt/SWTError
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWTError cannot be found by org.eclipse.ui.workbench_3.108.3.v20170216-1539

当我在Windows jenkins服务器上运行时,测试运行正常。我在pom.xml中做出的改变 -

 ...etc...
<plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>target-platform-configuration</artifactId>
    <version>${tycho.version}</version>
    <configuration>
         <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=411664 -->
         <targetDefinitionIncludeSource>honor</targetDefinitionIncludeSource>
         <resolver>p2</resolver>
         <environments>
                <environment>
                        <os>win32</os>
                        <ws>win32</ws>
                        <arch>x86_64</arch>
                </environment>
         </environments>
    </configuration>
</plugin>

<plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>tycho-surefire-plugin</artifactId>
    <version>${tycho.version}</version>
    <configuration>
        <failIfNoTests>false</failIfNoTests>
        <useUIHarness>true</useUIHarness>
    </configuration>
</plugin>
 ...etc...

我还需要添加什么才能运行测试?

0 个答案:

没有答案