1、配置cargo
2、配置pom文件,内容如下,注意containerId里的tomcat8x,如果写成tomcat-8-5-54,下一步的deploy会失败
4.0.0
com.hywl.maven
MavenWebDemo
0.0.1-SNAPSHOT
war
<build>
<finalName>MavenWebDemo</finalName>
<plugins>
<plugin>
<!-- 启动web工程所依赖的servlet容器(tomcat容器) -->
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.9</version>
<configuration>
<container>
<!-- <containerId>tomcat-8-5-54</containerId> 这里不能有横杠-->
<containerId>tomcat8x</containerId>
<home>F:\Softwares\JAVA64bit\apache-tomcat-8.5.54</home>
</container>
<configuration>
<type>existing</type>
<home>F:\Softwares\JAVA64bit\apache-tomcat-8.5.54</home>
<Properties>
<cargo.servl