* @return Maven {@code Settings}
*
* @throws SettingsBuildingException If there are problems loading the settings.
*/
public static Settings getSettings() throws SettingsBuildingException {
DefaultSettingsBuilder defaultSettingsBuilder = new DefaultSettingsBuilder();
DefaultSettingsBuildingRequest request = new DefaultSettingsBuildingRequest();
File userSettingsFile = new File(System.getProperty("user.home"), ".m2" + File.separator + "settings.xml");
request.setUserSettingsFile(userSettingsFile);
defaultSettingsBuilder.setSettingsWriter(new DefaultSettingsWriter());
defaultSettingsBuilder.setSettingsReader(new DefaultSettingsReader());
defaultSettingsBuilder.setSettingsValidator(new DefaultSettingsValidator());
SettingsBuildingResult build = defaultSettingsBuilder.build(request);
return build.getEffectiveSettings();
}