2017-03-10 2 views
2

Wenn ich den Befehl install meines Servers Lifecycle ich die folgende Fehlermeldung erhalten:Maven Frühjahr Boot Vorintegration Test Timeout-Fehler

[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 

Es kommt offensichtlich aus den Timeout-Einstellungen, aber ich kann nicht finden, wo ich um diesen Wert zu ändern ...

nicht sicher, ob es helfen kann, aber einige meiner pom.xml auf die Einheit und Integration Testings im Zusammenhang hier ist: ist

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

hier die debu g log: http://pastebin.com/kUkufHFS

+0

Können Sie Ihre maven-Anweisung erneut ausführen, indem Sie für die Debugprotokollierung -X hinzufügen, um weitere Informationen zu erhalten? Danke Sie können Ihre vollständige Debugging-Logging zu einigen Online-Paste Text einfügen, bin, ex: http://pasted.co/ –

+0

Warum versuchen Sie, Namenskonventionen zu definieren, die bereits Teil von Maven-Surefire-Plugin und Maven sind Failsafe-Plugin. Es gibt keine Notwendigkeit, "**/* IT.java" für maven-surefire-plugin auszuschließen oder sie in maven-failsafe-plugin einzuschließen ... – khmarbaise

+0

@LamLe: Ich habe das Debug-Log zur Frage – Papple

Antwort

2

Sie versuchen, eine Spring-Boot-App bereits in der Pre-Integration-Test-Phase zu starten. Das Spring-Boot-Maven-Plugin StartMojo class (org.springframework.boot.maven) beschweren sich, weil die App nicht innerhalb des Standard-Timeouts gestartet wird, das durch die Attribute "wait" (defautl-Wert: 500 ms) und "maxAttempts" (Standard: 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; 

"warten" und "maxAttempts" sind @Parameter kommentierten, was bedeutet, dass Sie ihren Wert aus Ihrer pom-Datei ändern können, in der Plugin-Konfiguration wie folgt:

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

Danke! Es funktionierte! – Papple