Intellij学习笔记 --- 更改maven本地路径和外部仓库地址

来源:互联网 发布:苹果发布会 mac 编辑:程序博客网 时间:2024/06/05 10:23

操作顺序如下:

File -> Settings -> Build,Execution, Deployment -> Build Tools -> Maven。


然后如下图:



然后在User settings file后面的Override打勾,然后早


/home/ryan/.m2/

新建一个setting.xml文件


然后内容如下:


<?xml version="1.0" encoding="UTF-8"?><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>C:\Users\Ocean\.m2\repository</localRepository>  <mirrors>  <mirror>        <id>nexus-aliyun</id>        <mirrorOf>*</mirrorOf>        <name>Nexus aliyun</name>        <url>http://maven.aliyun.com/nexus/content/groups/public</url>    </mirror>  </mirrors></settings>


然后回到界面,点击确定即可。

原创粉丝点击