idea创建maven项目时,maven配置总恢复默认的处理办法
-
我的IDEA是 2020.2版本
-
找到project.default.xml
-
我的project.default.xml文件路径是
在idea打开改文件进行修改,在该xml文件中添加红框的代码即可
代码如下:
<application>
<component name="ProjectManager">
<defaultProject>
<component name="ProjectViewState">
<option name="showLibraryContents" value="true" />
<option name="showMembers" value="true" />
</component>
<component name="PropertiesComponent">
<property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
</component>
<component name="MavenImportPreferences">
<option name="generalSettings">
<MavenGeneralSettings>
<option name="localRepository" value="D:\apache\apache-maven-3.3.9\maven-repository" />
<option name="mavenHome" value="D:/apache/apache-maven-3.3.9" />
<option name="userSettingsFile" value="D:\apache\apache-maven-3.3.9\conf\settings.xml" />
</MavenGeneralSettings>
</option>
</component>
</defaultProject>
</component>
</application>
重启idea 尝试创建新的项目,打开maven,发现是自己配置的maven仓库地址,不再是系统默认的,OK,搞定!