2017-03-10 3 views
2

私は次のエラーを取得私のサーバーのライフサイクルのコマンドinstall実行すると:Mavenの春ブーツ事前統合テストタイムアウトエラー

[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 34.507 s 
[INFO] Finished at: 2017-03-10T15:32:41+01:00 
[INFO] Final Memory: 69M/596M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.4.0.RELEASE:start (pre-integration-test) on project challenger-server-boot: Spring application did not start before the configured timeout (30000ms -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 

それは明らかにタイムアウト設定から来ているが、私は、私はどこを持って見つけることができませんがそれは助けることができる場合

わからない...この値を変更しますが、ここでユニットと統合testingsに関連する私のpom.xmlの一部だし:ここでは

<!-- Unit testing --> 
    <plugin> 
     <artifactId>maven-surefire-plugin</artifactId> 
     <configuration> 
      <skipTests>true</skipTests> 
     </configuration> 
    </plugin> 

    <!-- Integration testing --> 
    <plugin> 
     <artifactId>maven-failsafe-plugin</artifactId> 
     <version>2.19.1</version> 
     <configuration> 
      <skipTests>false</skipTests> 
     </configuration> 
    </plugin> 

は毎日の激務ですgログ:http://pastebin.com/kUkufHFS

+0

詳細については、デバッグログ用に-Xを追加してmaven文を再実行できますか?ありがとう 完全なデバッグログをいくつかのオンライン貼り付けテキストに貼り付けることができます。貼り付けbin、例:http://pasted.co/ –

+0

なぜmaven-surefire-pluginとmaven- failsafe-plugin。 maven-surefire-pluginのために '**/* IT.java'を除外する必要はありません。また、maven-failsafe-pluginの中にそれらを含める必要はありません。 – khmarbaise

+0

@LamLe:質問 – Papple

答えて

2

事前統合テスト段階では、前もってスプリングブートアプリケーションを起動しようとしています。 アプリケーションがデフォルトのタイムアウト内に起動されていないため、属性「wait」(defautl値:500 ms)で定義されているため、spring-boot-maven-pluginのStartMojoクラス(org.springframework.boot.maven) 「maxAttempts」(デフォルト:60) - > 500 * 60

/** 
* The number of milli-seconds to wait between each attempt to check if the spring 
* application is ready. 
*/ 
@Parameter 
private long wait = 500; 

/** 
* The maximum number of attempts to check if the spring application is ready. 
* Combined with the "wait" argument, this gives a global timeout value (30 sec by 
* default) 
*/ 
@Parameter 
private int maxAttempts = 60; 

プラグイン構成では、あなたのポンポンファイル内からその値を変更することができることを意味、「maxAttemptsは」@parameter注釈を付けている「待つ」と

<plugin> 
    <groupId>org.springframework.boot</groupId> 
    <artifactId>spring-boot-maven-plugin</artifactId> 
    <configuration> 
       <wait>1000</wait> 
       <maxAttempts>180</maxAttempts> 
    </configuration> 
    <executions> 
       ... 
    </executions> 
</plugin> 
+0

ありがとう!出来た! – Papple

関連する問題