标签:
Eclipse安装好m2e插件,使用Maven构建项目后,启动web项目就行就非常简单了,你不再需要下载然后在eclipse中配置tomcat。
pom.xml的project节点中的build节点如下:
<build> <finalName>basic</finalName> <outputDirectory>D:\webapps</outputDirectory> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.12</version> <configuration> <skipTests>false</skipTests> <includes> <include>**/*Test.java</include> </includes> <excludes> <exclude>**/Test*.java</exclude> </excludes> </configuration> </plugin> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat6-maven-plugin</artifactId> <version>2.0-beta-1</version> </plugin> </plugins> </build>
Eclipse使用Maven tomcat:run命令启动web项目
标签:
原文地址:http://www.cnblogs.com/xmzzp/p/4178079.html