1、首先,新建一个新的Maven project
2、右击项目,选择“Properties”
习惯于将编译文件放在”src/main/webapp“目录下,如想用WebContent也可以。
选择右侧的“add"
可以把WebContent目录删除
修改pom.xml中的输出目录
此时,已经完成在Eclipse中Maven添加web项目了。
然后,涉及到引入第三方jar包问题
1、引入单个jar包
首先:
mvn install:install-file -DgroupId=org.jboss.cache -DartifactId=jbosscache-core -Dversion=3.2.7.GA -Dpackaging=jar -Dfile=D:\jbosscache-core-3.2.7.GA.jar
pom.xml中添加一个配置:
2、引入多个第三方jar包,加入configuration中的内容。