idea 修改maven setting文件不生效解决方案
原因
idea 中的maven 配置的自定义 XXX_settings.xml 文件 会与 MAVEN_HOME/conf 中的 settings.xml 文件整合。
方案
1.直接修改 MAVEN_HOME/conf/settings.xml
2.如果需要自定义,先将 MAVEN_HOME/conf/settings.xml 中的 <mirrors> 中的 <mirrorOf> 的 * 去了
mirrorOf=“*”时镜像所有的repositoryId,包括repositories和pluginRepositories。如果你需要某个jar就会从镜像mirrorOd配置的地址去下载这个jar。其他配置的repostory都没用。

注
默认settings.xml 注释:
<!--
| This is the configuration file for Maven. It can be specified at two levels:
|
| 1. User Level. This settings.xml file provides configuration for a single user,
| and is normally provided in ${user.home}/.m2/settings.xml.
|
| NOTE: This location can be overridden with the CLI option:
|
| -s /path/to/user/settings.xml
|
| 2. Global Level. This settings.xml file provides configuration for all Maven
| users on a machine (assuming they're all using the same Maven
| installation). It's normally provided in
| ${maven.conf}/settings.xml.
|
| NOTE: This location can be overridden with the CLI option:
|
| -gs /path/to/global/settings.xml
|
| The sections in this sample file are intended to give you a running start at
| getting the most out of your Maven installation. Where appropriate, the default
| values (values used when the setting is not specified) are provided.
|
|-->
优先级 user level > global level
user level path: ${user.home}/.m2/settings.xml
global level path:${maven.conf}/settings.xml.
这两个路径可能存在 setting 配置文件,注意调整

浙公网安备 33010602011771号