#tomcat远程部署 ##需要的工具
- maven
- svn/git
##tomcat的配置 1.修改tomcat内容找到./conf/tomcat-users.xml 新增以下内容
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="tomcat" password="tomcat" roles="manager-gui,manager-script,manager-jmx,manager-status"/>
2.重新启动tomcat
./bin/startup.sh
##maven配置 1.修改setting.xml 参考maven远程发布jar
2.加载tomcat7-maven-plugin插件
<build>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://172.16.192.73:8081/manager/text</url>
<server>releases</server>
<path>/usermgmt-website</path>
<username>tomcat</username>
<password>tomcat</password>
</configuration>
</plugin>
</plugins>
<!--<finalName>usermgmt-server</finalName>-->
</build>
###maven配置说明 1.url:tomcat-manager的地址
2.path:指tomcat-manager中上下文环境内容名称
3.username/tomcat:tomcat-manager的用户名/密码
4.releases:对应maven中服务的名称