1、下载
https://dlcdn.apache.org/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.zip
2、解压
3、配置环境变量
M2_HOME F:\apache-maven-3.8.4\bin
MAVEN_HOME F:\apache-maven-3.8.4
Path %MAVEN_HOME%\bin
4、配置阿里云镜像
修改 F:\apache-maven-3.8.4\conf\settings.xml
引用:
https://www.cnblogs.com/shan333/p/15291213.html
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>*,!jeecg,!jeecg-snapshots</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
5、本地仓库
修改 F:\apache-maven-3.8.4\conf\settings.xml
<localRepository>F:\apache-maven-3.8.4\maven-repo</localRepository>
6、寻找需要的jar添加到本地仓库中
访问阿里云仓库
https://developer.aliyun.com/mvn/search
搜索需要的jar 复制文件 粘贴在pom.xml中。
eg:
<dependency>
<groupId>com.github.jiangxincode</groupId>
<artifactId>cpdetector</artifactId>
<version>1.0.10</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-antlr</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>clj-chardet</groupId>
<artifactId>clj-chardet</artifactId>
<version>0.2</version>
<type>pom</type>
</dependency>