我希望 Maven 在运行 jUnit 测试之前部署 war。
我已经添加了故障安全插件和配置,但测试后部署仍然完成。
测试不是由故障安全插件运行吗?
<build>
<finalName>testWar</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.16</version>
<configuration>
<systemPropertyVariables>
<wildfly.remote.port>10090</wildfly.remote.port>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.2.1.Final</version>
<configuration>
<hostname>host</hostname>
<port>10090</port>
<username>user</username>
<password>pw</password>
</configuration>
<executions>
<execution>
<id>wildfly-run</id>
<phase>pre-integration-test</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
慕容708150
相关分类