maven 安装及配置
1、Maven安装配置
首先到官网下载http://maven.apache.org/download.cgi
我们需要下载的bin.zip结尾的文件,下载后解压到指定文件夹(全英文路径)
2、配置环境变量
MAVEN_HOME : D:\tools\apache-maven-3.3.9 PATH 中添加 %MAVEN_HOME %\bin
3、修改conf中的settings.xml文件
# 大概在50行,修改本地仓库 <localRepository>D:/tools/repository</localRepository>
#160行,修改阿里云镜像
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>
4、打开CMD输入mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00) Maven home: D:\tools\apache-maven-3.3.9\bin\.. Java version: 1.8.0_251, vendor: Oracle Corporation Java home: D:\tools\jdk8\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"