Maven setting. XML configuration file details
Maven's configuration file settings XML exists in two places:
1. Installation place: ${m2_home} / conf / settings xml
2. User's Directory: ${user. Home} / m2/settings. xml
The former is also called global configuration, which is effective for all users of the operating system; The latter is called user configuration and is only effective for users of the current operating system. If both exist, their contents will be merged and user wide settings XML will overwrite the global settings xml。
After Maven is installed, settings will not be automatically generated in the user directory XML, only global configuration files. If you need to create user wide settings XML, you can copy the settings under the installation path to the directory ${user. Home} / m2/。 Maven default settings XML is a template that contains comments and examples. You can quickly modify it to meet your requirements.
Once the global configuration is changed, all users will be affected, and if Maven is upgraded, all configurations will be cleared. Therefore, ${m2_home} / conf / settings should be copied and backed up in advance XML file. Generally, it is not recommended to configure global settings xml。
settings. XML explanation
Declaration specification
localRepository
interactiveMode
usePluginRegistry
offline
pluginGroups
proxies
servers
mirrors
profiles
Activation
Properties
Note: if the profile is activated, ${user. Install} can be used in POM.
Repositories
activeProfiles
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.