简体   繁体   English

如何从 mavens.m2 文件夹中排除读取 settings.xml

[英]How can I exclude reading settings.xml from mavens .m2 folder

does anyone knows how can I use the default maven settings and not the one which is defined in.m2/settings.xml, as this file has some other configurations which aren't suiting this project?有谁知道我如何使用默认的 maven 设置,而不是在.m2/settings.xml 中定义的设置,因为该文件有一些其他不适合该项目的配置? I cloned a simple SpringBoot project, but can't find a solution of how to tell the project to not look on those settings from.m2/ and use the default ones.我克隆了一个简单的 SpringBoot 项目,但找不到如何告诉项目不要查看这些设置 from.m2/ 并使用默认设置的解决方案。

You can write a second settings.xml (eg named second-settings.xml ) that is right for your project and use it with -s second-settings.xml on the command line.您可以编写适合您项目的第二个settings.xml (例如命名为second-settings.xml )并将其与-s second-settings.xml on command line 一起使用。

In IntelliJ you can override the settings file used by the maven plugin under Settings > Build, Execution, Deployment > Build Tools > Maven在 IntelliJ 中,您可以在Settings > Build, Execution, Deployment > Build Tools > Maven下覆盖 maven 插件使用的设置文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM