Search code examples
javaspring-bootmavenintellij-ideapom.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? 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.


Solution

  • You can write a second settings.xml (e.g. named second-settings.xml) that is right for your project and use it with -s second-settings.xml on the command line.