1,下载J2EE版本的eclispe(includes maven integration for eclipse)
http://www.eclipse.org/downloads/
2,Maven下载
http://maven.apache.org/download.cgi
我的maven存放在 E:\apache-maven-3.2.3
3, 配置Maven环境变量
M2_HOME:E:\apache-maven-3.2.3
PATH:添加 E:\apache-maven-3.2.3\bin;
cmd->mvn -v 测试是否配置成功!
4,修改Maven个人仓库配置
在 E盘 m2目录下 增加settings.xml文件,settings.xml文件内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups />
<proxies />
<servers />
<mirrors />
<localRepository>E:/m2/repository</localRepository>
</settings>
5,修改 E:\apache-maven-3.2.3\conf中的settings.xml:
<localRepository>E:/m2/repository</localRepository>
6,配置eclipse中的Maven插件
配置eclipse使用的maven为E:\apache-maven-3.2.3
配置Maven Local Repository为E:/m2/repository
7,Eclispe中查看 Maven Repository
点击window->Show view ->Ohters->Maven->Maven Repositories
展开Maven Repositories->Local Repository ->右击选择rebuild index