【发布时间】:2020-04-27 08:10:50
【问题描述】:
我们正在从 maven 切换到 gradle。在 maven 中,我们使用 spring-boot-mvane-plugin 在“预集成测试”阶段启动 Spring Boot 服务器,如本文所述https://docs.spring.io/spring-boot/docs/current/maven-plugin/usage.html
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
</configuration>
<executions>
<execution>
<id>pre-integration-test</id>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>post-integration-test</id>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<id>run e2e tests</id>
<phase>integration-test</phase>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run verify</arguments>
</configuration>
</execution>
</executions>
</plugin>
我没有找到在 gradle 中分叉进程的方法。 gradle Spring Boot Plugin 也无济于事。
如何在 gradle 中实现这一点?
【问题讨论】:
标签: spring-boot maven gradle integration-testing