1.软件版本
apache-tomcat-7.0.55
apache-maven-3.2.2
eclipse-standard-luna-R-win32-x86_64
2.修改文件
2.1 tomcat tomcat-users.xml
增加如下用户 角色 manager-script
manager-script — Access to the tools-friendly plain text interface that is described in this document, and to the "Server Status" page.
参考文档
2.2 maven setting.xml
servers 里添加
tomcat7 admin admin
2.3 项目 pom.xml
org.apache.tomcat.maven tomcat7-maven-plugin 2.0-beta-1 http://localhost:8080/manager/text tomcat7 admin admin
注:此处的server 里面的tomcat7 要与上2.2maven 配置文件setting.xml 里server id 一致
maven 命令:tomcat7:deploy
如下图