设置文件永远不会自动创建,您必须自己创建,无论您使用嵌入式还是“真实”maven。
在以下位置创建它,<your home folder>/.m2/settings.xml
例如C:\Users\YourUserName\.m2\settings.xml
在 Windows 或/home/YourUserName/.m2/settings.xml
Linux 上
这是您可以使用的空骨架:
<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/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
<mirrors/>
<proxies/>
<profiles/>
<activeProfiles/>
</settings>
如果您使用 Eclipse 编辑它,它会在编辑时自动完成。
这是Maven settings.xml 参考页面