The default external settings
The are two default levels of external settings: global (installation) configuration and user configuration.
The default location of the global settings file is $m2_home/settings.xml, where m2_home is the maven installation directory.
The default location of the user settings file is $user/.m2/settings.xml, where user is the user home directory.
The default external settings is used on call of any maven command and for all projects. If there is no external settings on either of global or user levels, maven uses the default values.
For details about available settings options use the settings reference and the configuration guide.
Properties overriding
The user settings property is effective only if such property is empty in the global settings.
The user settings property value is ignored, if there is a value defined in the global settings.
Custom external settings
Both global and user external settings may be provided as a maven argument. Such settings overrides the appropriate default settings.
The option -gs
mvn clean install -gs abc-settings.xml
Since the command receives the global settings argument, maven will use the provided settings first and then will look for the default user settings.The option -s
mvn clean install -s abc-settings.xml
Since the command receives the user settings argument, maven will look for the default global settings first and then will use the additional properties from the provided external settings.Maven external setting in eclipse
In eclipse maven external setting is set as following:
1. Go to Window->Preferences->Maven-> User settings
2. In the dialog define the global settings file and/or the user settings file. Each file will be used instead of the appropriate default settings.
1 comment :
Trying to teach myself code and looking for all the help I can get. Your explanation is very simple and easy to understand. Thank you.
Post a Comment