use of org.eclipse.ceylon.cmr.ceylon.loader.ModuleLoader in project ceylon by eclipse.
the class ModuleLoaderTest method testBug7084.
@Test
public void testBug7084() throws IOException {
Path flatRepo = Files.createTempDirectory("flat-repo");
try {
RepositoryManager repositoryManager = CeylonUtils.repoManager().systemRepo("../dist/dist/repo").userRepos(Arrays.asList("flat:" + flatRepo.toAbsolutePath().toString())).buildManager();
File artifact = repositoryManager.getArtifact(null, "ceylon.collection", "1.3.2");
Assert.assertNotNull(artifact);
Files.copy(artifact.toPath(), flatRepo.resolve("ceylon.collection-1.3.2.jar"));
ModuleLoader moduleLoader = new FlatpathModuleLoader(repositoryManager, null, Collections.<String, String>emptyMap(), true);
try {
moduleLoader.loadModule("ceylon.collection", "1.3.2");
} catch (ModuleNotFoundException e) {
throw new RuntimeException(e);
}
} finally {
IOUtils.deleteRecursively(flatRepo.toFile());
}
}
Aggregations