Maven修改本地仓库的配置
刚安装完成的Maven默认的本地仓库的位置在C盘目录下,做开发来说,一般我们都是需要修改Maven的本地仓库的,谁都不想把jar包的管理放在C盘目录下面。
修改Maven的本地仓库配置文件:F:\Maven\apache-maven-3.3.9-bin\apache-maven-3.3.9\conf\setting.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ${user.home}/.m2/repository
<localRepository>/path/to/local/repo</localRepository>
-->
<localRepository>D:\maven\repository</localRepository>
</settings>
修改你想让类库保存的目录下,
Maven就会将下载的类库保存到D:\maven\repository中。dos窗口验证下:mvn help:system