Myeclipse创建maven web工程及配置

来源:互联网 发布:mac系统语言改中文 编辑:程序博客网 时间:2024/05/18 00:34

步骤如下:

1、New – Project 选择maven project

SouthEast - java基础——Myeclipse创建maven web工程及配置

2、点击Next,勾选Creat a sample ….

SouthEast - java基础——Myeclipse创建maven web工程及配置

3、Next

SouthEast - java基础——Myeclipse创建maven web工程及配置

4、点击finish即可。

SouthEast - java基础——Myeclipse创建maven web工程及配置

5、配置为web工程

在我们的项目上点击右键,选择properties 并找到 Project Facets

SouthEast - java基础——Myeclipse创建maven web工程及配置

点击OK 项目中会多出一个webroot的文件夹,将里面的META-INF,WEB-INF等都拷贝到上述的webapp中

SouthEast - java基础——Myeclipse创建maven web工程及配置

6、修改发布规则,右键项目,properties,找到Deployment Assembly

把 src/test…什么之类的删掉,Add folder…,修改为如下

SouthEast - java基础——Myeclipse创建maven web工程及配置

这样子一个maven web项目就构建好了。

去http://search.maven.org/  查找你需要的依赖即可。

原创粉丝点击