更新pom文件
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://remotehost:8080/manager/text</url>
<server>RemoteTomcatServer</server>
<path>/</path>
</configuration>
扫描二维码关注公众号,回复:
352810 查看本文章
</plugin>
更新.m2/settings.xml文件
<servers>
<server>
<id>RemoteTomcatServer</id>
<username>admin</username>
<password>password</password>
</server>
</servers>
运行mvn tomcat7:deploy 或者 mvn tomcat7:redeploy,编译并上传war文件到tomcat