Search in sources :

Example 1 with NaetherImpl

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;
}
Also used : Naether(com.tobedevoured.naether.api.Naether) MalformedURLException(java.net.MalformedURLException) NaetherImpl(com.tobedevoured.naether.impl.NaetherImpl) UuidListFile(net.glowstone.util.bans.UuidListFile) File(java.io.File)

Aggregations

Naether (com.tobedevoured.naether.api.Naether)1 NaetherImpl (com.tobedevoured.naether.impl.NaetherImpl)1 File (java.io.File)1 MalformedURLException (java.net.MalformedURLException)1 UuidListFile (net.glowstone.util.bans.UuidListFile)1