final DefaultModelBuildingRequest request = new DefaultModelBuildingRequest()
.setSystemProperties(SecurityActions.getProperties()).setProfiles(this.getSettingsDefinedProfiles())
.setPomFile(pomFile).setActiveProfileIds(SettingsXmlProfileSelector.explicitlyActivatedProfiles(profiles))
.setInactiveProfileIds(SettingsXmlProfileSelector.explicitlyDisabledProfiles(profiles));
ModelBuilder builder = new DefaultModelBuilderFactory().newInstance();
ModelBuildingResult result;
try {
request.setModelResolver(new MavenModelResolver(system, session, getRemoteRepositories()));
result = builder.build(request);
}
// wrap exception message
catch (ModelBuildingException e) {
String pomPath = request.getPomFile().getAbsolutePath();
StringBuilder sb = new StringBuilder("Found ").append(e.getProblems().size())