Pap*_*ple 5 spring maven spring-boot
当我运行install服务器生命周期的命令时,出现以下错误:
[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
Run Code Online (Sandbox Code Playgroud)
它显然来自超时设置,但我找不到必须更改此值的位置...
不知道它是否可以帮上忙,但这是我与单元测试和集成测试有关的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>
Run Code Online (Sandbox Code Playgroud)
这是调试日志:http : //pastebin.com/kUkufHFS
您正在尝试在集成前测试阶段中启动Spring Boot应用程序。spring-boot-maven-plugin StartMojo类(org.springframework.boot.maven)抱怨,因为该应用程序未在默认超时内启动,这由属性“ wait”(默认值:500 ms)和“ 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;
Run Code Online (Sandbox Code Playgroud)
“ wait”和“ maxAttempts”带有@Parameter注释,这意味着您可以在插件配置中的pom文件中更改其值,如下所示:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<wait>1000</wait>
<maxAttempts>180</maxAttempts>
</configuration>
<executions>
...
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3605 次 |
| 最近记录: |