2016-05-04 11 views
1

私のプロジェクトはビルドにmavenを使用しますが、インストール時には常にテストをスキップします。私が-Xを使用すると、それは私に伝えます:Tycho skidsテスト

[DEBUG] (f) skipTests = true 

これはどこから来たのですか?これは私のポームです:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <artifactId>project</artifactId> 
    <packaging>eclipse-test-plugin</packaging> 

    <parent> 
    <groupId>project</groupId> 
    <artifactId>parent</artifactId> 
    <version>1.0.0</version> 
    </parent> 
     <dependencies> 
     <dependency> 
      <groupId>junit</groupId> 
      <artifactId>junit</artifactId> 
      <version>3.8.1</version> 
     </dependency> 
     </dependencies> 
    <build> 
     <plugins> 
     <plugin> 
     <groupId>org.eclipse.tycho</groupId> 
     <artifactId>tycho-maven-plugin</artifactId> 
     <version>${tycho-version}</version> 
     <extensions>true</extensions> 
     </plugin> 
     <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-surefire-plugin</artifactId> 
     <version>2.19.1</version> 
     <configuration> 
      <skipTests>false</skipTests> 
     </configuration> 
     </plugin> 
    </plugins> 
    </build> 
</project> 

ログやその他のファイルがあれば、その原因を見つけるのに役立つことがあります。私に教えてください。

答えて

1

1- maven-surefire-pluginの代わりにtycho-surefire-pluginを使用します。

2 - テストのターゲットプラットフォーム構成を定義する必要があります。

<plugin> 
    <groupId>org.eclipse.tycho</groupId> 
    <artifactId>tycho-surefire-plugin</artifactId> 
    <version>${tycho.version}</version> 
    <executions> 
     <execution> 
     <id>default-test</id> 
     <phase>integration-test</phase> 
     <goals> 
      <goal>test</goal> 
     </goals> 
     </execution> 
    </executions> 
    <configuration> <!--example configuration run test in windows without GUI--> 

     <argLine>-Xmx1024m</argLine> 
     <argLine>-Dosgi.arch=x86</argLine> 
     <useUIHarness>false</useUIHarness> 
     <useUIThread>false</useUIThread> 
    </configuration> 
    </plugin> 

ターゲット・プラットフォームの構成:このことができます

<plugin> 
      <groupId>org.eclipse.tycho</groupId> 
      <artifactId>target-platform-configuration</artifactId> 
      <version>${tycho.version}</version> 
      <configuration> 
       <environments> 
        <environment> 
         <os>win32</os> 
         <ws>win32</ws> 
         <arch>x86</arch> 
        </environment> 
        <environment> 
         <os>linux</os> 
         <ws>gtk</ws> 
         <arch>x86</arch> 
        </environment> 
        <environment> 
         <os>linux</os> 
         <ws>gtk</ws> 
         <arch>x86_64</arch> 
        </environment> 
       </environments> 
       <dependency-resolution> 
        <optionalDependencies>ignore</optionalDependencies> 
        <extraRequirements> 
         <requirement> 
          <type>eclipse-plugin</type> 
          <id>org.eclipse.ui</id> 
          <versionRange>0.0.0</versionRange> 
         </requirement> 
         <requirement> 
          <type>eclipse-plugin</type> 
          <id>org.eclipse.ui.views</id> 
          <versionRange>0.0.0</versionRange> 
         </requirement> 
         <requirement> 
          ..... 
         </requirement> 
        </extraRequirements> 
       </dependency-resolution> 
      </configuration> 
     </plugin> 

希望

、3-すべてティコ・確実な-プラグインのパラメータはhere

例を見つけることができます。

+0

ありがとう、これは助けてくれました:-) –

関連する問題