问题:
在使用idea时,自己已经设置好了Maven的Maven home path、User settings file、Local repository这三个路径,但再次新建项目时,idea又把这三个路径给重置成默认路径。
解决方式:
直接修改idea默认的project.default.xml文件。
我的project.default.xml地址:
"C:\Users\lili\AppData\Roaming\JetBrains\IntelliJIdea2023.3\options\project.default.xml"
原来的文件:
修改后:
代码:
<component name="MavenImportPreferences">
<option name="generalSettings">
<MavenGeneralSettings>
<option name="localRepository" value="D:\maven\repository" />
<option name="mavenHome" value="D:\LenovoQMDownload\SoftMgr\scoop\scoop1\apps\maven\current" />
<option name="userSettingsFile" value="D:\LenovoQMDownload\SoftMgr\scoop\scoop1\apps\maven\current\conf\settings.xml" />
</MavenGeneralSettings>
</option>
</component>
希望对你有帮助!