use of org.apache.maven.settings.io.SettingsReader in project gradle by gradle.
the class DefaultMavenSettingsProvider method readLocalRepository.
private String readLocalRepository(File settingsFile) {
if (settingsFile == null || !settingsFile.exists()) {
return null;
}
Map<String, ?> options = Collections.singletonMap(SettingsReader.IS_STRICT, Boolean.FALSE);
SettingsReader settingsReader = new DefaultSettingsReader();
try {
return settingsReader.read(settingsFile, options).getLocalRepository();
} catch (Exception parseException) {
throw new CannotLocateLocalMavenRepositoryException("Unable to parse local Maven settings: " + settingsFile.getAbsolutePath(), parseException);
}
}
Aggregations