.setGlobalSettingsFile(globalSettingsFile)
.setUserSettingsFile(userSettingsFile)
.setSystemProperties(request.getSystemProperties())
.setUserProperties(request.getUserProperties());
SettingsBuildingResult settingsResult;
SettingsBuilder settingsBuilder = container.lookup(SettingsBuilder.class);
try {
settingsResult = settingsBuilder.build(settingsRequest);
}
finally {
container.release(settingsBuilder);
}
// NOTE: This will nuke some details from the request; profiles, online, etc... :-(
MavenExecutionRequestPopulator populator = container.lookup(MavenExecutionRequestPopulator.class);
try {
populator.populateFromSettings(request, settingsResult.getEffectiveSettings());
}
finally {
container.release(populator);
}
if (!settingsResult.getProblems().isEmpty() && logger.isWarnEnabled()) {
logger.warn("");
logger.warn("Some problems were encountered while building the effective settings"); // TODO: i18n
for (SettingsProblem problem : settingsResult.getProblems()) {
logger.warn(problem.getMessage() + " @ " + problem.getLocation()); // TODO: i18n
}
logger.warn("");
}