首先須要安裝好,假設安裝位置在:D:\****\maven\apache-maven-3.3.3apache
修改本地倉庫位置,打開配置文件:D:\****\maven\apache-maven-3.3.3\conf\settings.xmlmaven
<!-- localRepository
| The path to the local repository maven will use to store artifacts
| Default: ${user.home}/.m2/repository
<localRepository>/path/to/local/repo</localRepository>
-->xml
將原來配置文件中的默認值改成本身maven安裝的位置:
<localRepository>D:\****\maven\repository</localRepository>ip
修改Eclipse中的配置,Eclipse -> Prefrences -> Maven -> User Settings -> it
下面的local repository會自動識別配置文件中的配置,本身更換。點擊OK完成。cli
【若是setting文件改了以後,下面local repository的位置仍是默認是C盤,那就說明settings.xml文件中的local Repository的位置沒有改變,改爲本身想要的位置便可。】配置