use of org.apache.maven.settings.building.DefaultSettingsBuildingRequest in project gradle by gradle.
the class DefaultMavenSettingsProvider method buildSettings.
/**
* Builds a complete `Settings` instance for this machine.
*
* Note that this can be an expensive operation, spawning an external process
* and doing a bunch of additional processing.
*/
@Override
public Settings buildSettings() throws SettingsBuildingException {
DefaultSettingsBuilderFactory factory = new DefaultSettingsBuilderFactory();
DefaultSettingsBuilder defaultSettingsBuilder = factory.newInstance();
DefaultSettingsBuildingRequest settingsBuildingRequest = new DefaultSettingsBuildingRequest();
settingsBuildingRequest.setSystemProperties(System.getProperties());
settingsBuildingRequest.setUserSettingsFile(mavenFileLocations.getUserSettingsFile());
settingsBuildingRequest.setGlobalSettingsFile(mavenFileLocations.getGlobalSettingsFile());
SettingsBuildingResult settingsBuildingResult = defaultSettingsBuilder.build(settingsBuildingRequest);
return settingsBuildingResult.getEffectiveSettings();
}
Aggregations