首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

Web架构学习(一)使用eclipse搭建maven项目

2012-06-27 
Web架构学习(1)使用eclipse搭建maven项目首先用eclipse创建工程 new - project - maven - maven projec

Web架构学习(1)使用eclipse搭建maven项目
首先用eclipse创建工程 new -> project -> maven -> maven project
点击next 进入Select an Archetype 界面,选择maven archetype webapp
点击next进入Specify Archetype parameters界面,给工程指定 groupId和artifactId点击finish完成工程搭建
maven项目将通过pom.xml文件控制,为方便起见会将一个罗列了很多包和插件及服务器地址配置的pom工程作为我们当前pom的父类,是要父类在中央仓中,我们只需在自己工程的pom中对其引用即可

<dependency><groupId>org.springframework</groupId><artifactId>spring-webmvc</artifactId></dependency>

为什么引入包不需要指定版本呢? 对的,在父pom罗列中已经有指定了,默认为父pom的版本

个人之前没用过ant,不能进行对比,但是试用maven的方式管理项目的确是非常值得使用的


热点排行