maven:setting.xml

Time:2020-2-5

brief introduction

As you can see from the file name of settings.xml, it is the configuration file used to set Maven parameters.
Also, settings.xml is the global configuration file for Maven. The pom.xml file is the local configuration of the project.
Settings.xml contains configuration such as local storage location, remote storage server modification, authentication information, etc.

Setting location

The settings.xml file generally exists in two places:
Global configuration: ${M2 _home} / conf / settings.xml
User configuration: user.home /. M2 / settings.xml, user configuration takes precedence over global configuration.

Configure priority

Note that local configuration takes precedence over global configuration.
Configuration priority from high to low: pom.xml > User Settings > global settings
If these files exist at the same time, their contents will be merged when the configuration is applied. If there are duplicate configurations, the configuration with higher priority will overwrite the one with lower priority
Be careful
If a profile in settings.xml is activated, its value will override any other profile defined in pom.xml with the same ID

detailed

link