try {
List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories =
transformRemoteRepository(repositories);
location = service.getLocation(artifact, artifactType, remoteRepositories);
} catch (ArtifactResolutionException e) {
throw new ResolverException(String.format("Error locating %s: %s", artifact, e.getLocalizedMessage()));
} catch (MalformedURLException e) {
throw new ResolverException(String.format("Error creating URL for resolved artifact %s: %s",
artifact, e.getLocalizedMessage()));
} catch (SettingsBuildingException e) {
throw new ResolverException(String.format("Error loading settings for resolved artifact %s: %s",
artifact, e.getLocalizedMessage()));
}
return location;
}