下载地址
对apache-maven-3.3.3-bin.zip进行解压缩,假设放到C盘根目录
设置系统环境变量
MAVEN_HOME C:\apache-maven-3.3.3
Path %MAVEN_HOME%\bin;
验证安装是否成功,打开cmd窗口,敲入mvn –v 查看
在D盘新建MavenRepository文件夹
修改/conf/settings.xml配置文件
<localRepository>D:/MavenRepository</localRepository>
在mirrors标签里面加入下面代码,用阿里云仓库,下载速度快
alimaven central aliyun maven http://maven.aliyun.com/nexus/content/repositories/central/ repo1 central Human Readable Name for this Mirror. http://repo1.maven.org/maven2/ repo2 central Human Readable Name for this Mirror. http://repo2.maven.org/maven2/
复制一份settings.xml到MavenRepository文件夹下
在Eclipse下设置Maven
安装路径 C:\apache-maven-3.3.3
User Settings路径 D:/MavenRepository/settings.xml