原因
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 配置文件,注意调整
原文地址:http://www.cnblogs.com/monkeyjesus/p/16846790.html
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,请务用于商业用途!
3. 如果你也有好源码或者教程,可以到用户中心发布,分享有积分奖励和额外收入!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 如遇到加密压缩包,默认解压密码为"gltf",如遇到无法解压的请联系管理员!
8. 因为资源和程序源码均为可复制品,所以不支持任何理由的退款兑现,请斟酌后支付下载
声明:如果标题没有注明"已测试"或者"测试可用"等字样的资源源码均未经过站长测试.特别注意没有标注的源码不保证任何可用性