eclipse配置maven环境。
1、打开菜单Help->Eclipse Marketplace,在find处输入maven,找到maven integration for eclipse安装

2、eclipse菜单中选择Windows->Preferences->Maven->Installations。Add本地maven目录

3、maven->User Settings ,选择本地setting文件

4、创建maven的web项目
右键->new->other,找到maven,选择maven project->next

5、选择maven-archetype-webapp后,点击next,注意,可以在filter中先输入webapp,这样就能快速找到maven-archetype-webapp选项,

6、输入groupid,artifact id和packgage,点击finish,

7、新建完成。有红色标记

8、build path->configure build path。libraries,选中JRE System library,点击edit。选择workspace default JRE,点击finish,再点击OK


Add library - server runtime 选择tomcat
选择时没有tomcat 在windows-Preferences-server-runtime addserver即可
9、右键->Properties->project Facets,点击Convert to faceted from。勾选Dynamic Web Module点击further configuration available…。默认被勾选无法点击further configuration available…,可以先取消保存再勾选。

10、设置部署程序集。右键->Properties->Deployment Assembly。右键->Properties->Deployment Assembly。Test删除 测试所用,无需部署

11、新建完成。下一篇运行及访问
3683

被折叠的 条评论
为什么被折叠?



