MAVEN的安裝與使用
阿新 • • 發佈:2021-12-14
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>