<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="luogang" password="luogang" roles="manager-gui,manager-script"/>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://localhost:8080/manager/text</url>
<path>/</path>
<server>tomcat</server>
<username>luogang</username>
<password>luogang</password>
</configuration>
</plugin>
将项目部署到ROOT中:
tomcat7:redeploy