IDEA 2016.2创建maven WEB项目

记录以下创建WEB项目的过程。

1、首先File-New-Project创建新项目


2、选择Maven 选择SDK,点选Create from archetype,选择maven-archetype-webapp,然后下一步。


3、填写GroupId和artifactId。


4、可以修改maven配置,不修改则直接下一步。


5、填写Project name,Module name默认和Project name相同然后确定新建项目。


6、新建项目后配置运行时环境。


7、选择本地tomcat


8、填写name,可以更改web service的端口,下面有警告,点击fix


9、点击Modules,在项目下点加号选择web


10、修改Deployment Decriptors中path到/src/main/webapp/WEB-INF/web.xml,修改web reource directories中Web Reource Directories到src/main/webapp,点击Create Artifact。


11、自动生成一个artifacts,有可能要把Available Elements下WEB-INF移到output root下。

 

12、返回运行时环境配置界面,在Deployment里加入新建的artifacts。


13、运行即可


猜你喜欢

转载自blog.csdn.net/q420938604/article/details/60956582