赞
踩
在MacOS中,Maven仓库的.m2
文件夹默认隐藏并位于/Users/用户名
下
Command+Shift+.
:隐藏/显示 隐藏的文件夹
打开终端
// 设置隐藏文件可见
defaults write com.apple.finder AppleShowAllFiles TRUE
// 输入后重启Finder生效
killall Finder
备用命令
// 设置隐藏文件不可见
defaults write com.apple.finder AppleShowAllFiles FALSE
如果.m2文件夹中没有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
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
首先进入Intelij IDEA > Preferences...
然后搜索Maven,点击User settings file
这一行最右侧的Overrride
最后依次点击OK
、Apply
完成设置
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。