Maven自动部署war包到tomcat

热部署tomcat
tomcat6.0\conf\tomcat-users.xml中配置:
<role rolename="manager-gui"/>
<user username="admin" password="123" roles="manager-gui"/>

settings.xml中配置:
<server>
            <id>tomcat</id>
            <username>admin</username>
            <password>123</password>
</server>

pom.xml中配置

  <plugin>

         <groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.0-beta-1</version>
<configuration>
<url>http://localhost:8080/manager/html</url>
<server>tomcat</server>
</configuration>
</plugin>

先启动tomcat,在部署就可以了

你可能感兴趣的:(html,tomcat,maven,xml)