1. 下载Maven
官方地址:http://maven.apache.org/download.cgi
![6e2337e4ed541e7222e8d51a9f25cdae.png](https://img-blog.csdnimg.cn/img_convert/6e2337e4ed541e7222e8d51a9f25cdae.png)
解压并新建一个本地仓库文件夹
![aa66205ab0fb058a47a41a49aae13bfc.png](https://img-blog.csdnimg.cn/img_convert/aa66205ab0fb058a47a41a49aae13bfc.png)
2.配置本地仓库路径
![17fc9a9db8b618499862f54afec9cc8b.png](https://img-blog.csdnimg.cn/img_convert/17fc9a9db8b618499862f54afec9cc8b.png)
![efbac79de0d205a9ded8edb7bcafd2cd.png](https://img-blog.csdnimg.cn/img_convert/efbac79de0d205a9ded8edb7bcafd2cd.png)
3.配置maven环境变量
![d1e2cf18bcd21f24de05213b233b313d.png](https://img-blog.csdnimg.cn/img_convert/d1e2cf18bcd21f24de05213b233b313d.png)
![6e4ffcfc921be6faa17803076f40f36a.png](https://img-blog.csdnimg.cn/img_convert/6e4ffcfc921be6faa17803076f40f36a.png)
![13952af1a009eaba3591310d106489c2.png](https://img-blog.csdnimg.cn/img_convert/13952af1a009eaba3591310d106489c2.png)
![f97982310a603f30d81d160a3111d1d0.png](https://img-blog.csdnimg.cn/img_convert/f97982310a603f30d81d160a3111d1d0.png)
![03296942f2e47e15d00a53f069e7e663.png](https://img-blog.csdnimg.cn/img_convert/03296942f2e47e15d00a53f069e7e663.png)
4.在IntelliJ IDEA中配置maven
打开-File-Settings
![f4e678a7e4b375957c7a4b95d327c45b.png](https://img-blog.csdnimg.cn/img_convert/f4e678a7e4b375957c7a4b95d327c45b.png)
5.新建maven WEB项目
打开-File-New-Project
点击NEXT
![c6587c1c1405c043b86ceab8fc6e938a.png](https://img-blog.csdnimg.cn/img_convert/c6587c1c1405c043b86ceab8fc6e938a.png)
点击NEXT
![9f004c6b762c564b73b0c14a2d218763.png](https://img-blog.csdnimg.cn/img_convert/9f004c6b762c564b73b0c14a2d218763.png)
添加的配置为 archetypeCatalog=internal
点击NEXT
![1cdace9da917be3e66a668c9aad1db8c.png](https://img-blog.csdnimg.cn/img_convert/1cdace9da917be3e66a668c9aad1db8c.png)
点击NEXT
![46763f3cd1d33fbc19f3f658cc3677b0.png](https://img-blog.csdnimg.cn/img_convert/46763f3cd1d33fbc19f3f658cc3677b0.png)
点击Finish后项目开始创建
点击右下角查看进去
![5b9736ef66507d512d4f8f8d6227d0e9.png](https://img-blog.csdnimg.cn/img_convert/5b9736ef66507d512d4f8f8d6227d0e9.png)
6.maven web模板项目结构
![b21ca08bc53302311330c2cfccacd086.png](https://img-blog.csdnimg.cn/img_convert/b21ca08bc53302311330c2cfccacd086.png)
![96dc8d9ebf8babbe1c0de1826da4c9ba.png](https://img-blog.csdnimg.cn/img_convert/96dc8d9ebf8babbe1c0de1826da4c9ba.png)
![24888054124054497a7eece1b6a21732.png](https://img-blog.csdnimg.cn/img_convert/24888054124054497a7eece1b6a21732.png)
同样在main下新建test测试文件夹,再在此文件夹下新建java测试源码文件夹和resource测试资源文件夹
![20f100709930878655a68a6cc1819fb2.png](https://img-blog.csdnimg.cn/img_convert/20f100709930878655a68a6cc1819fb2.png)
也可以右键项目-选择Open Module Settings打开项目配置页面更改
![bcfcde4cea9f450ad9bb3c658870008d.png](https://img-blog.csdnimg.cn/img_convert/bcfcde4cea9f450ad9bb3c658870008d.png)
7.配置依赖jar包
![87035130568e3e31213672278233d971.png](https://img-blog.csdnimg.cn/img_convert/87035130568e3e31213672278233d971.png)
jar包配置搜索
官方地址:http://mvnrepository.com/