use of com.tobedevoured.naether.impl.NaetherImpl in project Glowstone by GlowstoneMC.
the class GlowServer method createNaetherWithRepository.
private Naether createNaetherWithRepository(String repository, String libraryFolder) {
Naether naether = new NaetherImpl();
naether.setLocalRepoPath(new File(libraryFolder).getAbsolutePath());
try {
// Must overwrite the collection here in order to remove Maven Central from it.
naether.setRemoteRepositories(Sets.newHashSet(RepoBuilder.remoteRepositoryFromUrl(repository)));
} catch (MalformedURLException e) {
logger.log(Level.WARNING, "Unable to resolve library dependencies. Falling back to " + "explicitly defined dependencies only.", e);
return null;
}
return naether;
}
Aggregations