Maven下载地址:http://maven.apache.org/download.cgiapache
选择下载 服务器
直接解压无需安装()下面配置Maven环境变量eclipse
右击个人电脑->属性->高级系统设置->环境变量->系统变量#maven
新建MAVEN_HOMEthis
变量名:MAVEN_HOME |
变量值:D:\Java\apache-maven-3.5.4 |
编辑Path添加变量值阿里云
%MAVEN_HOME%\binurl
点击肯定,运行CMD直接输入:mvn -v 出现版本号证实安装成功。spa
编辑Path添加变量值插件
使用阿里云提供的Maven镜像服务器:http://maven.aliyun.com/nexus/content/groups/public/code
修改settings.xml文件, 添加镜像服务器配置信息:
<mirrors> <!-- mirror | Specifies a repository mirror site to use instead of a given repository. The repository that | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. |
--> <mirror> <id>aliyun</id> <mirrorOf>*</mirrorOf> <name>aliyun Maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> </mirror> </mirrors>
最新版的Eclipse已经内嵌了Mevne插件m2e, 不须要安装Maven插件, 若是不作任何配置, 会自动链接使用maven中央库天然能够使用, 可是中央库在国外, 受到中国防火墙等因素影响其访问速度很慢, 只有链接到国内镜像库才能提升Maven运行速度. 链接到国内镜像库按照以下配置.
点击下方Update Settings更新配置信息。