【发布时间】:2016-08-05 03:09:21
【问题描述】:
我在 pom 中有一个带有以下插件的 maven 项目
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>/casemanager</path>
<update>true</update>
</configuration>
</plugin>
当我执行mvn tomcat7:run 时,我的战争部署得很好。但是我在我的 maven 项目的一个模块中有以下配置
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<executions>
<execution>
<id>tomcat-run</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<fork>
true
</fork>
</configuration>
</execution>
<execution>
<id>tomcat-shutdown</id>
<goals>
<goal>shutdown</goal>
</goals>
<phase>post-integration-test</phase>
</execution>
</executions>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
我希望 tomcat 在pre-integration-test 阶段运行。现在,当我执行mvn verify 时,它会启动服务器但不会部署我的战争。我什至尝试过提供warSourceDirectory。我在这里遗漏了什么吗?
【问题讨论】: