部署web项目到远程服务器,这里服务器使用的是tomcat7,注意tomcat7与6还是有差别的。
pom.xml配置如下:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<url>http://192.168.1.109:8080/manager/html</url>
<username>fuscent</username>
<password>password</password>
</configuration>
</plugin>
其中url是远程服务器ip,tomcat7的部署地址变为了:
http://localhost:8080/manager/html
执行命令:
mvn tomcat7:deploy /redeploy