maven的Tomcat插件使用
1.在pom.xml中配置Tomcat插件
<build>
<!-- 配置插件 -->
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<port>8080</port>
<path>/</path>
</configuration>
</plugin>
</plugins>
</build>
2.启动项目
使用maven命令:clean tomcat7:run
右击项目--Run As--Maven build

3.注意:需要将项目依赖工程安装到本地仓库:maven install

浙公网安备 33010602011771号