DefaultRepositorySystemSession session = mavenContainer.setupRepoSession(system, settings);
final DefaultModelBuildingRequest request = new DefaultModelBuildingRequest()
.setSystemProperties(System.getProperties())
.setPomFile(pomFile)
.setActiveProfileIds(settings.getActiveProfiles());
ModelBuilder builder = new DefaultModelBuilderFactory().newInstance();
ModelBuildingResult result;
try
{
request.setModelResolver(new MavenModelResolver(system, session, mavenContainer
.getEnabledRepositoriesFromProfile(settings)));