Answers:
起初它不存在。您必须在主文件夹中创建它,/Users/usename/.m2/
(或~/.m2
)
例如 :
/Users/username/.m2
如果您将Maven与Brew一起安装
您可以在终端中键入命令(“ mvn -v”)
查看Maven主页详细信息
mvn -v
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T03:39:06+08:00)
Maven home: /usr/local/Cellar/maven/3.5.0/libexec
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.5", arch: "x86_64", family: "mac"
我在/usr/share/java/maven-3.0.3/conf下找到它10.8.2
ln -s /usr/share/maven/conf/settings.xml settings.xml
/usr/share/java/maven-3.0.3
是全局设置的路径,这与用户设置不同;cf eviltester.com/2013/09/maven-settingsxml-global-and-user.html
User Level
.。这个settings.xml文件为单个用户提供配置,通常在${user.home}/.m2/settings.xml
.2中Global Level
提供。。settings.xml文件为所有用户提供配置。一台机器上的Maven用户(假设他们都使用相同的Maven安装)。通常在中提供${maven.home}/conf/settings.xml
。”