使用tomcat-maven插件,在pom.xml的</dependencies>之后添加以下代码,并做相应修改
1 <build> 2 <finalName>guoguo-maven-web</finalName> 3 <plugins> 4 <plugin> 5 <!-- 3个可用插件 --> 6 <groupId>org.apache.tomcat.maven</groupId> 7 <artifactId>tomcat6-maven-plugin</artifactId> <!-- 命令为tomcat6:redeploy --> 8 <!-- <groupId>org.apache.tomcat.maven</groupId> --> 9 <!-- <artifactId>tomcat7-maven-plugin</artifactId> --> <!-- 命令为tomcat7:redeploy --> 10 <!-- <groupId>org.codehaus.mojo</groupId> --> 11 <!-- <artifactId>tomcat-maven-plugin</artifactId> --> <!-- 命令为tomcat:redeploy --> 12 <!-- <version>2.2</version> --> 13 <configuration> 14 <!-- <url>http://localhost:8080/manager</url> --> <!-- tomcat6部署管理路径 --> 15 <url>http://localhost:8080/manager/text</url