Why can't I find my settings.xml under ~/.m2
?
Note: I'm currently running Apache Maven 3.3.9
on my machine.
It's normally provided in ${maven. home}/conf/settings.
This is a reference for the user-specific configuration for Maven. Includes things that should not be distributed with the pom. xml file, such as developer identity, along with local settings, like proxy information. The default location for the settings file is ~/.m2/settings.xml.
Navigate to path {M2_HOME}\conf\ where M2_HOME is maven installation folder. Open file settings. xml in edit mode in some text editor. Update the desired path in value of this tag.
There are two locations where a settings.xml file may live:
The Maven install: ${maven.home}/conf/settings.xml
The user’s install: ${user.home}/.m2/settings.xml
The former settings.xml are also called global settings, the latter settings.xml are referred to as user settings. If both files exists, their contents gets merged, with the user-specific settings.xml being dominant.
Tip: If you need to create user-specific settings from scratch, it’s easiest to copy the global settings from your Maven installation to your ${user.home}/.m2 directory. Maven’s default settings.xml is a template with comments and examples so you can quickly tweak it to match your needs.
Maven Settings Reference Guide
So simply
${maven.home}/conf/settings.xml
${user.home}/.m2/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With